phalcon / phalcon-devtools

Phalcon Developer Tools
https://docs.phalcon.io/latest/en/devtools
Other
1.33k stars 629 forks source link

Class "Phalcon\Exception" not found in phalcon.phar/src/Commands/CommandsException.php on line 20 #1542

Open r-martins opened 9 months ago

r-martins commented 9 months ago

Questions should go to https://forum.phalcon.io Documentation issues should go to https://github.com/phalcon/docs/issues

Expected and Actual Behavior

Describe what you are trying to achieve and what goes wrong. When running phalcon.phar model foo it generates an error.

Fatal error: Uncaught Error: Class "Phalcon\Exception" not found in phar:///var/www/html/phalcon.phar/src/Commands/CommandsException.php on line 20

Error: Class "Phalcon\Exception" not found in phar:///var/www/html/phalcon.phar/src/Commands/CommandsException.php on line 20

Call Stack: 0.0134 5137528 1. {main}() /var/www/html/phalcon.phar:0 0.0236 5457280 2. require('phar:///var/www/html/phalcon.phar/phalcon') /var/www/html/phalcon.phar:14 0.0342 6157744 3. Phalcon\DevTools\Script->run() phar:///var/www/html/phalcon.phar/phalcon:64 0.0342 6157744 4. Phalcon\DevTools\Script->dispatch($command = class Phalcon\DevTools\Commands\Builtin\Model

Provide output if related

// paste output here

Provide minimal script to reproduce the issue Just open an existing project and type the command.

// paste code

Details

Environment: OS: Linux 16c64d6ef568 6.3.13-linuxkit #1 SMP PREEMPT Thu Sep 7 07:48:47 UTC 2023 aarch64 PHP Version: 8.2.10 PHP SAPI: cli PHP Bin: /usr/local/bin/php PHP Extension Dir: /usr/local/lib/php/extensions/no-debug-non-zts-20220829 PHP Bin Dir: /usr/local/bin Loaded PHP config: Versions: Phalcon DevTools Version: 4.2.0 Phalcon Version: 5.3.0 AdminLTE Version: 3.0.1

daleffe commented 3 months ago

Hi @r-martins,

For Phalcon 5.x you can use this version.