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

phar version doesn't work #2274

Closed
xylle opened this issue May 18, 2024 · 5 comments · Fixed by #2280
Closed

phar version doesn't work #2274

xylle opened this issue May 18, 2024 · 5 comments · Fixed by #2280

Comments

@xylle
Copy link

xylle commented May 18, 2024

Helo,

I have downloaded phinx phar version 0.16 and doesn't work.
The folder is empty, there are no other folders or files except phinx.phar

OS Version : Debian 12 bookworm
php version : 8.2.18

If I try phinx.phar version 0.13.4, its work. version after 0.13.4 doesnt work

If i install phinx with composer in empty project, i have 0.16 version and its works

error message :

./phinx.phar 
PHP Fatal error:  Uncaught UnexpectedValueException: DirectoryIterator::__construct(phar:///tmp/phinx/phinx.phar/vendor/symfony/console/Command/../Resources/): Failed to open directory: operation failed in phar:///tmp/phinx/phinx.phar/vendor/symfony/console/Command/DumpCompletionCommand.php:152
Stack trace:
#0 phar:///tmp/phinx/phinx.phar/vendor/symfony/console/Command/DumpCompletionCommand.php(152): DirectoryIterator->__construct()
#1 phar:///tmp/phinx/phinx.phar/vendor/symfony/console/Command/DumpCompletionCommand.php(55): Symfony\Component\Console\Command\DumpCompletionCommand->getSupportedShells()
#2 phar:///tmp/phinx/phinx.phar/vendor/symfony/console/Command/Command.php(137): Symfony\Component\Console\Command\DumpCompletionCommand->configure()
#3 phar:///tmp/phinx/phinx.phar/vendor/symfony/console/Application.php(1151): Symfony\Component\Console\Command\Command->__construct()
#4 phar:///tmp/phinx/phinx.phar/vendor/symfony/console/Application.php(1327): Symfony\Component\Console\Application->getDefaultCommands()
#5 phar:///tmp/phinx/phinx.phar/vendor/symfony/console/Application.php(548): Symfony\Component\Console\Application->init()
#6 phar:///tmp/phinx/phinx.phar/vendor/symfony/console/Application.php(534): Symfony\Component\Console\Application->add()
#7 phar:///tmp/phinx/phinx.phar/src/Phinx/Console/PhinxApplication.php(37): Symfony\Component\Console\Application->addCommands()
#8 phar:///tmp/phinx/phinx.phar/app/phinx.php(36): Phinx\Console\PhinxApplication->__construct()
#9 phar:///tmp/phinx/phinx.phar/bin/phinx(26): require('...')
#10 /tmp/phinx/phinx.phar(14): require('...')
#11 {main}
  thrown in phar:///tmp/phinx/phinx.phar/vendor/symfony/console/Command/DumpCompletionCommand.php on line 152
@MasterOdin
Copy link
Member

MasterOdin commented May 20, 2024

The change here is that (I think) we need to modify the box.json file to include "vendor/symfony/console/Resources" in the directories field, as by default box doesn't include it since it doesn't include any PHP files. This was probably caused by an upgrade to symfony/console:5.4+ I think between 0.13.4 and later versions of phinx.

@xylle
Copy link
Author

xylle commented May 20, 2024

version 0.14 doesn't work, 0.13.4 is the last working.

@MasterOdin
Copy link
Member

Would you be alright with just having the 0.16.0 phar working, or do you need older versions fixed?

@xylle
Copy link
Author

xylle commented May 20, 2024

If the latest version works, it's perfect for me.

@ajibarra
Copy link
Member

Fixed on #2280

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

Successfully merging a pull request may close this issue.

3 participants