Skip to content

Don't call count on non countable object #23279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2017

Conversation

pierredup
Copy link
Contributor

Q A
Branch? 2.7
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets N/A
License MIT
Doc PR

From PHP 7.2, calling count on a non-countable object will emit a warning (https://wiki.php.net/rfc/counting_non_countables).
Based on the current test suit, this is the only place where I found this warning

@xabbuh xabbuh added this to the 2.7 milestone Jun 24, 2017
@xabbuh xabbuh added the Routing label Jun 24, 2017
@fabpot
Copy link
Member

fabpot commented Jun 24, 2017

Thank you @pierredup.

@fabpot fabpot merged commit 635bccd into symfony:2.7 Jun 24, 2017
fabpot added a commit that referenced this pull request Jun 24, 2017
This PR was merged into the 2.7 branch.

Discussion
----------

Don't call count on non countable object

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        |

From PHP 7.2, calling `count` on a non-countable object will emit a warning (https://wiki.php.net/rfc/counting_non_countables).
Based on the current test suit, this is the only place where I found this warning

Commits
-------

635bccd Dont call count on non countable object
@pierredup pierredup deleted the countable-on-non-countable branch June 24, 2017 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants