Closed (duplicate)
Project:
Drupal core
Version:
8.9.x-dev
Component:
other
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
17 Oct 2018 at 13:57 UTC
Updated:
19 Feb 2020 at 07:48 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
catchIs this a duplicate of #2959269: [meta] Core should not trigger deprecated code except in tests and during updates?
Comment #3
mile23Re: #2: Not all deprecated code calls @trigger_error(), so we can't enforce with testing.
Comment #4
catchOK is there an issue for that or is the closest #2856742: [meta] Adopt trigger_error() for deprecation messages where it is missing ?
Comment #5
gábor hojtsy@catch re #2 I opened this because #2608062: [META] Requirements for tagging Drupal 9.0.0-alpha1 listed all these three issues as requirements for a section and they did not seem to be in an existing parent-children relationship and somewhat distinct. If that is not the case, we can repurpose one of those and close this :)
Comment #6
catchComment #7
mile23Here's a test where the failing results are classes marked @deprecated but which don't @trigger_error().
It requires symfony/finder. It has a bunch of limitations, and we shouldn't include this in core.
Limiting the discovery to the simpletest module, it shows output like this:
Lo and behold those files have deprecated classes which don't @trigger_error().
Uploading this now because it's dinner time and if I run against the full file system it will take all evening. :-)
Comment #8
mile23Really should have posted #8 in #2856744-11: [META] Add trigger_error(..., E_USER_DEPRECATED) to deprecated code
Comment #11
gábor hojtsyReparenting where this is actually listed as a requirement :)
Comment #12
gábor hojtsyComment #13
mpdonadioHow are global constants going to be enforced with testing, eg
This would only be a possible with a coverage report?
Comment #14
gábor hojtsy@mpdonadio: I think we accepted that that will not be testable at this time.
Comment #15
berdirI don't think there is anything left here except #2959269: [meta] Core should not trigger deprecated code except in tests and during updates, which is basically the same meta with the actual sub-issues, should we promote that and close this?
Comment #16
gábor hojtsyGreat! That one is already critical and has the Drupal 9.0.0-beta1 requirement tag. I'll replace this issue's mention in #3079680: [META] Requirements for tagging Drupal 9.0.0-beta1 with that to remove the indirection.