symfony-cmf / Routing

Routing component building on the Symfony Routing component
Other
288 stars 69 forks source link

Make ChainRouter work with PHP 7.2 #203

Closed dkreuer closed 7 years ago

dkreuer commented 7 years ago

Currently the chain router fails in symfony context with

In ChainRouter.php line 101:

  [Symfony\Component\Debug\Exception\ContextErrorException]                            
  Warning: count(): Parameter must be an array or an object that implements Countable

This is because the sortedRouters property is not initialized.

The change proposes to take the not initialized property into account while fetching all routes.

dbu commented 7 years ago

this has been fixed in #200 already. i then wanted to actually test that everything works with php 7.2 before tagging a release, but got sidetracked by things not working in one of the phpcr dependencies. (https://github.com/phpcr/phpcr-utils/pull/174 if you are curious). as that problem is not trivial to figure out, and we already claim to be compatible with php 7.2, i will just tag 2.0.2 now as its definitely an improvement.

dbu commented 7 years ago

2.0.2 is now tagged

dkreuer commented 7 years ago

Thank you very much.