Skip to content

Conversation

maff
Copy link
Contributor

@maff maff commented Sep 26, 2017

Starting from PHP 7.2, count(null) yields a warning (see https://3v4l.org/hbmpC).

Alternatively sortedRouters could be initialized as empty array and trigger a sort if count of sortedRouters differs from routers , but I don't know the exact background of this logic.

@dbu
Copy link
Member

dbu commented Sep 26, 2017

thank you for checking this and providing a fix! lets initialize in the property declaration with an empty array, its also what the add() method does to reset the sortedRouter field. can you please adjust the pull request accordingly?

@maff maff force-pushed the php7.2-count-routers branch from 2c1a744 to 27192b1 Compare September 26, 2017 16:56
@maff
Copy link
Contributor Author

maff commented Sep 26, 2017

Ah right, didn't see that in the add()method. PR is updated.

@dbu dbu merged commit a1532a9 into symfony-cmf:master Sep 27, 2017
@dbu
Copy link
Member

dbu commented Sep 27, 2017

thanks a lot. i will tag 2.0.2 with this today.

@dbu
Copy link
Member

dbu commented Sep 28, 2017

i now tagged.

i wanted to run the tests with php 7.2 too so we can be sure its alright, but unfortunately there is a failure in the dependencies that i have troubles figuring out. phpcr/phpcr-utils#174

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.

2 participants