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

Patch Phing to fix relative symlinks #179

Merged
merged 6 commits into from
Jan 7, 2022
Merged

Patch Phing to fix relative symlinks #179

merged 6 commits into from
Jan 7, 2022

Conversation

byrond
Copy link
Contributor

@byrond byrond commented Dec 23, 2021

Description

  • Fixes issues discovered in Automatically run drush inside of ddev #174.
  • Patches Phing to fix support for relative symlinks (according to Relative symlinks phingofficial/phing#695, which was only added to Phing 3).
  • Uses a relative symlink for the_build_utility module, so it will be correct inside the DDEV container when created outside.
  • Updates IncludeResourceTask to use SymlinkTask in order to take advantage of required relative symlinks.

This also requires adding cweagans/composer-patches and the following line to composer.json, so the skeleton will need to be updated:

"extra": {
    "enable-patching": true
}

Testing instructions

  • Create a new project using Composer, or use an existing one. Backup your database if using an existing project, and you want to keep it.
  • composer require cweagans/composer-patches
  • Add "enable-patching": true to the "extra": { } section of composer.json
  • Change the version of The Build in composer.json to "palantirnet/the-build": "dev-detect-ddev-byron".
  • composer update palantirnet/the-build (You should see Composer remove Phing, reinstall it, and add the patch.)
  • ddev start (if the project isn't already running)
  • ddev drush sql-drop
  • vendor/bin/the-build-installer
  • Use defaults (or settings that match your existing project). Choose to install Drupal when prompted.

@byrond byrond changed the title Patch Phing Patch Phing to fix relative symlinks Dec 23, 2021
@byrond byrond self-assigned this Dec 23, 2021
@byrond byrond requested a review from becw December 23, 2021 15:59
*
* @var boolean
*/
private $relative = true;
Copy link
Member

Choose a reason for hiding this comment

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

This should be protected instead of private I think?

Copy link
Member

Choose a reason for hiding this comment

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

I went ahead and made this change.

@@ -0,0 +1,76 @@
diff --git a/classes/phing/tasks/ext/SymlinkTask.php b/classes/phing/tasks/ext/SymlinkTask.php
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a README to the patches directory that explains where this patch comes from?

Copy link
Member

Choose a reason for hiding this comment

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

I went ahead and added a README.

@becw
Copy link
Member

becw commented Jan 6, 2022

I had two comments/change requests but otherwise this looks good.

@becw becw merged commit 9aaec32 into detect-ddev Jan 7, 2022
@becw becw deleted the detect-ddev-byron branch January 7, 2022 19:20
@becw becw restored the detect-ddev-byron branch January 7, 2022 19:20
@byrond byrond deleted the detect-ddev-byron branch February 21, 2023 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants