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
In \Drupal\Core\Routing\UrlGenerator::__construct()
$this->provider = $provider;
Is a dynamic declaration
Proposed resolution
Declare and document the property
Remaining tasks
write patch
User interface changes
API changes
none
Data model changes
none
Comment | File | Size | Author |
---|---|---|---|
#5 | 2809801-5.patch | 507 bytes | ziomizar |
#5 | interdiff-2809801-2-5.txt | 550 bytes | ziomizar |
#2 | drupal-2809801.patch | 562 bytes | ziomizar |
Comments
Comment #2
ziomizar CreditAttribution: ziomizar at East Atlantic Engineering for East Atlantic Engineering commentedComment #3
ziomizar CreditAttribution: ziomizar at East Atlantic Engineering for East Atlantic Engineering commentedComment #4
pwolanin CreditAttribution: pwolanin as a volunteer commentedLooks mostly right, but I don't think we need to type hint both interfaces, only RouteProviderInterface becuase PreloadableRouteProviderInterface extends RouteProviderInterface and we never call the extra method \Drupal\Core\Routing\PreloadableRouteProviderInterface::preLoadRoutes() in this context.
Comment #5
ziomizar CreditAttribution: ziomizar at East Atlantic Engineering for East Atlantic Engineering commentedOhhh, I was looking at class RoutePreloader to see an example of that, in that class is used PreloadableRouteProviderInterface.
Comment #6
ziomizar CreditAttribution: ziomizar at East Atlantic Engineering for East Atlantic Engineering commentedComment #7
dawehnerLooks perfect
Comment #9
catchI added a note to the bc policy for public properties: https://www.drupal.org/node/2562903/revisions/view/10149671/10168259
Committed/pushed to 8.3.x, thanks!
This doesn't fix a bug, so not putting in 8.2.x
Comment #10
pwolanin CreditAttribution: pwolanin as a volunteer commentedok, so fixed then