Problem/Motivation

While using core from git (core development) I'm getting following deprecation warnings with new 1.10 RC

core8$ php composer.phar -V
Composer version 1.10.0-RC 2020-02-14 15:11:30

core8$ php composer.phar install -o
> Drupal\Composer\Composer::ensureComposerVersion
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating optimized autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
Warning: Ambiguous class resolution, "Drupal\Composer\Plugin\ProjectMessage\Message" was found in both "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core-project-message/Message.php" and "/Users/alex/dev/sites/drupal8alt.dev/composer/Plugin/ProjectMessage/Message.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Composer\Plugin\ProjectMessage\MessagePlugin" was found in both "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core-project-message/MessagePlugin.php" and "/Users/alex/dev/sites/drupal8alt.dev/composer/Plugin/ProjectMessage/MessagePlugin.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Composer\Plugin\VendorHardening\FileSecurity" was found in both "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core-vendor-hardening/FileSecurity.php" and "/Users/alex/dev/sites/drupal8alt.dev/composer/Plugin/VendorHardening/FileSecurity.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Composer\Plugin\VendorHardening\Config" was found in both "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core-vendor-hardening/Config.php" and "/Users/alex/dev/sites/drupal8alt.dev/composer/Plugin/VendorHardening/Config.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Composer\Plugin\VendorHardening\VendorHardeningPlugin" was found in both "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core-vendor-hardening/VendorHardeningPlugin.php" and "/Users/alex/dev/sites/drupal8alt.dev/composer/Plugin/VendorHardening/VendorHardeningPlugin.php", the first w...
...

Proposed resolution

Discover incompatibility and fix

Remaining tasks

tbd

User interface changes

no

API changes

no

Data model changes

no

Release notes snippet

Drupal 9.4.4 removed the 'replace' section from core's composer.json for core modules. However, the 'replace' information for core components was accidentally removed at the same time, which resulted in Composer warnings. The 'replace' information for core components has been restored, which should resolve these warnings.

Issue fork drupal-3116405

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

andypost created an issue. See original summary.

andypost’s picture

Issue summary: View changes

Fixed IS with deprecations only

andypost’s picture

Issue summary: View changes

added command

andypost’s picture

Issue summary: View changes

added exact version

alexpott’s picture

I'm guessing you got this by running composer install -o to create an optimised class loader. This shows us that Drupal\coder and easyrdf/easyrdf need to fix themselves but as far as I can see code doesn't need to do anything.

I'm this should be moved the the drupal/coder project for them to fix.

alexpott’s picture

Ah I see core needs to fix this...

Warning: Ambiguous class resolution, "Drupal\Composer\Plugin\ProjectMessage\Message" was found in both "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core-project-message/Message.php" and "/Users/alex/dev/sites/drupal8alt.dev/composer/Plugin/ProjectMessage/Message.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Composer\Plugin\ProjectMessage\MessagePlugin" was found in both "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core-project-message/MessagePlugin.php" and "/Users/alex/dev/sites/drupal8alt.dev/composer/Plugin/ProjectMessage/MessagePlugin.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Composer\Plugin\VendorHardening\FileSecurity" was found in both "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core-vendor-hardening/FileSecurity.php" and "/Users/alex/dev/sites/drupal8alt.dev/composer/Plugin/VendorHardening/FileSecurity.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Composer\Plugin\VendorHardening\Config" was found in both "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core-vendor-hardening/Config.php" and "/Users/alex/dev/sites/drupal8alt.dev/composer/Plugin/VendorHardening/Config.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Composer\Plugin\VendorHardening\VendorHardeningPlugin" was found in both "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core-vendor-hardening/VendorHardeningPlugin.php" and "/Users/alex/dev/sites/drupal8alt.dev/composer/Plugin/VendorHardening/VendorHardeningPlugin.php", the first w
andypost’s picture

alexpott’s picture

So I think there are three issues here:

  1. Easyrdf - in D9 this is a dev only dependency and one we're trying to rid ourselves of
  2. drupal/coder - we should check their issue queue - this might need to change phpcs versions - and be a v big change.
  3. core - and the new warning about Ambiguous class resolution

I think we should only focus on the third issue here and ensure an issue for 2 exists. The easyrdf issue exists already, #3110972: Update easyrdf library to 1.0.0

Ah xpost with #7 so we just have drupal/coder to sort out...

