ltb-project / self-service-password

Web interface to change and reset password in an LDAP directory
https://self-service-password.readthedocs.io/en/latest/
GNU General Public License v3.0
1.16k stars 326 forks source link

Use Smarty framework #109

Closed Kage closed 4 years ago

Kage commented 7 years ago

I've become a big fan of the Silex PHP framework, and was wondering what your thoughts are on rewriting it to fit? That way it has a proper router, dependency injection, etc., and dependencies can be easily managed with Composer.

I have a FOSS project I'll be publishing soon on my community that could also work as an excellent skeleton framework to merge this into.

So.. thoughts?

coudot commented 7 years ago

Why not. For LTB White Pages I used Smarty which is also a good solution.

plewin commented 7 years ago

I believe SSP should implement the first PSRs (coding standard, code style, logging, autoloader) and refactor most of the code before thinking about porting to a microframework or even any framework. This could be targetted for 1.2.

coudot commented 7 years ago

Yes, there is a lot of work before this. I think if we achieve to rewrite SSP with a framework, we could release it as 2.0. For the moment we will try to release 1.1 and add new features in 1.x branch.

ntoniazzi commented 6 years ago

Silex has officially been deprecated, so another framework would be needed (Symfony).

plewin commented 6 years ago

Yes silex is deprecated, I work on an new major version based on symphony components

On Fri, Jun 15, 2018, 18:13 ntoniazzi notifications@github.com wrote:

Silex has officially been deprecated http://symfony.com/blog/the-end-of-silex, so another framework would be needed (Symfony).

— You are receiving this because you were assigned.

Reply to this email directly, view it on GitHub https://github.com/ltb-project/self-service-password/issues/109#issuecomment-397669949, or mute the thread https://github.com/notifications/unsubscribe-auth/AArKrUPRuKjFPYXqPDODDK_i5wW2RFhyks5t8900gaJpZM4NUYtw .

Kage commented 6 years ago

Indeed. I would recommend Slim Framework instead of a full-fledged Symfony app for two reasons:

  1. Symfony 3.4 is quite cumbersome, and Symfony 4+ requires PHP 7.2 (thus severely limiting the audience for SSP). Integrating SSP into either would probably be quite onerous and require a complete recode of everything.
  2. Slim allows for basic framework control (router, PSR by default), but is very lightweight and would probably allow for reusing a lot of existing SSP code.

I've noticed Smarty mentioned elsewhere, and I would instead strongly recommend using Twig for templating. Smarty is also cumbersome, whereas Twig is quite lightweight and has much more community support.

coudot commented 6 years ago

I used Smarty for LTB White Pages and it would be better for me to have the same framework for SSP

Kage commented 6 years ago

Fair enough. :P

coudot commented 4 years ago

Work done by @JuJuMDX, a PR is coming