Closed (fixed)
Project:
JSON:API
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
27 Nov 2017 at 09:02 UTC
Updated:
12 Dec 2017 at 11:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
wim leersThe only solution for now is to explicitly express the expected deprecations for every test method, and marking the test as being
@group legacy.JSON API against 8.5 core has 17 fails. This should have zero.
Comment #3
wim leers#2926409: BaseFieldDefinition::setQueryable() is deprecated in Drupal 8.4.0 and #2926415: Request::isMethodSafe() is deprecated in Symfony 3.2/Drupal 8.4.0 were deprecation fixes that were actually fixable, but were made much harder to analyze due to this one.
Comment #5
e0ipsoWow! That's very inconvenient.
Is there an issue to track these issues in Drupal core? I have already seen people moving away from Drupal because things break between minor releases. Maybe I can help there.
Bumping priority since having green tests is very important to the project.
Comment #6
e0ipsoIs the patch in #2 supposed to come back green? From your comment I think so, but the testbot returned red.
Comment #7
e0ipsoComment #8
wim leersI linked to it in the IS: #2870194: Ensure that process-isolated tests can use Symfony's PHPunit bridge to catch usages of deprecated code and its related issues, and specifically #2607260: [meta] Core deprecation message introduction, contrib testing etc..
Comment #9
wim leersc/p fail
Wim--
Comment #10
wim leersTotally agree! Which is why I've been working to get it back to green all morning.
It comes back green on 8.5 (which is where the deprecation failures were occurring), but it comes back red on 8.4, because the expected deprecations don't actually occur there.
Which makes sense … but … it means it's currently impossible to have tests pass on both 8.4 and 8.5 :( :(
Comment #11
mile23Adding
@group legacywill turn off the fails due to deprecation errors.Adding
@expectedDeprecationwill fail the test if the deprecation error does not happen.You only need them both if you are testing whether the deprecation error occurs.
Comment #12
wim leersOh… but … testing locally, adding
@group legacystill causes failures. I only get no failures if I also add@expectedDeprecation.I guess I'm running tests wrong somehow?
Comment #13
wim leersLet's try #11 then.
Comment #14
wim leersOkay, that works. In the interest of getting JSON API's tests to green again, committing this right away. But this still fails for me locally :(
Comment #15
wim leersCrediting @Mile23.
Comment #17
wim leersComment #18
mile23After that commit, I see this:
I guess you should
composer installfor 8.5.x.Comment #19
wim leersAlex Pott pointed out that PHPStorm's "run tests" functionality overrides certain PHPUnit things, and that's probably why it didn't work for me.