php-library-starter-kit icon indicating copy to clipboard operation
php-library-starter-kit copied to clipboard

Error when starting projec

Open marcelfenerich opened this issue 3 years ago • 6 comments

When first installing the project I get an error on Ramsey\Dev\LibraryStarterKit\Wizard::start.

The error is: No arguments expected, got "starter-kit".

I'm using Ubuntu 20.04 and php 7.4

image

What I'm doing wrong?

marcelfenerich avatar Apr 04 '22 16:04 marcelfenerich

I believe it is happening because the project is not compatible to composer 2.

marcelfenerich avatar Apr 05 '22 10:04 marcelfenerich

The project is compatible with Composer 2, but the version of symfony/console that's bundled with Composer is older than what the ramsey/devtools plugin uses, and so it ends up in a conflicted state. I'm having a related problem over here: https://github.com/ramsey/conventional-commits/pull/45

I need to figure out a solution that avoids using Composer's bundled symfony/console.

ramsey avatar Apr 05 '22 22:04 ramsey

Any workarounds to this until you get this figured out? Just had the issue myself.

goodevilgenius avatar Apr 26 '22 16:04 goodevilgenius

I'm running into this as well. Any current workaround?

simpleapps-io avatar Jul 02 '22 16:07 simpleapps-io

I don't know a workaround at the moment. I need to find some time to revisit this and rework a few of the internals so that this runs smoothly, without conflicting with the bundled composer libraries.

ramsey avatar Jul 03 '22 15:07 ramsey

Hello, same error here using PHP 8.1.10 and composer 2.3.10 ! Also an error when running composer starter-kit :

PHP Fatal error:  Declaration of Ramsey\Dev\Tools\Composer\Command\BaseCommand::getApplication(): Symfony\Component\Console\Application must be compatible with Composer\Command\BaseCommand::getApplication(): Composer\Console\Application in /home/romain/Documents/PHP/captcha-wally/vendor/ramsey/devtools-lib/src/Composer/Command/BaseCommand.php on line 135

Fatal error: Declaration of Ramsey\Dev\Tools\Composer\Command\BaseCommand::getApplication(): Symfony\Component\Console\Application must be compatible with Composer\Command\BaseCommand::getApplication(): Composer\Console\Application in /home/romain/Documents/PHP/captcha-wally/vendor/ramsey/devtools-lib/src/Composer/Command/BaseCommand.php on line 135

I would love to contribute if I find a solution to the problem.

Romaixn avatar Sep 24 '22 16:09 Romaixn

I've just released version 3.5, which fixes this issue for PHP 8.1+ and Composer 2.5+.

Unfortunately, I was unable to make it work for PHP 7.4 and earlier versions of Composer.

ramsey avatar Apr 27 '23 01:04 ramsey