We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon keyword devtool 4

$ phalcon PHP Fatal error: Declaration of Phalcon\Devtools\Version::_getVersion() must be compatible with Phalcon\Version::_getVersion(): array in /home/user/progs/vendor/phalcon/devtools/scripts/Phalcon/Devtools/Version.php on line 44

The error above occurs when phalcon command is called. The composer command was done with no error on screen, like it is on https://docs.phalcon.io/4.0/en/devtools

I think that the command phalcon is still using the older devtool (3.4), but I don't know how to test and change it.



10.1k

You need to upgrade phalcon devtools to v4. Check your composer.json to make sure phalcon devtools is on version 4 and then update the package composer update

You need to upgrade phalcon devtools to v4. Check your composer.json to make sure phalcon devtools is on version 4 and then update the package composer update

I'd installed (updated from 3.4) this week. Result of update composer update:

$ composer global require phalcon/devtools:v4.0.0-rc.1 Changed current directory to /home/user/.config/composer ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Generating autoload files

Server restarted and same error:

$ phalcon PHP Fatal error: Declaration of Phalcon\Devtools\Version::_getVersion() must be compatible with Phalcon\Version::_getVersion(): array in /home/user/progs/vendor/phalcon/devtools/scripts/Phalcon/Devtools/Version.php on line 44

Can I change the phalcon keyword to phalcon4 keyword? How?