Skip to content

Conversation

mglaman
Copy link
Owner

@mglaman mglaman commented Jul 13, 2022

Fixes #440

@mglaman mglaman merged commit a0afcb0 into main Jul 13, 2022
@mglaman mglaman deleted the gh440 branch July 13, 2022 15:52
@larowlan
Copy link
Contributor

This seems to be catching all uses of \Traversable and reporting them as deprecated, to be replaced with LazyRouteCollection

Return type of method Drupal\my_module\MyClass::getIterator() has  
         typehint with deprecated Traversable and is removed in Drupal 10. Use           
         \Drupal\Core\Routing\LazyRouteCollection instead.                               
         💡 Change record: https://www.drupal.org/node/3151009       

@larowlan
Copy link
Contributor

It also seems to be recommending using core's LazyRouteCollection over the symfony RouteCollection (not the symfony-cmf one, the symfony/routing one)

Return type of method                                                                 
         Drupal\my_module\EntityHandlers\MyRoutingProvider::getRoutes() has         
         typehint with deprecated Symfony\Component\Routing\RouteCollection and is removed in  
         Drupal 10. Use \Drupal\Core\Routing\LazyRouteCollection instead.                      
         💡 Change record: https://www.drupal.org/node/3151009 

@mglaman
Copy link
Owner Author

mglaman commented Jul 14, 2022

Oh crud. I need to improve the test coverage. The CR recommended the core route collection class

@mglaman
Copy link
Owner Author

mglaman commented Jul 14, 2022

@larowlan pushing hotfix patch release which switches to equals vs isSuperOf. This fixes the RouteCollection issue as well (\Symfony\Cmf\Component\Routing\LazyRouteCollection extends it, so superOf was yes.) Same with RouteProvider.

@larowlan
Copy link
Contributor

Thanks for the fast turnaround, cc @acbramley

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RouteObjectInterface does not exist in D10
2 participants