loopline-systems / closeio-api-wrapper

PHP Wrapper to use the Close.io API
MIT License
14 stars 15 forks source link

Fix for PHP 7.1 behavior when calling variable functions #67

Closed DaneEveritt closed 6 years ago

DaneEveritt commented 6 years ago

Fixes these notices and subsequent failure when initializing new Task()


PHP Notice:  Array to string conversion in /srv/www/inc/libraries/vendor/loopline-systems/closeio-api-wrapper/src/LooplineSystems/CloseIoApiWrapper/Library/ObjectHydrateHelperTrait.php on line 45

PHP Notice:  Undefined property: LooplineSystems\CloseIoApiWrapper\Model\Task::$Array in /srv/www/inc/libraries/vendor/loopline-systems/closeio-api-wrapper/src/LooplineSystems/CloseIoApiWrapper/Library/ObjectHydrateHelperTrait.php on line 45```
coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.2%) to 23.052% when pulling 8072d72b62b40521f5864b7acdb8723268822f36 on DaneEveritt:patch-1 into 4077a06cc555fbad0ed4a3dcf4ebe4901ca0604c on loopline-systems:develop.

mavimo commented 6 years ago

@DaneEveritt we plan to introduce support fo php 7.1 in release 0.8, in the meantime, since the code change is also valid for php 5.6 LGTM.

I add a small test to partially cover the ObjectHydrator trait that is cause of the issue, can you merge https://github.com/DaneEveritt/closeio-api-wrapper/pull/1 in your branch so we can have a single PR with all relevant changes? Thanks!

DaneEveritt commented 6 years ago

@mavimo Merged it in for ya.

mavimo commented 6 years ago

@DaneEveritt nice! Thanks for your contribution!