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

PSR-0 stoped working in Phalcon 3.0.1

Is this a bug or a "feature" about deleting a feature? According to https://docs.phalcon.io/en/latest/reference/loader.html the autoloader is able to load based on the psr-0 but it doesn't I am trying to upgrade a phalcon 2.0 project to 3.0.1 that uses PSR-0 for some legacy libraries (Kohana query builder)

I don't want to create an issue on docs or cphalcon before asking here :) Can somebody confirm this situation? Currently I am on bash on ubuntu on windows (I don't think this affect, because the files can be loaded with include without any problem)

edited Sep '16

https://blog.phalcon.io/post/phalcon-3-0-0-released check section mentioning loader. Maybe it has something to do with it ? PSR-0 should work i think. Just maybe switch to psr-4 ? Why you need kohana query builder when phalcon provide query builder itself ?



2.8k

I see, big lost, but can be replaces with other loader.

  1. The project was ported to phalcon, it used to be written for kohana. and the component was totally reusable without any problem (in phalcon 1/2)
  2. As far as I know, there is no such thing as SQL query builder in Phalcon, at least object oriented or functional. There is that PHQL but come on, man, it is a string that need to be parsed to generate other similar string. And there is a OO query builder to build selects for the PHQL.

Phalcon is great, but not it's DBA/ORM, it is too leaked abstraction like all ORM in the world. I use it for other projects, and quite often I need to use the getInternalHandler for everything. Just take a look in the postgres/mysql documentation pages and you'll understand all the things that are lost in the PHQL

Im using phalcon query builder and it's pretty much enough for me :)