You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to implement a system for plugins, which resembles the way CakePHP has it implemented, but I've stumbled across some obstacles which make it nearly impossible within the current framework. At least, impossible to implement it in a correct way.
The feature would work as follows:
There would be a /plugins directory in the project root which contains plugin directories. For example: /plugins/myplugin.
The plugin directory could contain a structure as follows:
myplugin
app
controllers
SomeController.php
routes
_app.php
public
assets
css
custom.css
Well, you get the picture. Basically, it would have most of the functionality that the parent application has and it could override the functionality in the parent app.
The reason I want to do this is to make it possible to add plugins outside of composer and version control.
At the moment I've actually managed to implement the feature to use controllers, models, routes and console commands. But migrations are kind of tricky because of the paths which I can't override at runtime without overriding the whole db:migrate command, which is a total hack.
I'm willing to implement this feature at the framework level if I know it has a chance of being accepted.
So, my question would be, is this a thing that could be added?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I was trying to implement a system for plugins, which resembles the way CakePHP has it implemented, but I've stumbled across some obstacles which make it nearly impossible within the current framework. At least, impossible to implement it in a correct way.
The feature would work as follows:
There would be a
/plugins
directory in the project root which contains plugin directories. For example:/plugins/myplugin
.The plugin directory could contain a structure as follows:
Well, you get the picture. Basically, it would have most of the functionality that the parent application has and it could override the functionality in the parent app.
The reason I want to do this is to make it possible to add plugins outside of composer and version control.
At the moment I've actually managed to implement the feature to use controllers, models, routes and console commands. But migrations are kind of tricky because of the paths which I can't override at runtime without overriding the whole
db:migrate
command, which is a total hack.I'm willing to implement this feature at the framework level if I know it has a chance of being accepted.
So, my question would be, is this a thing that could be added?
Beta Was this translation helpful? Give feedback.
All reactions