Closed (fixed)
Project:
Drupal core
Version:
8.5.x-dev
Component:
phpunit
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
4 Jan 2018 at 11:56 UTC
Updated:
24 Jan 2018 at 19:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
alexpottHere's a test that is green when it shouldn't be. A similar test
\Drupal\FunctionalTests\Core\Test\PhpUnitBridgeTestshows that BrowserTestBase supports deprecation testing. So something is special about \Drupal\FunctionalTests\Update\UpdatePathTestBase().Comment #3
alexpottSo this looks like symfony fun... because changing the SYMFONY_DEPRECATIONS_HELPER to strict makes update path tests test deprecations again...
\Symfony\Bridge\PhpUnit\DeprecationErrorHandler::register() is determining that the deprecation error came from vendor and not from core :(
Comment #4
alexpottThe problem is the interaction between weak vendors and how Symfony's deprecation helper works for tests that run in a separate process.
Comment #6
alexpottCreated a PR to fix this in Symfony - https://github.com/symfony/symfony/pull/25685
Comment #7
alexpottNew symfony with the PR in has been released. It's working so this should fail. Hopefully there is only 1 fail.
Comment #9
alexpottSo yay that works... I think we should just make this issue about updating
symfony/phpunit-bridgesince that is where the bug lies. And then once #2916740: Add generic entity actions we fix all the update tests to be legacy tests and expected all the deprecations in #2934340: Remove action deprecations from DeprecationListenerTrait::getSkippedDeprecationsComment #10
alexpottComment #11
chr.fritschShouldn't we add the failing test from #7 to the current patch plus a setExpectedException?
Comment #12
alexpott@chr.fritsch nope - because if you set the expected deprecation it would work in HEAD. This is because the deprecation would be caught by yet another error handler (
\Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerTrait::handleError()). So it would prove nothing :( And we can't add a failing test.Comment #13
dawehnerThanks a lot to the symfony community having such a fast process to fix issues, seriously!
This is interesting ...
Comment #14
wim leers@alexpott: wow — thank you so much for your continued diligence and upstream PRs to fix problems before they even become problems for the Drupal community!
:)
Comment #16
catchCommitted d1e91cb and pushed to 8.5.x. Thanks!
Comment #17
wim leers#2858482: Simplify REST routing: disallow requesting POST/PATCH in any format, make consistent was green and RTBC for >1 week. It failed just now. It looks like this change probably caused it to start failing… any help would be greatly appreciated :(
Comment #18
alexpott#17 was just a missing fullstop in the skipped deprecation messages added by the patch. This patch correctly fixed deprecation error handling.
Comment #19
wim leers… and @alexpott filed two PRs due to this:
🎉
Thank you so much, @alexpott!
EDIT: looks like both of those PRs will ship with Symfony 3.4!