andypost’s picture

andypost’s picture

alexpott’s picture

Ah just tested #3075954: Remove duplicate scaffold files it doesn't fix this at all. It's not about the duplicate code it is about the duplicate scaffold files like .htaccess etc..

alexpott’s picture

andypost’s picture

mile23’s picture

Status: Active » Needs review
StatusFileSize
new5.05 KB
new7.26 KB

I don't see any fails on the Template group locally, but let's try the testbot and see what happens.

I did get PHPUnit 9 deprecation warnings in both tests, but we'll deal with some of that in #3116856: Workaround PHPUnit 8 warnings:

There were 2 warnings:

1) Drupal\BuildTests\Composer\Template\ComposerProjectTemplatesTest::testTemplateCreateProject with data set "recommended-project" ('drupal/recommended-project', 'composer/Template/RecommendedProject', '/web')
Using assertContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringContainsString() or assertStringContainsStringIgnoringCase() instead.

2) Drupal\BuildTests\Composer\Template\ComposerProjectTemplatesTest::testTemplateCreateProject with data set "legacy-project" ('drupal/legacy-project', 'composer/Template/LegacyProject', '')
Using assertContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringContainsString() or assertStringContainsStringIgnoringCase() instead.
alexpott’s picture

@mile23 it doesn't fail. You get the following warnings when you use the optimised autoloader. I.e when you a command like composer install -o. Note as far as I know we never install on DrupalCI using the optimised autoloader so you're not going to see the warning there.

Status: Needs review » Needs work

The last submitted patch, 14: 3116405_14_2.0_TEST_ONLY.patch, failed testing. View results

alexpott’s picture

Issue summary: View changes

The warning happens because we have both

  • composer/Plugin/ProjectMessage/Message.php
  • vendor/drupal/core-project-message/Message.php

which map to the same namespace so when optimising the classloader compsoer has to choose.

Fixing issue summary because it's not showing the important bit for core at all.

mile23’s picture

Since the issue is scoped for 1.10, it falls a little outside, but the fail in #14 looks like this, which is a real thing that needs its own followup:

    - drupal/core-composer-scaffold 9.0.x-dev requires composer-plugin-api ^1.0.0 -> found composer-plugin-api[2.0.0] but it does not match your constraint.
andypost’s picture

fgm’s picture

We also have releated issues about autoloading. This was initially (?) mentioned in https://www.drupal.org/project/coder/issues/3116414

Core-introduced classes affected are:

  • Symfony\Cmf\Component\Routing\Tests\Mapper\FieldMapEnhancerTest
  • Symfony\Cmf\Component\Routing\PagedRouteCollectionTest
  • Symfony\Cmf\Component\Routing\LazyRouteCollectionTest
  • EasyRdf_Serialiser_JsonLd
  • EasyRdf_Parser_JsonLd

This causes messages like Deprecation Notice: Class EasyRdf_Serialiser_JsonLd located in ./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 <project>/vendor/composer/composer/src/Composer/Autoload/ClassMapGenerator.php:201

fgm’s picture

greg.1.anderson’s picture

Composer 2 testing continued in #3126566: Allow Drupal to work with Composer 2

xjm’s picture

Version: 9.0.x-dev » 8.9.x-dev
Priority: Normal » Critical

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

greg.1.anderson’s picture

Title: Composer 1.10 compatibility » Allow use of optimized autoload file with Composer 1.10 / Composer 2

Updated title to clarify that the changes in this patch are orthogonal to #3126566: Allow Drupal to work with Composer 2.

alexpott’s picture

Priority: Critical » Major

I'm not sure this issue is critical has this is about dealing with warnings generated when using the optimised autoloader whereas #3126566: Allow Drupal to work with Composer 2 is dealing with Composer 2 compatibility (which does feel critical). Tentatively making a major task as even through the system is emitting warnings under these circumstances nothing is actually broken.

daffie’s picture

Issue tags: +Needs reroll

Composer 1.10.5 has already been released. See: https://github.com/composer/composer/releases/tag/1.10.5.

sahana _n’s picture

Status: Needs work » Needs review
StatusFileSize
new1.93 KB

Rerolled patch #14 Please review the patch.

jofitz’s picture

Status: Needs review » Needs work
Issue tags: -Needs reroll
StatusFileSize
new31.54 KB
new39.06 KB

