Problem/Motivation
We copied some of Doctrine's tests for DocParser and SimpleAnnotationReader to our codebase as part of #2631202: Doctrine no longer supports SimpleAnnotationReader, incorporate a solution into core but we forgot to update the use statements so we're still testing Doctrine's code and not ours.
Proposed resolution
- Update the use statements
- Remove tests of non-copied code
- Fix tests so static caches don't interfere with running all the tests by doing
./vendor/bin/phpunit -v -c ./core core/tests/Drupal/Tests/Component/Annotation
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3089530-2.patch | 3.25 KB | alexpott |
Comments
Comment #2
alexpottThis was discovered as part of #3086374: Make Drupal 8 & 9 compatible with PHP 7.4 where we fixed deprecations in our own DocParser but the tests were still triggering them (because they are using Doctrines).
Also fixing the ability to run all the Annotation tests together. Some of our existing tests have static caches that break tests.
Comment #3
alexpottWe've not copied the AnnotationReader so we don't need this test.
Comment #4
tedbowWhoops, sorry about that.
The changes look good
Confirm that without these you can't run
./vendor/bin/phpunit -v -c ./core core/tests/Drupal/Tests/Component/AnnotationComment #8
catchCommitted 7110eab and pushed to 9.0.x, cherry-picked back to 8.8.x. Thanks!