-
-
Notifications
You must be signed in to change notification settings - Fork 468
Phpunit 11 #2040
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
Phpunit 11 #2040
Conversation
$commandTester->getDisplay(), | ||
); | ||
|
||
restore_exception_handler(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still necessary? I thought we've fixed that. 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's sufficient to avoid the message in the commit message. If you have a better way, I'm interested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go with this instead symfony/symfony#53812 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, the http-kernel component changes its behavior based on the availability of symfony/runtime (as it knows symfony/runtime manages the error handler already anyway for non-test usage).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ostrolucky last time I tried that, it didn't work, but now it does. I must have messed up somehow.
PHPUnit 11 is not a fan of that: 1) Doctrine\Bundle\DoctrineBundle\Tests\DependencyInjection\Compiler\CacheCompatibilityPassTest::testCacheConfigUsingServiceDefinedByApplication Error: Typed property MockObject_Region_05946efc::$__phpunit_state must not be accessed before initialization /home/greg/dev/DoctrineBundle/vendor/doctrine/orm/src/Cache/DefaultCacheFactory.php:58 /tmp/sf_kernel_ba1be5d8f77bfc90137d39c20fb6e3be/var/cache/test/Container7B0Xppy/getDoctrine_Orm_DefaultConfigurationService.php:37 /tmp/sf_kernel_ba1be5d8f77bfc90137d39c20fb6e3be/var/cache/test/Container7B0Xppy/Doctrine_Bundle_DoctrineBundle_Tests_DependencyInjection_Fixtures_TestKernel_zxZtpVTestContainer.php:93 /tmp/sf_kernel_ba1be5d8f77bfc90137d39c20fb6e3be/var/cache/test/Container7B0Xppy/getDoctrine_Orm_DefaultEntityManagerService.php:25 /tmp/sf_kernel_ba1be5d8f77bfc90137d39c20fb6e3be/var/cache/test/Container7B0Xppy/getDoctrine_Orm_DefaultEntityManagerService.php:22 /home/greg/dev/DoctrineBundle/vendor/doctrine/orm/src/EntityManager.php:162 /home/greg/dev/DoctrineBundle/src/CacheWarmer/DoctrineMetadataCacheWarmer.php:37 /home/greg/dev/DoctrineBundle/vendor/symfony/framework-bundle/CacheWarmer/AbstractPhpFileCacheWarmer.php:41 /home/greg/dev/DoctrineBundle/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php:96 /home/greg/dev/DoctrineBundle/vendor/symfony/http-kernel/Kernel.php:520 /home/greg/dev/DoctrineBundle/vendor/symfony/http-kernel/Kernel.php:718 /home/greg/dev/DoctrineBundle/vendor/symfony/http-kernel/Kernel.php:120 /home/greg/dev/DoctrineBundle/tests/DependencyInjection/Compiler/CacheCompatibilityPassTest.php:80 Anyway, do not mock what you do not own ™️
d708b77
to
79c12b6
Compare
PHPUnit 11 warns about tests that involvke Symfony kernels: > Test code or tested code did not remove its own exception handlers See symfony/symfony#53812
79c12b6
to
c78a03b
Compare
No description provided.