- 🇮🇹Italy mondrake 🇮🇹
Doesn't look likely this will be backported, so we'll have to rely on 📌 Update to Symfony 6.3 Fixed .
Playing around with service autowiring, I incurrred into
PHPUnit 9.5.26 by Sebastian Bergmann and contributors.
Testing Drupal\Tests\file_mdm_exif\Kernel\FileMetadataExifTest
ERE 3 / 3 (100%)E
Time: 00:01.383, Memory: 4.00 MB
There were 3 errors:
1) Drupal\Tests\file_mdm_exif\Kernel\FileMetadataExifTest::testExifPlugin
Error: Class "Symfony\Component\Config\Resource\ClassExistenceResource" not found
/var/www/html/vendor/symfony/dependency-injection/Compiler/AutowirePass.php:526
/var/www/html/vendor/symfony/dependency-injection/Compiler/AutowirePass.php:505
[...]
This happens when autowiring cannot determine a unique service to be injected as an argument. Which is an error, yes, but the error reported here is that symfony/config
is missing as a dependency (at least a dev one).
If I add the package to my codebase, I end up with a much better understandable error:
PHPUnit 9.5.26 by Sebastian Bergmann and contributors.
Testing Drupal\Tests\file_mdm_exif\Kernel\FileMetadataExifTest
ERE 3 / 3 (100%)E
Time: 00:02.070, Memory: 4.00 MB
There were 3 errors:
1) Drupal\Tests\file_mdm_exif\Kernel\FileMetadataExifTest::testExifPlugin
Symfony\Component\DependencyInjection\Exception\RuntimeException: Cannot autowire service "file_metadata_manager": argument "$logger" of method "Drupal\file_mdm\FileMetadataManager::__construct()" references interface "Psr\Log\LoggerInterface" but no such service exists. You should maybe alias this interface to one of these existing services: "logger.channel.default", "logger.channel.php", "logger.channel.image", "logger.channel.cron", "logger.channel.file", "logger.channel.form", "logger.channel.security", "logger.channel.system", "logger.channel.file_mdm".
/var/www/html/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php:51
/var/www/html/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php:80
/var/www/html/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php:29
/var/www/html/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php:44
/var/www/html/vendor/symfony/dependency-injection/Compiler/Compiler.php:73
[...]
Add symfony/config:^6.2
package to composer.json (at least in the dev section if not in the runtime one).
Closed: won't fix
10.1 ✨
Last updated
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Doesn't look likely this will be backported, so we'll have to rely on 📌 Update to Symfony 6.3 Fixed .