matteosister / GitElephant

An abstraction layer for git written in PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP 7.2 breaks project because of "Object" type-hint

bnock opened this issue · comments

When running this library in a PHP 7.2 environment, it breaks because of the Object.php class located at namespace GitElephant\Objects\Object.php. As of PHP 7.2 there is an object type-hint, which breaks any classes names "Object".

I have 2 recommendations:

  1. Patch the current release with an update to composer.json that restricts the PHP version to < 7.2.

  2. Create a new release that changes the Object.php class name to something else and update all usages, then remove the php < 7.2 version constraint from composer.json.

commented

Working on it at fork. When I finish can update this Project

Fixed with #133 . You may have to update your composer.json to require ~2.0 instead of ~1.0.