Closed FabienPapet closed 1 year ago
The least we can say is that it's ambitious. However, I wonder about the practicality of having 2 repositories, as part of a migration, where we will take legacy code and port it to symfony. Will this involve 2 PRs (one per repository) which should be considered as a set?
We may not need 2 PR, as the changes we make are both legacy/modern code, and this will only be repository.
The second repository will only be the release
repository with the application configuration, constants, etc which is not modified often.
that's a lot of work to do but i think is a good idea.. but keep thing simple. over engineering the project could be a pain for prestashop developers that have to use all that. It will require an exhaustive documentation for devs for how use this and how this impact on modules and customization. Remember that a lot of customer choose prestashop because it is (was) customizable in front and backoffice (by prestashop partners and other software house). Now if there is not a hook or something customization is very very difficult. I thik that with your ambitious project prestashop could became more and more difficult to customize.. because all this sophistications. Remember that.
As core developers we have a responsibility to build a reliable way to build apps following modern best practices with PHP tools. As prestashop 8.0 will be out on the next few weeks/months, I started thinking about prestashop pros and cons regarding developer experience and I would like to improve the experience developers have with prestashop. That’s why I need your opinion on this proposal before working on it.
Current situation
classes
and acontroller
directory that can be modified directly by the developers, but it is known as a bad practice and is discouraged.src
/ code contains both some legacy/modern code and some bundle configuration owed by prestashop core.src/
directory contains also Prestashop code and bundles that is not recommended to edit.src
directory, the namespacePrestashop\
is usedProposition
prestashop/legacy
package that will be required through composersrc/
for all the code you are adding under theApp\
namespace instead of the currentPrestashop
I started a POC on this that can be found here
Impacts
Of course, if it was that easy it’ll be already done, so let’s have a look on impacts it can have
__FILE__
,__DIR__
and other directory related constants must be updatedAppKernel
and not in the core).Advantages
This will now be possible:
For module developers:
For those who don’t need this: You can still continue to install & run prestashop as you did until today. The target of this PR is to only move some files.
Possible inconvenient
Prestashop/Prestashop
will not be anymore the release project. Another project will be needed for the release.