Specify the version of phalcon to install

Phanix
·
·
IPFS
·

In fact, it was because phalcon 4 was officially released in the past few days, and then I accidentally updated all the system, and then it exploded, so I had to downgrade the version.

The repository of the entire phalcon installation file is in the same place. If there is no special designation now, phalcon 4.0 will be installed when php7.2 (inclusive) or above is installed. But several things I'm working on are still using phalcon 3.x. There is not much difference between the two, but some settings will be different, so the program of phalcon 3.x will spray error when running directly on 4.0, for example like this

 [Fri Dec 27 01:55:57.890865 2019] [php7:error] [pid 874] [client 127.0.0.1:36336] PHP Fatal error: Uncaught Error: Class 'Phalcon\\Di\\FactoryDefault' not found in /www /super/public/index.php:15\nStack trace:\n#0 {main}\n thrown in /www/super/public/index.php on line 15, referer: http://localhost/super/cnx /view

So I have to downgrade the version and see it on the official packagecloud , as long as it is specified during apt-get install.

 $ sudo apt-get install php7.2-phalcon=3.4.5-1+php7.2

Having said that, it's been more than three years since I started using the phalcon 3 ...

Original link: Phanix's Blog

CC BY-NC-ND 2.0

Like my work? Don't forget to support and clap, let me know that you are with me on the road of creation. Keep this enthusiasm together!