Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When committing whithout setting options setting the default options throws exception. #31

Open
macdoggie78 opened this issue Dec 9, 2016 · 4 comments

Comments

@macdoggie78
Copy link

[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

@jpcercal
Copy link

+1

@jpcercal
Copy link

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?

@jaapromijn
Copy link

+1

1 similar comment
@tmloberon
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants