Skip to content
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

Change the module structure to a more Symfony based system #1286

Open
RosemaryOrchard opened this issue Feb 24, 2020 · 2 comments
Open

Change the module structure to a more Symfony based system #1286

RosemaryOrchard opened this issue Feb 24, 2020 · 2 comments

Comments

@RosemaryOrchard
Copy link
Contributor

RosemaryOrchard commented Feb 24, 2020

During the workshop in Madrid, @sgomez @jaimeperez, @tvdijen and I discussed switching the module system to a Symfony based system, for release with the coming 2.0. This would be a breaking change (modules would have to be migrated in order to work again).

Current notes/to dos:

Current proposed approach: start by restructuring a small plugin (possibly Expiry Check), and then modify simpleSAMLphp to make this work.

@sgomez
Copy link
Contributor

sgomez commented Feb 25, 2020

In Symfony, when a bundle has routes, a file should be added to config/routes directory importing this routes. So, when we create a module with routes we have two ways to import routes

  • A custom router loader (need to be implemented)
  • Add the routes in a config directory manually. This will do the installation more complicated.

First option seems the best.

@sgomez
Copy link
Contributor

sgomez commented Feb 25, 2020

Finally, I can load routes from Kernel and skip the creation of a custom router. Anyway there a lot issues to resolve:

  • There a lot of classes that depends of Modules static methods. And this search the modules in module.enable configuration (to check if it is enabled) and files inside modules directory. So, change this will require a lot of time.
  • Another issue is Dependency Injection is not working (autowiring at least). I can not trace the error. Probably something in the configuration is missing.

Right now, I can have controllers but Template class can not found twig templates. Without DI I cannot create a template service either.

Resolve this from a small modules instead from main modules is hard, because we need admin and other modules working and this will require a lot of extra logic in Module class.

I will try to use a new.php access point to load new modules in a different way that module.php does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants