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

Cannot run grumphp #366

Closed
Nek- opened this issue Jun 9, 2017 · 5 comments
Closed

Cannot run grumphp #366

Nek- opened this issue Jun 9, 2017 · 5 comments
Labels

Comments

@Nek-
Copy link

Nek- commented Jun 9, 2017

Q A
Version grumphp -V
Bug? yes
New feature? no

My configuration
NONE

Steps to reproduce:

# Generate empty folder
git clone [email protected]:symfony/symfony-demo.git
cd grumphp
composer require --dev phpro/grumphp

php ./vendor/bin/grumphp configure

Result:

php ./vendor/bin/grumphp configure
PHP Fatal error:  Uncaught Error: Class 'ProxyManager\Configuration' not found in /Users/veber/Projects/Tests/grumphp-test/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/LazyProxy/Instantiator/RuntimeInstantiator.php:36
Stack trace:
#0 /Users/veber/Projects/Tests/grumphp-test/vendor/phpro/grumphp/src/GrumPHP/Configuration/ContainerFactory.php(28): Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator->__construct()
#1 /Users/veber/Projects/Tests/grumphp-test/vendor/phpro/grumphp/src/GrumPHP/Console/Application.php(157): GrumPHP\Configuration\ContainerFactory::buildFromConfiguration('/Users/veber/Pr...')
#2 /Users/veber/Projects/Tests/grumphp-test/vendor/phpro/grumphp/src/GrumPHP/Console/Application.php(57): GrumPHP\Console\Application->getContainer()
#3 /Users/veber/Projects/Tests/grumphp-test/vendor/phpro/grumphp/bin/grumphp(30): GrumPHP\Console\Application->__construct()
#4 {main}
  thrown in /Users/veber/Projects/Tests/grumphp-test/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/LazyProxy/Instantiator/RuntimeInstantiator.php on line 36

Fatal error: Uncaught Error: Class 'ProxyManager\Configuration' not found in /Users/veber/Projects/Tests/grumphp-test/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/LazyProxy/Instantiator/RuntimeInstantiator.php:36
Stack trace:
#0 /Users/veber/Projects/Tests/grumphp-test/vendor/phpro/grumphp/src/GrumPHP/Configuration/ContainerFactory.php(28): Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator->__construct()
#1 /Users/veber/Projects/Tests/grumphp-test/vendor/phpro/grumphp/src/GrumPHP/Console/Application.php(157): GrumPHP\Configuration\ContainerFactory::buildFromConfiguration('/Users/veber/Pr...')
#2 /Users/veber/Projects/Tests/grumphp-test/vendor/phpro/grumphp/src/GrumPHP/Console/Application.php(57): GrumPHP\Console\Application->getContainer()
#3 /Users/veber/Projects/Tests/grumphp-test/vendor/phpro/grumphp/bin/grumphp(30): GrumPHP\Console\Application->__construct()
#4 {main}
  thrown in /Users/veber/Projects/Tests/grumphp-test/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/LazyProxy/Instantiator/RuntimeInstantiator.php on line 36
@veewee
Copy link
Contributor

veewee commented Jun 9, 2017

@Nek-, Thanks for reporting!
You can solve this issue by adding:

composer require ocramius/proxy-manager

Strange issue: it is required by GrumPHP but doesn't get installed by composer.
Will have to dive into the composer logs to see why it doesn't get installed.

@veewee veewee added the bug label Jun 9, 2017
@veewee
Copy link
Contributor

veewee commented Jun 12, 2017

@Nek-,

I've investigated this further en the issue is the hardcoded php version in the symfony-demo composer file:
https://github.com/symfony/symfony-demo/blob/master/composer.json#L62

    "config": {
        "platform": {
            "php": "5.5.9"
        }
},

This is forcing grumphp to install version 0.9.6:

$ composer require --dev phpro/grumphp
...
Using version ^0.9.6 for phpro/grumphp
...

When I try to install latest:

$ composer require --dev phpro/grumphp:v0.11.6
  Problem 1
    - Installation request for phpro/grumphp v0.11.6 -> satisfiable by phpro/grumphp[v0.11.6].
    - phpro/grumphp v0.11.6 requires php >=5.6.0 -> your PHP version (5.6.29) overridden by "config.platform.php" version (5.5.9) does not satisfy that requirement.

You can probably install it with the --ignore-platform-reqs option or by removing the php version from the platform config.

As of version 0.10.0 we've dropped PHP 5.5 support:
https://github.com/phpro/grumphp/releases/tag/v0.10.0

In version 0.10.2 we've resolved the issue of the proxy-manager not being installed during symfony/symfony:
https://github.com/phpro/grumphp/releases/tag/v0.10.2
#240

As you can see, we cannot resolve this issue on our side. Since the demo is loading Symfony 3.3, it might be a good idea to bump that platform PHP version in the symfony-demo package.

I hope this fixes your issue.

@veewee veewee closed this as completed Jun 12, 2017
@veewee veewee added this to the Version 0.11.7 milestone Jun 12, 2017
@Nek-
Copy link
Author

Nek- commented Jun 13, 2017

@veewee oh! Thank you. And sorry for the wrong issue.

@Nek-
Copy link
Author

Nek- commented Jun 28, 2017

@veewee do you accept a contribution to fix it?

@veewee
Copy link
Contributor

veewee commented Jun 28, 2017

@Nek-: Sure, if it gets fixed in an acceptable way :)

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

No branches or pull requests

2 participants