Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Follow-up to #2376791: Move all _content routing definitions to _controller.
This issue left in a bc layer for _content, in this issue we should
1. Remove it (to avoid having to maintain a backwards compatibility layer and its tests for 4-6 years - this is a real BC layer not a wrapper).
2. Figure out when the removal happens
3. Document the removal.
API changes:
_content no longer works in routing.yml, updating is a simple find and replace to _controller
Beta phase evaluation
Issue category | Task because we're removing an ambiguous way of defining a route, not adding new functionality. |
---|---|
Issue priority |
Critical because upcasting entities are broken for _content routes. Major because this would remove an unneeded bc layer (and already partially broken) that would we have to maintain for 3-6 years. Not critical because leaving in the code won't break anything. |
Prioritized changes | The main goal of this issue is to remove code that is not needed after #2376791: Move all _content routing definitions to _controller. This is followup to a major, so it is a prioritized change for the beta phase. |
Disruption |
|
Comment | File | Size | Author |
---|---|---|---|
#6 | 2377967-6.patch | 2.01 KB | dawehner |
Comments
Comment #1
catchFollow-up to #2376791: Move all _content routing definitions to _controller.
This issue left in a bc layer for _content, in this issue we should 1. Remove it 2. Figure out when the removal happens 3. Document the removal.
Comment #2
catchSo my personal view on this is we should go ahead and remove the bc layer sooner rather than later. An actual bc layer (as opposed to a wrapper) is real code we have to maintain for 3-6 years along with test coverage and while some contrib modules will have to upgrade their routing YAML it's a simple change to make.
Tagging D8 upgrade path since this will likely break an existing site without at minimum a route rebuild though.
Comment #3
Crell CreditAttribution: Crell commentedAgreed with #2. Fairly small pain now to save lots of ongoing pain for the next several years.
Comment #4
Wim Leers#2++
Comment #5
catchRemaining tasks:
Comment #6
dawehnerComment #7
Wim Leersdawehner++
Slightly refined the CR.
Comment #8
alexpottThere's a distinct lack of an issue summary :)
Comment #9
catchComment #10
catchComment #11
catchGuess who filled out the comment field instead of the issue summary field when posting #1 - fixed it.
Comment #12
webchickHave a poll going on Twitter about this atm: https://twitter.com/webchick/status/535450017134153728
Comment #13
webchickThe consensus so far from the internets is break it sooner than later. Since the change record just went up a few hours ago, maybe we'll hold off until Monday just to give people some time to update?
Comment #14
webchickActually I lied. :P The change record was there, but unpublished so just published https://www.drupal.org/node/2378809 now.
Comment #15
webchickHm. In writing up #2379243: Adjust for the _content -> _controller change in routing.yml files I'm wondering if right before beta4 is best. Committing it 2+ weeks out from the next D8 beta leaves modules in a tricky place, since there's no way to say "I now require HEAD" in your .info.yml file, and there's no stable release to peg it to. Basically, the only workaround I can think of is doing some kind of nasty pseudo-BC layer in every module that then needs to be ripped out in beta4.
Comment #16
alexpottThis issue is a major task. To evaluate whether we should make this change during the beta, we need to update the issue summary according to https://www.drupal.org/core/beta-changes to explain what improvements it makes and what the disruption of the change would be. Can someone add Drupal 8 beta phase evaluation template to the issue summary.
Comment #17
lokapujyaAdded the template.
Comment #18
lokapujyaComment #19
lokapujyaComment #20
lokapujyaComment #21
dawehnerGiven that change (its actually broken atm.) I would consider this as critical.
_content
no longer upcasts entities, I'm sorry for that :(Comment #22
dawehnerComment #23
dawehnerSets to needs review.
Comment #24
webchickI believe what's there is now sufficient. Tentatively moving back to RTBC.
Comment #25
alexpottThe general consensus is break sooner than later so... Committed 80d0419 and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation for to the issue summary.
Comment #27
jhodgdonWe need a follow-up issue to fix some documentation. Filed: #2381509: Fix docs for _content being _controller in routing.yml files