contao / installation-bundle

[READ-ONLY] Contao Installation Bundle
GNU Lesser General Public License v3.0
8 stars 9 forks source link

Supply alternative for runonce.php #96

Closed m-vo closed 6 years ago

m-vo commented 6 years ago

Currently the only way to provide database migrations for an extension is to provide a runonce.php (right?).

This has several drawbacks:

Idea 1: The contao-bundle database updates are managed with the files inside src/Database that implement Contao\InstallationBundle\Database\AbstractVersionUpdate. Can't we use those for extensions as well? Searching for classes that implement this exeact interface and executing shouldBeRun() / run() on them.

(I'm not aware of how exactly the install tool will change in the near future regarding the manager though.)

Idea 2: At least let's fix the problem, that symlinked packages do not work.

m-vo commented 6 years ago

Ok, just found out there is also the sqlCompileCommands hook that can be used. That's a usable approach. But still I think this could be generalized.

leofeyer commented 6 years ago

Ideas for replacing the runonce.php concepts are discussed here: https://github.com/contao/core-bundle/issues/1223