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

Installing using composer-bin-plugin not working after 4.2 #931

Closed
icanhazstring opened this issue Mar 16, 2023 · 3 comments
Closed

Installing using composer-bin-plugin not working after 4.2 #931

icanhazstring opened this issue Mar 16, 2023 · 3 comments

Comments

@icanhazstring
Copy link

icanhazstring commented Mar 16, 2023

Bug report

Question Answer
Box version ^4.3.0
PHP version 8.1
Platform with version e.g. Ubuntu/Windows/MacOS
Github Repo -

Using composer bin-plugin with humbug/box starting from version 4.3 (4.2 worked).
Running it with the latest .phar build seems to be working.

Executing vendor/bin/box compile throws the following exception:

exception trace
PHP Fatal error:  Uncaught Error: Call to undefined method KevinGH\Box\Configuration\Configuration::setComposerBin() in /Users/user/Projects/my-project/vendor-bin/box/vendor/humbug/box/src/Console/Command/Compile.php:209
Stack trace:
#0 /Users/user/Projects/my-project/vendor-bin/box/vendor/fidry/console/src/Command/SymfonyCommand.php(93): KevinGH\Box\Console\Command\Compile->execute(Object(Fidry\Console\Input\IO))
#1 /Users/user/Projects/my-project/vendor-bin/box/vendor/symfony/console/Command/Command.php(312): Fidry\Console\Command\SymfonyCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /Users/user/Projects/my-project/vendor-bin/box/vendor/symfony/console/Application.php(1022): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /Users/user/Projects/my-project/vendor-bin/box/vendor/symfony/console/Application.php(314): Symfony\Component\Console\Application->doRunCommand(Object(Fidry\Console\Command\SymfonyCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /Users/user/Projects/my-project/vendor-bin/box/vendor/symfony/console/Application.php(168): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /Users/user/Projects/my-project/vendor-bin/box/vendor/fidry/console/src/Application/ApplicationRunner.php(66): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /Users/user/Projects/my-project/vendor-bin/box/vendor/humbug/box/bin/box(60): Fidry\Console\Application\ApplicationRunner->run(Object(Fidry\Console\Input\IO))
#7 /Users/user/Projects/my-project/vendor/bin/box(120): include('/Users/andreas....')
#8 {main}
 thrown in /Users/user/Projects/my-project/vendor-bin/box/vendor/humbug/box/src/Console/Command/Compile.php on line 209

Fatal error: Uncaught Error: Call to undefined method KevinGH\Box\Configuration\Configuration::setComposerBin() in /Users/user/Projects/my-project/vendor-bin/box/vendor/humbug/box/src/Console/Command/Compile.php:209
Stack trace:
#0 /Users/user/Projects/my-project/vendor-bin/box/vendor/fidry/console/src/Command/SymfonyCommand.php(93): KevinGH\Box\Console\Command\Compile->execute(Object(Fidry\Console\Input\IO))
#1 /Users/user/Projects/my-project/vendor-bin/box/vendor/symfony/console/Command/Command.php(312): Fidry\Console\Command\SymfonyCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /Users/user/Projects/my-project/vendor-bin/box/vendor/symfony/console/Application.php(1022): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /Users/user/Projects/my-project/vendor-bin/box/vendor/symfony/console/Application.php(314): Symfony\Component\Console\Application->doRunCommand(Object(Fidry\Console\Command\SymfonyCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /Users/user/Projects/my-project/vendor-bin/box/vendor/symfony/console/Application.php(168): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /Users/user/Projects/my-project/vendor-bin/box/vendor/fidry/console/src/Application/ApplicationRunner.php(66): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /Users/user/Projects/my-project/vendor-bin/box/vendor/humbug/box/bin/box(60): Fidry\Console\Application\ApplicationRunner->run(Object(Fidry\Console\Input\IO))
#7 /Users/user/Projects/my-project/vendor/bin/box(120): include('/Users/user....')
#8 {main}
 thrown in /Users/user/Projects/my-project/vendor-bin/box/vendor/humbug/box/src/Console/Command/Compile.php on line 209

box.json.dist
{
   "base-path": null,
   "output": "build/my-project.phar",
   "files": [
       "config/container.php",
       "config/services.yaml"
   ]
}
@theofidry
Copy link
Member

Could you please try again with 4.3.8?

@icanhazstring
Copy link
Author

Will do 👍

@icanhazstring
Copy link
Author

Works again. Thanks :)

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