Closed (fixed)
Project:
Drupal core
Version:
10.1.x-dev
Component:
routing system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
12 Oct 2017 at 14:40 UTC
Updated:
13 Mar 2023 at 20:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
wim leersComment #3
wim leersAFAICT this would be a BC breaking API change. I agree we should deprecate
non_lazy_route_filterandnon_lazy_route_enhancerthough. That means we're back to just the Symfony concepts:route_filterandroute_enhancerComment #4
wim leersI think we should also deprecate
\Drupal\Core\Routing\RouteFilterInterfaceand\Drupal\Core\Routing\Enhancer\RouteEnhancerInterface?Comment #5
dawehnerWell yeah that is the question of this issue, how do we deprecate that. I guess we could deprecate the interface by throwing
@trigger_errorand also throw an error somehow in some container subscriber,Comment #6
wim leers#2883680: Force all route filters and route enhancers to be non-lazy is in, we can now do this.
Comment #7
dawehnerMaybe we could do something like this ...
Comment #9
wim leersLooks good! 👍
8.5.0
Comment #10
dawehner@Wim Leers
Do you understand why the testbot doesn't work with this patch?
Comment #11
wim leersEh … wow. No. I've had this happen to me too. Seems like a random infra fail. Queued a new test.
Comment #12
dawehner@Wim Leers
I did the same earlier, so I guess something is wrong with that patch, here is the fix.
Comment #13
wim leersOnce these say
8.5.0, this is RTBC. Did that.Comment #14
catchI think we want to @deprecated the new methods in the docs as well here. I get a bit iffy on this when it's a bc layer rather than actual deprecated code, hence CNR rather than CNW.
Comment #15
dawehnerShould we mark the
@internal, then they would have never been part of any public api.Comment #16
xjmSo I think having a consistent way to deprecate routes and services and etc. is good. I think we could reuse the methods for any deprecated
routesroute filters and enhancers? And contrib could use it as well (so not necessarily internal either)?But for that, we'd presumably need to not hardcode the message (or have a list of messages).
Comment #17
dawehnerWouldn't contrib route filters and enhancers which were tagged as "non_lazy_..." execute those deprecations as well? I'm not 100% sure what you are referring to in terms of reusing.
Comment #18
wim leers#15++, for marking these
@internal. Perhaps also worth adding@todo Remove in Drupal 9.0.0for both?Like #17, I don't understand #16.
Comment #25
andypostComment #26
andypostRe-roll for 9.2.x and fix for deprecation format
Comment #27
catchStill not sure whether @internal vs @deprecated is best here (could probably be both too), however advantage of @deprecated is it's a signal that it's temporary code, whereas @internal is not.
So +1, also shame this got stuck for nearly four years!
Do we need a deprecation test here too?
Comment #28
andypostAs we no longer expect this code useful then it needs deprecation test
Comment #29
andypostHere's a test
Comment #33
joachim commentedLooks ok but the version numbers in deprecation notices need updating.
Comment #34
andypostI bet this does not fit in 9.5(
should be 10.1.0 and removed in 11.0.0
Comment #35
mrinalini9 commentedRerolled patch #29 for 10.1.x by addressing #34, please review it.
Comment #36
mrinalini9 commentedFixing custom commands failure issue in #35, please review it.
Comment #37
andypostLooks ready now, CR already exists
Comment #39
catchCommitted 8a993ae and pushed to 10.1.x. Thanks!
Comment #41
andypostFiled follow-up to remove forgotten TODO #3347712: Remove outdated todo to 2915772
and for 11.0 #3347710: [11.x] Remove deprecated non_lazy_route_enhancer and non_lazy_route_filter