matteosister / GitElephant

An abstraction layer for git written in PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v4.1.1: Call to undefined function GitElephant\Command\is_countable()

jurgenhaas opened this issue · comments

The v4.1.1 fixed #164 but introduces a new one:

Fatal error: Uncaught Error: Call to undefined function GitElephant\Command\is_countable() in /drupal/vendor/cypresslab/gitelephant/src/GitElephant/Command/SubCommandCommand.php:110
Stack trace:
#0 /drupal/vendor/cypresslab/gitelephant/src/GitElephant/Command/BaseCommand.php(437): GitElephant\Command\SubCommandCommand->getCommand()
#1 /drupal/vendor/cypresslab/gitelephant/src/GitElephant/Command/BaseCommand.php(336): GitElephant\Command\BaseCommand->getCLISubjects()
#2 /drupal/vendor/cypresslab/gitelephant/src/GitElephant/Command/RemoteCommand.php(80): GitElephant\Command\BaseCommand->getCommand()
#3 /drupal/vendor/cypresslab/gitelephant/src/GitElephant/Command/RemoteCommand.php(124): GitElephant\Command\RemoteCommand->remote(Object(GitElephant\Command\Remote\ShowSubCommand))
#4 /drupal/vendor/cypresslab/gitelephant/src/GitElephant/Objects/Remote.php(159): GitElephant\Command\RemoteCommand->show('origin', false)
#5 /drupal/vendor/cypresslab/gitelephant/src/GitElephant/Objects/Remote.php(190): GitElephant\Objects\Remote->g in /drupal/vendor/cypresslab/gitelephant/src/GitElephant/Command/SubCommandCommand.php on line 110

Oh no. That's because is_countable is existing only since PHP 7.3. I wonder why the test matrix – which includes PHP 7.2 – did not fail. Indicates too low coverage.

Anyway, I removed all calls to is_countable, and published v4.1.2. while skipping the review process – sorry @imunhatep, did not want to bother you again in such a short time. Hope this version works.

Looks good to me, v4.1.2 is working in my environment ok. Thanks @GenieTim for the quick turnaround.