Rerolled Test Only patches from #14.

Leaving status as NW because the (expected) test failures for Composer 2.0 will need to be addressed.

Patches are noticeably larger, mainly due to #3127918: Add funding info in composer.lock - should those changes be excluded from these patches?

hardik_patel_12’s picture

Assigned: Unassigned » hardik_patel_12
hardik_patel_12’s picture

Assigned: hardik_patel_12 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new31 KB

Solving test case for 1.10.

hardik_patel_12’s picture

StatusFileSize
new30.49 KB

Kindly follow a new patch.

andypost’s picture

Status: Needs review » Needs work

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

andypost’s picture

Issue tags: +Needs reroll
meenakshig’s picture

Assigned: Unassigned » meenakshig
mile23’s picture

I can't repro.

meenakshig’s picture

Assigned: meenakshig » Unassigned
alexpott’s picture

Title: Allow use of optimized autoload file with Composer 1.10 / Composer 2 » Warnings generated when using an optimized autoload file with Composer 1.10 / Composer 2

So yeah this issue has been fixed for 9.1.x and 9.2.x - the warnings no longer occur. However, we have a new warning introduced by composer 2.0.9 that was not there in 2.0.8 :(

When I run composer install -o I get

Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Component/DependencyInjection/Container.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Component/FileCache/FileCacheFactory.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Component/Utility/Timer.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Component/Utility/Unicode.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Core/Cache/Cache.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Core/Cache/CacheBackendInterface.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Core/Cache/CacheTagsChecksumInterface.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Core/Cache/CacheTagsChecksumTrait.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Core/Cache/CacheTagsInvalidatorInterface.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Core/Cache/DatabaseBackend.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Core/Cache/DatabaseCacheTagsChecksum.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Core/Database/Connection.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Core/Database/Database.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Core/Database/Statement.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Core/Database/StatementInterface.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Core/DependencyInjection/Container.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Core/DrupalKernel.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Core/DrupalKernelInterface.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Core/Installer/InstallerRedirectTrait.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/Users/alex/dev/sites/drupal8alt.dev/vendor/drupal/core/lib/Drupal/Core/Site/Settings.php" which does not appear to be a file nor a folder

Composer appears to be looking in the wrong location for static site map :(

This does not happen on Composer 1 or Composer 2.0.8 - going to look in the upstream issues.

alexpott’s picture

Oh damn #39 is for all composer installs on 2.0.9 and not just optimised ones.

it-cru’s picture

I also get some more deprecation warnings from my composer 1 to 2 switch with Drupal core 8.9.13.

Deprecation Notice: Class Symfony\Cmf\Component\Routing\Tests\Mapper\FieldMapEnhancerTest located in ./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 Symfony\Cmf\Component\Routing\PagedRouteCollectionTest located in ./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 ./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 EasyRdf_Serialiser_JsonLd located in ./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 ./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

Don't know if this is also a problem for Drupal core 9.x.x or higher, but it seems that this breaks my feed imports from aggregator core module. I. don't know why, because I haven't found any usage of easyrdf in aggregator module. But maybe it is only to late...

This was already reported here: https://www.drupal.org/project/drupal/issues/3126566#comment-13555597

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

rivimey’s picture

Dropped in to say there is a (new? to me at least) problem in D9.4.4. I don't know if this represents a bug (in the sense something will go wrong) or just that there is a literally duplicate file set - would be helpful to know. It does look like drupal/core-utility has been installed twice, once in web/core/ and once in vendor/. The site has just been updated to D9.4.4 from 9.4.3 using composer.

$ sudo composer self-update
Upgrading to version 2.3.10 (stable channel).
   
Use composer self-update --rollback to return to version 2.3.9
$ composer update --no-dev
Gathering patches for root package.
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file
Nothing to install, update or remove
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Package webmozart/path-util is abandoned, you should avoid using it. Use symfony/filesystem instead.
Generating optimized autoload files
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Timer" was found 2x: in "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/Timer.php" and "$DOCROOT/www/vendor/drupal/core-utility/Timer.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Unicode" was found 2x: in "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/Unicode.php" and "$DOCROOT/www/vendor/drupal/core-utility/Unicode.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Color" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/Color.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/Color.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\OpCodeCache" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/OpCodeCache.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/OpCodeCache.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Bytes" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/Bytes.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/Bytes.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Html" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/Html.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/Html.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\ArgumentsResolver" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/ArgumentsResolver.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/ArgumentsResolver.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Xss" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/Xss.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/Xss.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Crypt" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/Crypt.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/Crypt.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Variable" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/Variable.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/Variable.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Environment" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/Environment.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/Environment.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\UrlHelper" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/UrlHelper.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/UrlHelper.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\NestedArray" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/NestedArray.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/NestedArray.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\SortArray" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/SortArray.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/SortArray.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\ArgumentsResolverInterface" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/ArgumentsResolverInterface.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/ArgumentsResolverInterface.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Reflection" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/Reflection.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/Reflection.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\UserAgent" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/UserAgent.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/UserAgent.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\DiffArray" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/DiffArray.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/DiffArray.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Random" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/Random.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/Random.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\DeprecatedArray" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/DeprecatedArray.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/DeprecatedArray.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Mail" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/Mail.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/Mail.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\ToStringTrait" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/ToStringTrait.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/ToStringTrait.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Rectangle" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/Rectangle.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/Rectangle.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Tags" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/Tags.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/Tags.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\EmailValidator" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/EmailValidator.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/EmailValidator.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Image" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/Image.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/Image.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Number" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/Number.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/Number.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\EmailValidatorInterface" was found 2x: in "$DOCROOT/www/vendor/drupal/core-utility/EmailValidatorInterface.php" and "$DOCROOT/www/web/core/lib/Drupal/Component/Utility/EmailValidatorInterface.php", the first will be used.
51 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Scaffolding files for pantheon-systems/drupal-integrations:
  - Skip [web-root]/sites/default/settings.php because it already exists and overwrite is false.
> DrupalProject\composer\ScriptHandler::createRequiredFiles

eduardo morales alberti’s picture

Any update?
Warnings after update on drupal 9.4.4 and PHP 8.1:

wodby@php.container:/var/www/html $ composer dump-autoload -o
Generating optimized autoload files
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Timer" was found 2x: in "/var/www/html/docroot/core/lib/Drupal/Component/Utility/Timer.php" and "/var/www/html/vendor/drupal/core-utility/Timer.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Unicode" was found 2x: in "/var/www/html/docroot/core/lib/Drupal/Component/Utility/Unicode.php" and "/var/www/html/vendor/drupal/core-utility/Unicode.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Number" was found 2x: in "/var/www/html/vendor/drupal/core-utility/Number.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/Number.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\EmailValidatorInterface" was found 2x: in "/var/www/html/vendor/drupal/core-utility/EmailValidatorInterface.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/EmailValidatorInterface.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Tags" was found 2x: in "/var/www/html/vendor/drupal/core-utility/Tags.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/Tags.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Html" was found 2x: in "/var/www/html/vendor/drupal/core-utility/Html.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/Html.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Random" was found 2x: in "/var/www/html/vendor/drupal/core-utility/Random.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/Random.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\ArgumentsResolverInterface" was found 2x: in "/var/www/html/vendor/drupal/core-utility/ArgumentsResolverInterface.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/ArgumentsResolverInterface.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Rectangle" was found 2x: in "/var/www/html/vendor/drupal/core-utility/Rectangle.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/Rectangle.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\SortArray" was found 2x: in "/var/www/html/vendor/drupal/core-utility/SortArray.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/SortArray.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Xss" was found 2x: in "/var/www/html/vendor/drupal/core-utility/Xss.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/Xss.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\OpCodeCache" was found 2x: in "/var/www/html/vendor/drupal/core-utility/OpCodeCache.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/OpCodeCache.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\DiffArray" was found 2x: in "/var/www/html/vendor/drupal/core-utility/DiffArray.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/DiffArray.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\ArgumentsResolver" was found 2x: in "/var/www/html/vendor/drupal/core-utility/ArgumentsResolver.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/ArgumentsResolver.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\DeprecatedArray" was found 2x: in "/var/www/html/vendor/drupal/core-utility/DeprecatedArray.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/DeprecatedArray.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Color" was found 2x: in "/var/www/html/vendor/drupal/core-utility/Color.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/Color.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\UserAgent" was found 2x: in "/var/www/html/vendor/drupal/core-utility/UserAgent.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/UserAgent.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\UrlHelper" was found 2x: in "/var/www/html/vendor/drupal/core-utility/UrlHelper.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/UrlHelper.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Crypt" was found 2x: in "/var/www/html/vendor/drupal/core-utility/Crypt.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/Crypt.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Mail" was found 2x: in "/var/www/html/vendor/drupal/core-utility/Mail.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/Mail.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Environment" was found 2x: in "/var/www/html/vendor/drupal/core-utility/Environment.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/Environment.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Image" was found 2x: in "/var/www/html/vendor/drupal/core-utility/Image.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/Image.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Variable" was found 2x: in "/var/www/html/vendor/drupal/core-utility/Variable.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/Variable.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\EmailValidator" was found 2x: in "/var/www/html/vendor/drupal/core-utility/EmailValidator.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/EmailValidator.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\NestedArray" was found 2x: in "/var/www/html/vendor/drupal/core-utility/NestedArray.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/NestedArray.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Bytes" was found 2x: in "/var/www/html/vendor/drupal/core-utility/Bytes.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/Bytes.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Utility\ToStringTrait" was found 2x: in "/var/www/html/vendor/drupal/core-utility/ToStringTrait.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Utility/ToStringTrait.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Render\PlainTextOutput" was found 2x: in "/var/www/html/vendor/drupal/core-render/PlainTextOutput.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Render/PlainTextOutput.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Render\FormattableMarkup" was found 2x: in "/var/www/html/vendor/drupal/core-render/FormattableMarkup.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Render/FormattableMarkup.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Render\HtmlEscapedText" was found 2x: in "/var/www/html/vendor/drupal/core-render/HtmlEscapedText.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Render/HtmlEscapedText.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Render\MarkupInterface" was found 2x: in "/var/www/html/vendor/drupal/core-render/MarkupInterface.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Render/MarkupInterface.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Render\OutputStrategyInterface" was found 2x: in "/var/www/html/vendor/drupal/core-render/OutputStrategyInterface.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Render/OutputStrategyInterface.php", the first will be used.
Warning: Ambiguous class resolution, "Drupal\Component\Render\MarkupTrait" was found 2x: in "/var/www/html/vendor/drupal/core-render/MarkupTrait.php" and "/var/www/html/docroot/core/lib/Drupal/Component/Render/MarkupTrait.php", the first will be used.

Fatal error:

Fatal error: During inheritance of JsonSerializable: Uncaught Error: Class "Drupal\Component\Render\FormattableMarkup" not found in /var/www/html/docroot/core/includes/errors.inc:255 Stack trace: #0 /var/www/html/docroot/core/includes/errors.inc(83): _drupal_log_error() #1 /var/www/html/docroot/core/includes/bootstrap.inc(347): _drupal_error_handler_real() #2 /var/www/html/vendor/drupal/core-render/FormattableMarkup.php(61): _drupal_error_handler() #3 /var/www/html/vendor/composer/ClassLoader.php(571): include('...') #4 /var/www/html/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile() #5 /var/www/html/docroot/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php(21): Composer\Autoload\ClassLoader->loadClass() #6 /var/www/html/vendor/composer/ClassLoader.php(571): include('...') #7 /var/www/html/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile() #8 /var/www/html/docroot/core/lib/Drupal/Core/Annotation/Translation.php(84): Composer\Autoload\ClassLoader->loadClass() #9 /var/www/html/docroot/core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php(796): Drupal\Core\Annotation\Translation->__construct() #10 /var/www/html/docroot/core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php(1011): Drupal\Component\Annotation\Doctrine\DocParser->Annotation() #11 /var/www/html/docroot/core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php(1063): Drupal\Component\Annotation\Doctrine\DocParser->PlainValue() #12 /var/www/html/docroot/core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php(993): Drupal\Component\Annotation\Doctrine\DocParser->FieldAssignment() #13 /var/www/html/docroot/core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php(860): Drupal\Component\Annotation\Doctrine\DocParser->Value() #14 /var/www/html/docroot/core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php(835): Drupal\Component\Annotation\Doctrine\DocParser->Values() #15 /var/www/html/docroot/core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php(746): Drupal\Component\Annotation\Doctrine\DocParser->MethodCall() #16 /var/www/html/docroot/core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php(640): Drupal\Component\Annotation\Doctrine\DocParser->Annotation() #17 /var/www/html/docroot/core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php(338): Drupal\Component\Annotation\Doctrine\DocParser->Annotations() #18 /var/www/html/docroot/core/lib/Drupal/Component/Annotation/Doctrine/SimpleAnnotationReader.php(101): Drupal\Component\Annotation\Doctrine\DocParser->parse() #19 /var/www/html/docroot/core/lib/Drupal/Component/Annotation/Doctrine/SimpleAnnotationReader.php(125): Drupal\Component\Annotation\Doctrine\SimpleAnnotationReader->getClassAnnotations() #20 /var/www/html/docroot/core/lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotatedClassDiscovery.php(145): Drupal\Component\Annotation\Doctrine\SimpleAnnotationReader->getClassAnnotation() #21 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php(116): Drupal\Component\Annotation\Plugin\Discovery\AnnotatedClassDiscovery->getDefinitions() #22 /var/www/html/docroot/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(175): Drupal\Core\Entity\EntityTypeManager->findDefinitions() #23 /var/www/html/docroot/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php(22): Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() #24 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php(132): Drupal\Core\Plugin\DefaultPluginManager->getDefinition() #25 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php(253): Drupal\Core\Entity\EntityTypeManager->getDefinition() #26 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php(192): Drupal\Core\Entity\EntityTypeManager->getHandler() #27 /var/www/html/docroot/modules/contrib/simple_oauth/src/Normalizer/UserClaimsNormalizer.php(57): Drupal\Core\Entity\EntityTypeManager->getStorage() #28 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(262): Drupal\simple_oauth\Normalizer\UserClaimsNormalizer->__construct() #29 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(452): Drupal\Component\DependencyInjection\Container->createService() #30 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(465): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() #31 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(240): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() #32 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService() #33 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\Component\DependencyInjection\Container->get() #34 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(240): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() #35 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService() #36 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\Component\DependencyInjection\Container->get() #37 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(240): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() #38 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService() #39 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\Component\DependencyInjection\Container->get() #40 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(240): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() #41 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService() #42 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\Component\DependencyInjection\Container->get() #43 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(276): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() #44 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService() #45 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\Component\DependencyInjection\Container->get() #46 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(240): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() #47 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService() #48 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\Component\DependencyInjection\Container->get() #49 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(240): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() #50 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService() #51 /var/www/html/docroot/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(136): Drupal\Component\DependencyInjection\Container->get() #52 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(134): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() #53 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw() #54 /var/www/html/docroot/modules/contrib/simple_oauth/src/HttpMiddleware/BasicAuthSwap.php(67): Symfony\Component\HttpKernel\HttpKernel->handle() #55 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle() #56 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle() #57 /var/www/html/vendor/asm89/stack-cors/src/Asm89/Stack/Cors.php(49): Drupal\Core\StackMiddleware\KernelPreHandle->handle() #58 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Asm89\Stack\Cors->handle() #59 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() #60 /var/www/html/docroot/modules/contrib/http_headers_cleaner/src/Middleware/HttpHeadersCleanerMiddleware.php(52): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() #61 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\http_headers_cleaner\Middleware\HttpHeadersCleanerMiddleware->handle() #62 /var/www/html/docroot/core/lib/Drupal/Core/DrupalKernel.php(709): Stack\StackedHttpKernel->handle() #63 /var/www/html/docroot/index.php(19): Drupal\Core\DrupalKernel->handle() #64 {main} in /var/www/html/vendor/drupal/core-render/FormattableMarkup.php on line 61
mile23’s picture

It's a bit of a boggle why components are in both vendor/ and core/. They should only be in core/.

Did you try removing the vendor directory and then re-installing?

I can't repro.

parisek’s picture

My issue is all about outdated composer files in Drupal components https://www.drupal.org/project/drupal/issues/3272110 because I have custom module which has this dependency, but I don't kow why it happens after update to Drupal 9.4.4 (9.4.3 works fine)

@Eduardo Morales Alberti Try debug with "composer why drupal/core-utility"

spokje’s picture

because I have custom module which has this dependency,

@parisek: Is the dependency in a composer.json or a *.info.yml, and how is it defined?

mile23’s picture

The issue is:

Drupal core 9.4.4's core/composer.json removed the 'replace' sections for the components in #3292380: Remove the "replace" section from core/composer.json

9.4.3: https://git.drupalcode.org/project/drupal/-/blob/9.4.3/core/composer.json

9.4.4: https://git.drupalcode.org/project/drupal/-/blob/9.4.4/core/composer.json

This means that we end up using the files in the core directory, while also grabbing the dependencies split off from the monorepo.

The easiest solution for core is to add the replace section back for components and make a new release.

The bestest solution for core is to exclude components from the codebase of drupal/core, and do the full monorepo thing, but we currently don't have quite the QA level for that.

Adding #3272110: Drupal 9 and 10's Drupal\Component composer.json files are totally out of date as related so we get accurate dependencies for the components.

mile23’s picture

Category: Task » Bug report

Also this is a bug, because we shouldn't be installing components twice.

Thanks, Composer, for telling us there's a bug. :-)

mile23’s picture

Status: Needs work » Needs review

MR adds the components back to the replace section.

catch’s picture

Status: Needs review » Reviewed & tested by the community

Ahh that makes sense, overzealous in the other issue.

spokje’s picture

Version: 9.5.x-dev » 9.4.x-dev
Issue tags: -Needs reroll
StatusFileSize
new3.74 KB
spokje’s picture

StatusFileSize
new3.69 KB
spokje’s picture

StatusFileSize
new3.69 KB
spokje’s picture

Assigned: Unassigned » spokje
Status: Reviewed & tested by the community » Needs work

Lowered version to 9.4.x since there is where the "party" is starting.
Added gazillion patches for gazillion open dev-branches, since each patch differs on the composer.lock reference-SHA of drupal/core.

INSTA-EDIT: Just realized this needs a tad more, putting on NW and self-assigning

spokje’s picture

StatusFileSize
new6.07 KB
spokje’s picture

StatusFileSize
new5.88 KB
spokje’s picture

StatusFileSize
new5.88 KB
spokje’s picture

Status: Needs work » Needs review

- Added test-coverage.
- 10.0.x and 10.1.x don't have Component drupal/core-bridge any more.
- Recreated gazillion patches for gazillion open dev-branches.

spokje’s picture

Assigned: spokje » Unassigned
fgm’s picture

Same issue with drupal/core-utility when depending on https://www.drupal.org/project/drupalextension, which depends on https://github.com/jhedstrom/DrupalDriver which depends on core-utility. The issue is addressed there at https://github.com/jhedstrom/DrupalDriver/issues/249

quietone’s picture

Status: Needs review » Reviewed & tested by the community

This was RTBC'ed by catch and the @Spokje (thank you) made patches for various versions of Drupal. I downloaded that MR (which is against 9.5.x) and the patches and found only expected differences in the versions, such as the reference hash, asm89/stack-core version.

Therefor setting back to RTBC.

alexpott’s picture

Priority: Major » Critical

The fix looks great.

I reproduced the issue locally by:
1. Checking out Drupal 9.4.x
2. Do composer require drupal/core-utility
3. Do composer dump-autoload -o

I can confirm that after step 2 we have two copies of the core-utility code base - one in vendor and one in core. Given that have two codebases that composer can autoload is very confusing and potentially creating odd behaviour (which one would be patched?) I think this is a critical issue.

It's a bit odd that we've used 3116405 to fix a regression introduced by 292380 but the original issue this one was for has been resolved in Drupal 9 and the error is the same so I think fixing this here is okay.

Was going to rtbc but @quietone has beaten me to it so I'll commit... once I've worked out issue credit :)

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 2561a20 and pushed to 10.1.x. Thanks!
Committed ada3193 and pushed to 10.0.x. Thanks!
Committed 98deec0 and pushed to 9.5.x. Thanks!
Committed 594996c and pushed to 9.4.x. Thanks!

  • alexpott committed 2561a20 on 10.1.x
    Issue #3116405 by Spokje, Mile23, Hardik_Patel_12, jofitz, Sahana _N,...

  • alexpott committed ada3193 on 10.0.x
    Issue #3116405 by Spokje, Mile23, Hardik_Patel_12, jofitz, Sahana _N,...

  • alexpott committed 98deec0 on 9.5.x
    Issue #3116405 by Spokje, Mile23, Hardik_Patel_12, jofitz, Sahana _N,...

  • alexpott committed 594996c on 9.4.x
    Issue #3116405 by Spokje, Mile23, Hardik_Patel_12, jofitz, Sahana _N,...
xjm’s picture

xjm’s picture

Issue summary: View changes

Fixing the release note; this isn't actually about Composer 1.10 support anymore.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.