PHPGit
PHPGit copied to clipboard
When committing whithout setting options setting the default options throws exception.
[Symfony\Component\Debug\Exception\ContextErrorException]
Warning: Missing argument 2 for Symfony\Component\OptionsResolver\OptionsResolver::setAllowedValues(), called in /home/2revlect2/vendor/kzykhys/git/src/PHPGit/Command/CommitCommand.php on line 84 and defined
+1
I found a solution to this problem.
I was running the Symfony 3 components here, and the API of the third version of Symfony isn't compatible with this library. So, to solve it just force your project to run in Symfony 2 compatible putting this in your composer.json file.
"symfony/options-resolver": "^2.8"
Just to know:
How Symfony2 defines the method:
OptionsResolverInterface setAllowedValues(array $allowedValues)
How Symfony3 defines the method:
OptionsResolverInterface setAllowedValues(string $option, array $allowedValues = null)
Mr. @kzykhys, I was thinking to make a pull request to this project to update the composer.json file or to upgrade this library to use Symfony3 components. What do you think about it?
+1
+1