Closed indytechcook closed 3 years ago
Pinned to Composer now in (internal) https://github.com/department-of-veterans-affairs/devops/pull/7853.
All of these Composer plugins will need to have their dependency on composer-plugin-api updated to 2.0 and refactored to use it in a PR on those upstreams. We can either wait for this or create the issues ourselves.
- cweagans/composer-patches is locked to version 1.6.7 and an update of this package was not requested.
- cweagans/composer-patches 1.6.7 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
Problem 2
- drupal-composer/drupal-scaffold is locked to version 2.6.1 and an update of this package was not requested.
- drupal-composer/drupal-scaffold 2.6.1 requires composer-plugin-api ^1.0.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
Problem 3
- mouf/nodejs-installer is locked to version v1.0.13 and an update of this package was not requested.
- mouf/nodejs-installer v1.0.13 requires composer-plugin-api ^1.0.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
Problem 4
- oomphinc/composer-installers-extender is locked to version v1.1.2 and an update of this package was not requested.
- oomphinc/composer-installers-extender v1.1.2 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
Problem 5
- provision-ops/yaml-tests is locked to version 1.9.0 and an update of this package was not requested.
- provision-ops/yaml-tests 1.9.0 requires composer-plugin-api ^1.1 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
Problem 6
- zaporylie/composer-drupal-optimizations is locked to version 1.1.2 and an update of this package was not requested.
- zaporylie/composer-drupal-optimizations 1.1.2 requires composer-plugin-api ^1.1 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
Problem 7
- drupal/console-extend-plugin is locked to version 0.9.4 and an update of this package was not requested.
- drupal/console-extend-plugin 0.9.4 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
Problem 8
- drupal/console-extend-plugin 0.9.4 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
- drupal/console 1.9.5 requires drupal/console-extend-plugin ~0 -> satisfiable by drupal/console-extend-plugin[0.9.4].
- drupal/console is locked to version 1.9.5 and an update of this package was not requested.
You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.
@cweagans released a Composer 2 compatible version of composer-patches as well, 1.7.0 > https://github.com/cweagans/composer-patches/issues/332#issuecomment-704430394 > https://github.com/cweagans/composer-patches/releases/tag/1.7.0.
drupal-composer/drupal-scaffold is deprecated and it says to use https://github.com/drupal/core-composer-scaffold now.
We are likely going to need to make a PR to https://packagist.org/packages/mouf/nodejs-installer as it is locked at composer-plugin-api 1.0.0 and hasn't seen an update for 2 years > https://github.com/thecodingmachine/nodejs-installer/blob/1.0/composer.json#L17.
Update: I created an upstream issue for the nodejs-installer. https://github.com/thecodingmachine/nodejs-installer/issues/41
oomphinc/composer-installers-extender does have a 2.0.0 release just made https://github.com/oomphinc/composer-installers-extender/blob/2.0.0/composer.json
yaml-tests will need to be updated to yaml-tasks (was in progress in #1303) as well, PR will need to be made > https://github.com/opendevshop/devshop/blob/1.x/src/DevShop/Component/YamlTasks/composer.json#L20
drupal-console-extend-plugin has a PR ready to merge for an update, tested and working.
https://github.com/hechoendrupal/drupal-console-extend-plugin/issues/23#issuecomment-718032212 https://github.com/hechoendrupal/drupal-console-extend-plugin/pull/25
So in summary the two that require actual work are:
I added all of these comments as task items and made this an epic, don't really know if each should be it's own story, but some of them definitely could be their own.
I created Composer v2 support PR for nodejs-installer and added it to this epic.
I created Create PR with composer2 support for yaml-tasks and added it to this epic.
nodejs-installer now supports composer2.
W00t! Thank you @acrollet!!
I assigned this to you just because you did some of the work. It is not meant to assign all the work to you though.
compser2 support has been added to yaml-tasks in 6c7d645336115fd8122126b6dbb1eeb210c5c5f9
Thanks for digging into this @acrollet. One other negative to add is that updating the library requires changes outside of our dependency management system (composer), which isn't a deal breaker but was a nice convenience.
Another is that we will also need to refactor in the way we pull in the .env file into the environment for tests to use.
Thanks for digging into this @acrollet. One other negative to add is that updating the library requires changes outside of our dependency management system (composer), which isn't a deal breaker but was a nice convenience.
Added to the summary above.
Another is that we will also need to refactor in the way we pull in the .env file into the environment for tests to use.
Hmm, can you expand on this? task
does have support for .env files fwiw
Hmm, can you expand on this?
task
does have support for .env files fwiw
Oh nice, would be good to add that to the Positives!
Seeing these warnings on a local composer install. Our composer.json has "optimize_autoloader: true` in it so this is running on all environments and will need to be addressed.
Generating optimized autoload files
Deprecation Notice: Class Symfony\Cmf\Component\Routing\PagedRouteCollectionTest located in ./docroot/vendor/symfony-cmf/routing/Tests/Routing/PagedRouteCollectionTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class Symfony\Cmf\Component\Routing\LazyRouteCollectionTest located in ./docroot/vendor/symfony-cmf/routing/Tests/Routing/LazyRouteCollectionTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class Symfony\Cmf\Component\Routing\Tests\Mapper\FieldMapEnhancerTest located in ./docroot/vendor/symfony-cmf/routing/Tests/Enhancer/FieldMapEnhancerTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class EasyRdf_Serialiser_JsonLd located in ./docroot/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/JsonLd_real.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class EasyRdf_Parser_JsonLd located in ./docroot/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/JsonLdImplementation.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class Drush\CommandFiles\Core\BrowseCommands located in ./docroot/vendor/drush/drush/lib/Drush/CommandFiles/core/browseCommands.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class Drupal\Example\Something\TestCase located in ./docroot/vendor/drupal/coder/coder_sniffer/Drupal/Test/Commenting/FileCommentUnitTest.12.inc does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class Drupal\random\bunny_hat\long\namingspace\wtf\still\going\strong\LongNamespace located in ./docroot/vendor/drupal/coder/coder_sniffer/Drupal/Test/good/drupal8/LongNamespace.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Baseline for composer v1 install, run on tugboat.
first run:
root@php:/var/lib/tugboat# rm -fr docroot/vendor; time composer install
real 0m58.573s
user 0m34.550s
sys 0m20.170s
second run:
root@php:/var/lib/tugboat# rm -fr docroot/vendor; time composer install
real 0m51.080s
user 0m31.402s
sys 0m18.710s
third run:
root@php:/var/lib/tugboat# rm -fr docroot/vendor; time composer install
real 0m49.234s
user 0m31.372s
sys 0m18.533s
composer v2 install, run on tugboat.
first run:
root@php:/var/lib/tugboat# rm -fr docroot/vendor; time composer install
real 0m52.640s
user 0m32.978s
sys 0m22.350s
second run:
root@php:/var/lib/tugboat# rm -fr docroot/vendor; time composer install
real 0m48.004s
user 0m32.402s
sys 0m22.482s
third run:
root@php:/var/lib/tugboat# rm -fr docroot/vendor; time composer install
real 0m48.064s
user 0m31.958s
sys 0m22.924s
Not a huge improvement, but every run was better than composer 1.
Not a huge improvement, but every run was better than composer 1.
The download of Drupal source code is probably at least 10-20 seconds of this and might normalize these two runs. We really need to remove that soon in #drupal in #4498.
Regarding this AC:
- [ ] Fix autoload errors saying some classes/dependencies won't autoload in Composer 2
Here are the current errors:
Class Symfony\Cmf\Component\Routing\Tests\Mapper\FieldMapEnhancerTest located in ./docroot/vendor/symfony-cmf/routing/Tests/Enhancer/FieldMapEnhancerTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Symfony\Cmf\Component\Routing\PagedRouteCollectionTest located in ./docroot/vendor/symfony-cmf/routing/Tests/Routing/PagedRouteCollectionTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Symfony\Cmf\Component\Routing\LazyRouteCollectionTest located in ./docroot/vendor/symfony-cmf/routing/Tests/Routing/LazyRouteCollectionTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Guzzle\Tests\Common\Cache\NullCacheAdapterTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Cache/NullCacheAdapterTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Parsers\UriTemplate\UriTemplateTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/UriTemplate/UriTemplateTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Parsers\UriTemplate\PeclUriTemplateTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/UriTemplate/PeclUriTemplateTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Parsers\UriTemplate\AbstractUriTemplateTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/UriTemplate/AbstractUriTemplateTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Common\AbstractHasAdapterTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/AbstractHasDispatcherTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Http\CommaAggregatorTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryAggregator/CommaAggregatorTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Http\PhpAggregatorTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryAggregator/PhpAggregatorTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Http\DuplicateAggregatorTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryAggregator/DuplicateAggregatorTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Plugin\Redirect\RedirectPluginTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/RedirectPluginTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Http\Message\HttpRequestFactoryTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/RequestFactoryTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Message\ResponseTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/ResponseTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Message\HeaderComparisonTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/HeaderComparisonTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Plugin\Redirect\StaticClientTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/StaticClientTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Service\Command\ConcreteClassFactoryTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/ConcreteClassFactoryTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Service\Command\AliasFactoryTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/AliasFactoryTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Service\Command\MapFactoryTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/MapFactoryTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Service\Command\ServiceDescriptionFactoryTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/ServiceDescriptionFactoryTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Service\Command\CompositeFactoryTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/CompositeFactoryTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Service\Command\VisitorFlyweightTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/VisitorFlyweightTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Service\ServiceBuilderTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Builder/ServiceBuilderTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Drush\CommandFiles\Core\BrowseCommands located in ./docroot/vendor/drush/drush/lib/Drush/CommandFiles/core/browseCommands.php does not comply with psr-0 autoloading standard. Skipping.
Class Drupal\random\bunny_hat\long\namingspace\wtf\still\going\strong\LongNamespace located in ./docroot/vendor/drupal/coder/coder_sniffer/Drupal/Test/good/drupal8/LongNamespace.php does not comply with psr-4 autoloading standard. Skipping.
Class Drupal\Example\Something\TestCase located in ./docroot/vendor/drupal/coder/coder_sniffer/Drupal/Test/Commenting/FileCommentUnitTest.12.inc does not comply with psr-4 autoloading standard. Skipping.
There was a previous error caused by easyrdf/easyrdf
that I resolved in https://github.com/department-of-veterans-affairs/va.gov-cms/pull/4599/commits/d3667fb6519c0542368e3d536f4ada6b850d6aa8
Of the remaining errors, all except the drush command error are caused by testing files, and should not affect the application. The drush error should be resolved when #4590 is merged, I'll follow up if not.
DevOps PR here > https://github.com/department-of-veterans-affairs/devops/pull/8669
Composer 2 app PR https://github.com/department-of-veterans-affairs/va.gov-cms/pull/4599 and devops PR https://github.com/department-of-veterans-affairs/devops/pull/8669 have been built and deployed successfully to https://test.dev.cms.va.gov/, no errors on the build or deploy.
CMS-TEST DEV (BRD) says:
bash-4.2$ /usr/local/bin/composer --version
Composer version 2.0.11 2021-02-24 14:57:23
Looks like tests failed as I still need to find/replace some things in devops/BRD. Might get to that tonight still but tomorrow morning is more likely.
Of the remaining errors, all except the drush command error are caused by testing files, and should not affect the application. The drush error should be resolved when #4590 is merged, I'll follow up if not.
Class Symfony\Cmf\Component\Routing\Tests\Mapper\FieldMapEnhancerTest located in ./docroot/vendor/symfony-cmf/routing/Tests/Enhancer/FieldMapEnhancerTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Symfony\Cmf\Component\Routing\PagedRouteCollectionTest located in ./docroot/vendor/symfony-cmf/routing/Tests/Routing/PagedRouteCollectionTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Symfony\Cmf\Component\Routing\LazyRouteCollectionTest located in ./docroot/vendor/symfony-cmf/routing/Tests/Routing/LazyRouteCollectionTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Guzzle\Tests\Common\Cache\NullCacheAdapterTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Cache/NullCacheAdapterTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Common\AbstractHasAdapterTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/AbstractHasDispatcherTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Message\HeaderComparisonTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/HeaderComparisonTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Http\Message\HttpRequestFactoryTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/RequestFactoryTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Http\CommaAggregatorTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryAggregator/CommaAggregatorTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Message\ResponseTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/ResponseTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Http\DuplicateAggregatorTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryAggregator/DuplicateAggregatorTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Plugin\Redirect\RedirectPluginTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/RedirectPluginTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Http\PhpAggregatorTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryAggregator/PhpAggregatorTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Plugin\Redirect\StaticClientTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/StaticClientTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Parsers\UriTemplate\PeclUriTemplateTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/UriTemplate/PeclUriTemplateTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Parsers\UriTemplate\AbstractUriTemplateTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/UriTemplate/AbstractUriTemplateTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Parsers\UriTemplate\UriTemplateTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/UriTemplate/UriTemplateTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Service\ServiceBuilderTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Builder/ServiceBuilderTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Service\Command\CompositeFactoryTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/CompositeFactoryTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Service\Command\AliasFactoryTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/AliasFactoryTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Service\Command\ConcreteClassFactoryTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/ConcreteClassFactoryTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Service\Command\ServiceDescriptionFactoryTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/ServiceDescriptionFactoryTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Service\Command\VisitorFlyweightTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/VisitorFlyweightTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Service\Command\MapFactoryTest located in ./docroot/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/MapFactoryTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Drupal\Example\Something\TestCase located in ./docroot/vendor/drupal/coder/coder_sniffer/Drupal/Test/Commenting/FileCommentUnitTest.12.inc does not comply with psr-4 autoloading standard. Skipping.
Class Drupal\random\bunny_hat\long\namingspace\wtf\still\going\strong\LongNamespace located in ./docroot/vendor/drupal/coder/coder_sniffer/Drupal/Test/good/drupal8/LongNamespace.php does not comply with psr-4 autoloading standard. Skipping.
Confirmed that the drush error is resolved.
Looks like tests failed as I still need to find/replace some things in devops/BRD. Might get to that tonight still but tomorrow morning is more likely.
Updated in https://github.com/department-of-veterans-affairs/va.gov-cms/issues/3303, testing now.
Upgrade Composer to Composer 2. Drupal 9 requires Composer 2 https://git.drupalcode.org/project/drupal/-/blob/9.1.x/composer.json#L21
See comments below for more details on each:
~switch to Composer 2 is not blocking Tugboat release on Demo envs.~ Tugboat released :tada: