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

What improvements come with Phalcon 4 over 3?

Hello everyone,

I have been using phalcon 3 for a while and love it. I saw version 4 is almost ready now, therefore thinking to build my next project using the new version. Be honest, I never used V3 to do some sort of cutting edge project, and there isn't anything I'd like to have but v3 couldn't supply. So I am just thinking should I move to v4 now? Also what benifit v4 has over v3? i.e. performance. I did a bit research on the web but couldn't find a decent answer. Hope someone can hint here. Thanks in advance.

If you can, absolutely start with v4. As far as I know it's not a huge improvement over v3, and it is mostly compatible with v3. However, v4 is the future, so if you don't move to it, you'll be locking yourself into v3 forever. Better to move now so you can stay with the newest versions in the future.



1.3k

I tried 3 hours to migrate today. No idea why the team think it's necessary to rename so many things.

The biggest change I've encountered is the cache.

I'm in the same boat....Phalcon 4 smells like python 3....a whole ton of class name changes for no real apparent improvement....this was a really bad move....it's going to just force a lot of people to think about jumping ship

No idea why the team think it's necessary to rename so many things.

Because there were no standards, PSR was introduced to make easier own extension or implementation.

a whole ton of class name changes for no real apparent improvement

v4.0 is only preparation for new features. Also do not forget the drop supporting of PHP 5, which is HUGE step forward.

Also, checkout our roadmap - https://github.com/orgs/phalcon/projects/4
To have clear vision of what is going now and for next 2 week sprints.



10.1k

@drJLT did you had a look at Rector as well? It can help you renaming classes. https://github.com/rectorphp/rector



1.3k

@drJLT did you had a look at Rector as well? It can help you renaming classes. https://github.com/rectorphp/rector

I finished that in 2h, mostly probably because I didn't use all the features of Phalcon (using RAW SQL + typed HTML in templates + static assets).

TBH, I don't find many benefits in using a framework to write HTML with PHP or ORM. For a website with pure custom CSS & JS, static is also easier.

It was really the move to PHP7.4 that took longer to debug. I'm a hobbyist, so I wasn't strict with null and arrays.



10.1k

TBH, I don't find many benefits in using a framework to write HTML with PHP or ORM. For a website with pure custom CSS & JS, static is also easier.

I think this will be different for every user. Just do what works best for you and use the parts of the Framework that can help you.