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.
Problem/Motivation
grep parameters core/**/RouteProvider.php|grep -vF ' * '
public function getRouteByName($name, $parameters = array()) {
$routes = $this->getRoutesByNames(array($name), $parameters);
public function getRoutesByNames($names, $parameters = array()) {
Proposed resolution
Remove parameters? Make it do something?
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#14 | 2316537-14.patch | 84.51 KB | dawehner |
#9 | 2316537-9.patch | 86.01 KB | dawehner |
#9 | interdiff.txt | 838 bytes | dawehner |
Comments
Comment #1
Crell CreditAttribution: Crell commentedFrom RouteProviderInterface, in the Routing CMF vendor package:
It's a deprecated and not useful part of the interface. We can/should just ignore it.
Comment #2
chx CreditAttribution: chx commentedThey are not passed anywhere. Fix the doxygen or fix the code. You can't just ignore this, deprecated or not as long as it is there. The proper doxygen might be "DEPRECATED and doesn't do anything." silly as it is.
Comment #3
Crell CreditAttribution: Crell commentedThe interface and therefore the docblock are defined in Routing CMF. If you want to change the language of the docblock file a Pull Request here:
https://github.com/symfony-cmf/Routing
Comment #4
dawehnerHere comes the thing ...
Comment #5
dawehnermeh. it is probably rather that status.
Comment #7
lsmith77 CreditAttribution: lsmith77 commentedFYI .. Routing 1.3 will likely be released in September but this time there are not major changes expected:
https://github.com/symfony-cmf/Routing/compare/1.2.0...master
However there is an open unfinished PR to add a RangedRouteProviderInterface by Daniel Wehner:
https://github.com/symfony-cmf/Routing/pull/101
Comment #8
chx CreditAttribution: chx commentedTo understand why this is important: because this leads to the understanding that routs are 'bare' objects. If you pass in parameters you'd think (I wasn't sure!) that somehow the route has those parameters.
Comment #9
dawehnerWell, you sadly got moved to the wrong assumptions by that parameters. Technically having that combination (route name, parameters (and route))
is something which does not exist at a concept yet, neither in symfony/Routing nor in CMF. I could imagine though that it could
be really useful for those systems as well. Here is an issue in symfony to discuss it: https://github.com/symfony/symfony/issues/11642
We needed to fix some of our unit tests as well.
@chx
Given that I can understand that you might feel that I hijacked the issue, sorry in case.
@lsmith77
Ha, now you really want to force me getting that PR in :)
Comment #10
chx CreditAttribution: chx commentedNo, you didn't hijack the issue, I appreciate any solution to this.
> Technically having that combination (route name, parameters (and route)) is something which does not exist at a concept yet, neither in symfony/Routing nor in CMF.
But it does in Drupal, right?
Url
.Comment #11
dawehnerExactly, this is why I proposed that in the symfony issue as it is. The RouteMatch is a separate issue but certainly related.
Comment #12
Crell CreditAttribution: Crell commentedKeeping up with our upstream dependencies is always appropriate, IMO, regardless of parameters or not. Thanks, dawehner!
Comment #14
dawehnerReroll
Comment #15
alexpottCommitted c8bd0b4 and pushed to 8.0.x. Thanks!
Comment #17
chx CreditAttribution: chx commented*sigh*