-
Notifications
You must be signed in to change notification settings - Fork 75
Conversation
PHP 7.2 raise a deprecated message Parameter must be an array or an object that implements Countable I think this should not be hidden (count could take care of this), so this change declare the message as expected. A new test is added for object which are really countable
public function testCountable() | ||
{ | ||
$ar = new ArrayObject(new TestAsset\ArrayObjectObjectCount()); | ||
$this->assertEquals(42, $ar->count()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use assertCount
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a copy/paste from previous test, I don't want to do refactoring in a PR only design to fix a minor compatibility issue.
Feel free to open a separate PR if you really think this worth the work ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You add these new lines, so please use the correct method. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok.
No time for Bikeshedding.
public function testCountable() | ||
{ | ||
$ar = new ArrayObject(new TestAsset\ArrayObjectObjectCount()); | ||
$this->assertEquals(42, $ar->count()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You add these new lines, so please use the correct method. Thanks!
@remicollet |
PHP 7.2 raise a deprecated message
Parameter must be an array or an object that implements Countable
I think this should not be hidden (count could take care of this),
so this change declare the message as expected.
A new test is added for object which are really countable
Detected by Fedora QA with 7.2.0RC4
https://apps.fedoraproject.org/koschei/package/php-zendframework-zend-stdlib?collection=f28