phpcr / phpcr-shell

PHPCR Shell
MIT License
68 stars 19 forks source link

Phar Missing in latest release #206

Closed alexander-schranz closed 3 years ago

alexander-schranz commented 3 years ago

Would be great if the latest (1.2.0) release would also have compiled phar.

phpcrsh.phar.zip

dantleech commented 3 years ago

I've updloaded a PHAR for 1.2.0. Can you test? https://github.com/phpcr/phpcr-shell/releases/tag/1.2.0

alexander-schranz commented 3 years ago

@dantleech Thank you! Seems not to work as expected or I'm using it false. I changed it to an executeable chmod +x phpcrsh.phar. But when running ls the following did appear:

~/Downloads $ chmod +x ./phpcrsh.phar
~/Downloads $ ./phpcrsh.phar --transport=doctrine-dbal --db-name su_develop

Welcome to PHPCRSH (1.0.0).

At the prompt, type help for some help.

- To list all of the commands type list.
- To list all of the registered command aliases, type aliases.

To exit the shell, type exit.

For full documentation visit: http://phpcr.readthedocs.org/en/latest/phpcr-shell/index.html

PHPCRSH > ls
PHP Fatal error:  Uncaught Error: Class 'Doctrine\DBAL\DriverManager' not found in phar:///Users/helloworld/Downloads/phpcrsh.phar/src/PHPCR/Shell/Transport/Transport/DoctrineDbal.php:29
Stack trace:
#0 phar:///Users/helloworld/Downloads/phpcrsh.phar/src/PHPCR/Shell/Phpcr/SessionManager.php(69): PHPCR\Shell\Transport\Transport\DoctrineDbal->getRepository(Object(PHPCR\Shell\Config\Config))
#1 phar:///Users/helloworld/Downloads/phpcrsh.phar/src/PHPCR/Shell/Phpcr/SessionManager.php(54): PHPCR\Shell\Phpcr\SessionManager->initSession()
#2 phar:///Users/helloworld/Downloads/phpcrsh.phar/src/PHPCR/Shell/Phpcr/SessionManager.php(142): PHPCR\Shell\Phpcr\SessionManager->init()
#3 phar:///Users/helloworld/Downloads/phpcrsh.phar/src/PHPCR/Shell/Console/Helper/RepositoryHelper.php(75): PHPCR\Shell\Phpcr\SessionManager->getRepository()
#4 phar:///Users/helloworld/Downloads/phpcrsh.phar/src/PHPCR/Shell/Console/Helper/RepositoryHelper.php(43): PHPCR\Shell\Console\Helper\RepositoryHelper->loadDescriptors()
# in phar:///Users/helloworld/Downloads/phpcrsh.phar/src/PHPCR/Shell/Transport/Transport/DoctrineDbal.php on line 29

Fatal error: Uncaught Error: Class 'Doctrine\DBAL\DriverManager' not found in phar:///Users/helloworld/Downloads/phpcrsh.phar/src/PHPCR/Shell/Transport/Transport/DoctrineDbal.php:29
Stack trace:
#0 phar:///Users/helloworld/Downloads/phpcrsh.phar/src/PHPCR/Shell/Phpcr/SessionManager.php(69): PHPCR\Shell\Transport\Transport\DoctrineDbal->getRepository(Object(PHPCR\Shell\Config\Config))
#1 phar:///Users/helloworld/Downloads/phpcrsh.phar/src/PHPCR/Shell/Phpcr/SessionManager.php(54): PHPCR\Shell\Phpcr\SessionManager->initSession()
#2 phar:///Users/helloworld/Downloads/phpcrsh.phar/src/PHPCR/Shell/Phpcr/SessionManager.php(142): PHPCR\Shell\Phpcr\SessionManager->init()
#3 phar:///Users/helloworld/Downloads/phpcrsh.phar/src/PHPCR/Shell/Console/Helper/RepositoryHelper.php(75): PHPCR\Shell\Phpcr\SessionManager->getRepository()
#4 phar:///Users/helloworld/Downloads/phpcrsh.phar/src/PHPCR/Shell/Console/Helper/RepositoryHelper.php(43): PHPCR\Shell\Console\Helper\RepositoryHelper->loadDescriptors()
# in phar:///Users/helloworld/Downloads/phpcrsh.phar/src/PHPCR/Shell/Transport/Transport/DoctrineDbal.php on line 29
dantleech commented 3 years ago

ok, Box didn't include the --dev files (and so the DBAL deps), can you try again?

alexander-schranz commented 3 years ago

Still need todo chmod +x ./phpcrsh.phar but then it did work as expected. Thank you!

Just for interest, If I understand you correctly it need to be box compile --dev when creating the phar?

dantleech commented 3 years ago

no -- I updated the box.json config with a setting to include dev deps :)

alexander-schranz commented 3 years ago

@dantleech I see. Thank you!