New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discussion] Seperate phalcon 4.0 extentions into git submodules #13526

JABirchall opened this Issue Oct 15, 2018 · 4 comments


None yet
3 participants

JABirchall commented Oct 15, 2018

I feel that in an effort of maintainability, each seperate exetention of phalcon come 4.0 should be seperarated into their own repositories and joined into the main repo via submodules

This can be helpful for seperare smaller code bases, issues and pull requests for each part of phalcon.

Proposed version: 4.0

@JABirchall JABirchall changed the title from [DISCUSS] Seperate phalcon 4.0 extentions into git submodules to [Discussion] Seperate phalcon 4.0 extentions into git submodules Oct 15, 2018


This comment has been minimized.


Jurigag commented Oct 15, 2018

To be honest i like this idea. Also it could be good to decide somehow via installer what parts exactly we want to have in final extension.


This comment has been minimized.


niden commented Oct 16, 2018

This has been discussed between @sergeyklay and myself but we pretty much never came up with a solid decision on how to proceed. Here are a few of pointers on this.

  • Decide what core is and what is not.
  • Logically split the extension in sub-modules similar to what PHP does (i.e. php-phalcon-core, php-phalcon-orm-mysql etc.)
  • It might be unrealistic to split the submodules to different repos since at times there is common code between them (such as interfaces for instance). That will be a trial and error approach on how things can be reorganized
  • To the above, we have our hands full handling issues in one repository, imagine what would happen if we have 10 or so... a solution would be all submodule repos do not allow issues
  • Installation will need to change to install phalcon-full or phalcon-core and then whatever else the developer wants.

I am not sure if we can create two extensions with the same namespace. Can things load cumulatively? For instance your loading:

  • php-phalcon-core
  • php-phalcon-orm-mysql

The first extension would load Phalcon as the namespace where the second Phalcon\ORM\Mysql, I am not sure (have not tested this) if you can do that i.e. load one phalcon namespace on top of another, even if there are no collisions between namespaces.


This comment has been minimized.

JABirchall commented Oct 16, 2018

Prehaps for some inspiration, laravel does a simular thing where each componant of the framework is seperated where they can be used standalone or installed as part of the laravel framework.

As an answer to point 1 and 3, illuminate has a support component that provides functionallity which multiple components may share.
For interfaces and stuff these should be apart of the extention in which they are used with PSR interfaces in the core or a shared submodule.

And I beleive that PHP allows cumulatively namespaces, as long as that namespace isnt already explicitly defined. So you should be able to load Phalcon in 1 extention and Phalcon\ORM\Mysql in another. There shouldnt be much difference in behavour from exetentions and the lanaguage. Shouldnt be to hard to test. Just compile 2 simple namespace definitions where one extends on the other.


This comment has been minimized.


niden commented Oct 16, 2018

@JABirchall To clarify my comment above, I am not sure if we can create two extensions with the same namespace I haven't tried it so I don't know if it will work. If it does then great!

Other than that, the rest is just figuring out what to do and doing it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment