Added require-dev dependencies from mainline Magento 2.3.0 #337
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The Magento Cloud Template codebase does not include the same set of packages defined in the "on-prem" version of Magento 2
Action Taken
Added in the
require-dev
dependencies which are listed here in the same major/minor/patch versions of Magento2 on GitHub.composer require --dev friendsofphp/php-cs-fixer:~2.13.0 lusitanian/oauth:~0.8.10 magento/magento2-functional-testing-framework:2.3.9 --no-update
Attempted to update those specific dependencies.
composer update friendsofphp/php-cs-fixer lusitanian/oauth magento/magento2-functional-testing-framework pdepend/pdepend phpmd/phpmd phpunit/phpunit sebastian/phpcpd squizlabs/php_codesniffer
( also tried appending--with-all-dependencies
)A conflict notification was presented, which attempted to install every satisfiable version of
symfony/options-resolver
, which Composer was unable to successfully do.symfony/options-resolver
, with the version constraint required byfriendsofphp/php-cs-fixer
could not be installed. I found that it is due tomsp/twofactorauth
requiringendroid/qr-code
, which then led tosymfony/options-resolver:2.8.49
being installed, as at the time ofmsp/twofactorauth
being included,friendsofphp/php-cs-fixer
wasn't present ( nor was anything else in the codebase present which requiredsymfony/options-resolver
) and therefore Composer didn't pull in a version that satisfied the requirements for bothmsp/twofactorauth
andfriendsofphp/php-cs-fixer
.Final Solution
Deleted the existing
composer.lock
file in the codebase.rm -f composer.lock
Just let Composer "figure it out" by resolving all the dependencies again, which now included
friendsofphp/php-cs-fixer
and it's requirements, namelysymfony/options-resolver
.composer install
Feedback Loop
If there's a more desirable approach to solving this problem, please let me know and I'll take action on that, but by looking at this commit, I figured that making an update to the entire codebase's dependencies, based on the configured version constraints, wasn't going to be a problem.