ramsey / php-library-starter-kit

:building_construction: A tool to quickly set up the base files of a PHP library project.
MIT License
243 stars 25 forks source link

Error when starting projec #42

Closed marcelfenerich closed 1 year ago

marcelfenerich commented 2 years ago

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 commented 2 years ago

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

ramsey commented 2 years ago

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.

goodevilgenius commented 2 years ago

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

simpleapps-io commented 2 years ago

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

ramsey commented 2 years ago

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.

Romaixn commented 1 year ago

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.

ramsey commented 1 year ago

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.