Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new Drupal Finder API. #673

Merged

Conversation

tannguyen04
Copy link
Contributor

No description provided.

@@ -44,7 +44,7 @@ public static function createRequiredFiles(Event $event) {
require_once $drupalRoot . '/core/includes/install.inc';
new Settings([]);
$settings['settings']['config_sync_directory'] = (object) [
'value' => Path::makeRelative($drupalFinder->getComposerRoot() . '/config/sync', $drupalRoot),
'value' => '../config/sync',
Copy link
Contributor Author

@tannguyen04 tannguyen04 Jun 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With new Drupal Finder version 1.3, $drupalFinder->getComposerRoot() return empty string not same the old one.
More info webflo/drupal-finder#72

I think we can safety hard code relative path ../config/sync at here. Drupal can handle relative path to Drupal root itself

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tannguyen04 – I was curious if this still works when you put a nested folder for extra.drupal-scaffold.locations.web-root (e.g. web/test/) but this is not how extra.drupal-scaffold.locations.web-root is supposed to work. You can not have nested directories at this point. So ../config/sync should be fine.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also fixed the tests not passing in #650. 👌🏻

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sound like waiting for a response on webflo/drupal-finder#72 or diving into that further might be the best approach here?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"safety hard code relative path ../config/sync" is breaking our install and update process because composer root, drupal root and config root are at the same level.

I will manually override the dir in our project and will wait until the webflo-issue is fixed.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh, of course you can have . as web root and then it breaks. 💡

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sascha-krug - would you be so kind and create a follow-up issue for it, please? I don't know when I've time at the computer again.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course. Done: #675

@tannguyen04 tannguyen04 marked this pull request as ready for review June 6, 2024 03:50
@tannguyen04 tannguyen04 marked this pull request as draft June 6, 2024 03:52
@tannguyen04 tannguyen04 marked this pull request as ready for review June 6, 2024 03:55
@AlexSkrypnyk AlexSkrypnyk requested a review from leymannx June 6, 2024 04:27
@AlexSkrypnyk AlexSkrypnyk self-assigned this Jun 6, 2024
@AlexSkrypnyk AlexSkrypnyk self-requested a review June 6, 2024 04:27
@AlexSkrypnyk AlexSkrypnyk added the PR: Needs review Pull request needs a review from assigned developers label Jun 6, 2024
@AlexSkrypnyk AlexSkrypnyk changed the title Use new Drupal finder api. Use new Drupal finder API. Jun 6, 2024
@AlexSkrypnyk AlexSkrypnyk changed the title Use new Drupal finder API. Use new Drupal Finder API. Jun 6, 2024
Copy link
Collaborator

@leymannx leymannx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏻

@AlexSkrypnyk AlexSkrypnyk merged commit 265c3b1 into drupal-composer:10.x Jun 7, 2024
15 checks passed
szeidler pushed a commit to ramsalt/drupal-project that referenced this pull request Jul 2, 2024
AlexSkrypnyk pushed a commit that referenced this pull request Jul 19, 2024
AlexSkrypnyk pushed a commit that referenced this pull request Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D10 PR: Needs review Pull request needs a review from assigned developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants