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 8 compatibility issues when installing learnyouphp workshop #97

Closed
stsmuniz opened this issue Jan 20, 2021 · 5 comments
Closed

PHP 8 compatibility issues when installing learnyouphp workshop #97

stsmuniz opened this issue Jan 20, 2021 · 5 comments

Comments

@stsmuniz
Copy link

I just installed the workshop manager on my machine and verified, this was the return

➜  ~ workshop-manager verify

Verifying your installation
===========================


 [OK] Your $PATH environment variable is configured correctly.



 [OK] Your PHP version is 8.0.0, PHP 7.2 is the minimum supported version for this tool. Please note that some workshops
      may require a higher version of PHP, so you may not be able to install them without upgrading PHP.



 [OK] All required PHP extensions are installed. Please note that some workshops may require additional PHP extensions.

But when I tried to install the learnyouphp workshop that's what I get:

➜  ~ workshop-manager install -vvv learnyouphp

Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Dependency resolution completed in 0.000 seconds
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - beberlei/assert is locked to version v3.2.7 and an update of this package was not requested.
    - beberlei/assert v3.2.7 requires php ^7 -> your php version (8.0.0) does not satisfy that requirement.
  Problem 2
    - beberlei/assert v3.2.7 requires php ^7 -> your php version (8.0.0) does not satisfy that requirement.
    - php-school/cli-menu 4.1.0 requires beberlei/assert ^2.4 | ^3 -> satisfiable by beberlei/assert[v3.2.7].
    - php-school/cli-menu is locked to version 4.1.0 and an update of this package was not requested.

  There was a problem installing dependencies for "learnyouphp". Try running in verbose mode to see more details: /usr/local/bin/workshop-manager install -v


In Installer.php line 153:

  [PhpSchool\WorkshopManager\Exception\ComposerFailureException]


Exception trace:
  at phar:///usr/local/bin/workshop-manager/src/Installer/Installer.php:153
 PhpSchool\WorkshopManager\Installer\Installer->PhpSchool\WorkshopManager\Installer\{closure}() at phar:///usr/local/bin/workshop-manager/src/Filesystem.php:23
 PhpSchool\WorkshopManager\Filesystem->executeInPath() at phar:///usr/local/bin/workshop-manager/src/Installer/Installer.php:155
 PhpSchool\WorkshopManager\Installer\Installer->installWorkshop() at phar:///usr/local/bin/workshop-manager/src/Command/InstallWorkshop.php:33
 PhpSchool\WorkshopManager\Command\InstallWorkshop->__invoke() at n/a:n/a
 call_user_func_array() at phar:///usr/local/bin/workshop-manager/vendor/php-di/invoker/src/Invoker.php:82
 Invoker\Invoker->call() at phar:///usr/local/bin/workshop-manager/vendor/mnapoli/silly/src/Application.php:95
 Silly\Application->Silly\{closure}() at phar:///usr/local/bin/workshop-manager/vendor/symfony/console/Command/Command.php:253
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/workshop-manager/vendor/symfony/console/Application.php:971
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/workshop-manager/vendor/symfony/console/Application.php:290
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/workshop-manager/vendor/symfony/console/Application.php:166
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/workshop-manager/app/bootstrap.php:49
 require() at phar:///usr/local/bin/workshop-manager/bin/workshop-manager:3
 require() at /usr/local/bin/workshop-manager:11

install <workshopName>

Is there a way to update the dependencies so that it will be possible to run the workshop on php 8 environments?

@AydinHassan
Copy link
Member

Hi @stsmuniz. Yes I will take a look, not sure how that happened. I suspect the lockfile cannot be compatible with both the lowest and highest php version we support 😭

@stsmuniz
Copy link
Author

Thanks @AydinHassan

It seems that current stable version of beberley/assert is not compatible with php8, but the current beta version is.

Take a look at their release page

@AydinHassan
Copy link
Member

@stsmuniz can you try again please?

@stsmuniz
Copy link
Author

It worked!

Thank you so much <3

@AydinHassan
Copy link
Member

Perfect, thanks for the report!

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

2 participants