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

php-7.0 runtime try to use composer 1.6.4, but only works with php-7.1 #96

Open
pablorsk opened this issue May 31, 2018 · 1 comment
Open

Comments

@pablorsk
Copy link

pablorsk commented May 31, 2018

Error when I try use nanobox run

PHP 7.0

Boxfile

    runtime: php-7.0

nanobox run ERROR 😢

    - composer install :
      
      Fatal error: Uncaught TypeError: Return value of PackageVersions\Installer::activate() must be an instance of PackageVersions\void, none returned in /app/vendor/ocramius/package-versions/src/PackageVersions/Installer.php:62
      Stack trace:
      #0 phar:///data/bin/composer/src/Composer/Plugin/PluginManager.php(236): PackageVersions\Installer->activate(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
      #1 phar:///data/bin/composer/src/Composer/Plugin/PluginManager.php(205): Composer\Plugin\PluginManager->addPlugin(Object(PackageVersions\Installer))
      #2 phar:///data/bin/composer/src/Composer/Plugin/PluginManager.php(261): Composer\Plugin\PluginManager->registerPackage(Object(Composer\Package\CompletePackage))
      #3 phar:///data/bin/composer/src/Composer/Plugin/PluginManager.php(76): Composer\Plugin\PluginManager->loadRepository(Object(Composer\Repository\InstalledFilesystemRepository))
      #4 phar:///data/bin/composer/src/Composer/Factory.php(384): Composer\Plugin\PluginManager->loadInstalledPlugins()
      #5 phar:///data/bin/composer/sr in /app/vendor/ocramius/package-versions/src/PackageVersions/Installer.php on line 62

PHP 7.1

Boxfile

    runtime: php-7.1

nanobox run OK 😄

More information

@pablorsk pablorsk changed the title PHP 7.0 broken composer PHP 7.0 runtime try to use composer 1.6.4 but only work with php >= 7.1 Jun 1, 2018
@pablorsk pablorsk changed the title PHP 7.0 runtime try to use composer 1.6.4 but only work with php >= 7.1 PHP 7.0 runtime try to use composer 1.6.4, but only work with php >= 7.1 Jun 1, 2018
@pablorsk pablorsk changed the title PHP 7.0 runtime try to use composer 1.6.4, but only work with php >= 7.1 php-7 runtime try to use composer 1.6.4, but only works with php-7.1 Jun 1, 2018
@pablorsk pablorsk changed the title php-7 runtime try to use composer 1.6.4, but only works with php-7.1 php-7.0 runtime try to use composer 1.6.4, but only works with php-7.1 Jun 1, 2018
@pablorsk
Copy link
Author

pablorsk commented Jun 6, 2018

It's a bug related cache_dir. This is how can I reproduce the error.

pablorsk $ cat boxfile.yml | grep runtime
    runtime: php-7.1
pablorsk $ nanobox run
/app $ composer install # all its ok
/app $ exit
pablorsk $ git checkout some_branch_with_php70
pablorsk $ cat boxfile.yml | grep runtime
    runtime: php-7.0
pablorsk $ nanobox run
# CRASH !!!

Only solution is nanobox destroy (or, more complex, do inside machine rm -rf vendor/*)

This problem can be solved, maybe, with #84. And prevent another issues like #100. Is not related with composer version. Nanobox uses allways (for now) 1.6.3 version.

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

1 participant