TablerBundle icon indicating copy to clipboard operation
TablerBundle copied to clipboard

Though on `symfonycasts/reset-password-bundle`

Open cavasinf opened this issue 3 years ago • 7 comments

FOSUserBundle being deprecated, Symfony allows devs by using MakerBundle to implement what is missing from FOSUserBundle. eg :

  • make:user
  • make:reset-password depend on symfonycasts/reset-password-bundle
  • make:registration-form
  • ...

ATM, TablerBundle use raw input and custom names to implement the template, which doesn't work with what MakerBundle has created.

Wouldn't it be better to use forms that MakerBundle "auto-code/auto-create" ? Instead of creating our own form by raw html inputs.

I know Tabler.io use raw inputs to match with most uses, but in our case we are making a Bundle for Symfony. It will be more natural to use Symfony form instead of manual HTML inputs.

What do you think about that @kevinpapst ?

cavasinf avatar Dec 08 '21 10:12 cavasinf

I love the idea. The bundle should propagate best practices. This form is how I use it for "historical reasons". But I am entirely open to improve that. We just should make sure that we talk about the Symfony version that we want to target. What about the new security system that was beta in SF5 and is now the default in SF6? I guess there are changes as well. Keeping several forms would work, but is a nasty job to maintain...

kevinpapst avatar Dec 08 '21 13:12 kevinpapst

the new security system that was beta in SF5 and is now the default in SF6

Can you provide me any links about that ?

cavasinf avatar Dec 08 '21 13:12 cavasinf

There is a crazy machine, which tries to find stuff for you ... I think it is called Google 😁 Try to search for "symfony updated security system" or stuff like that. It was introduced with 5.2 and then further improved. Most of the time I follow Twitter and RSS links... which I do not bookmark.

kevinpapst avatar Dec 08 '21 13:12 kevinpapst

Ah yes ! I've implemented it yesterday when I was upgrading Symfony 4, it's a big improvement by Symfony.

It was introduced with 5.2

So, does that mean that TablerBundle will be for >= SF5 🤔. SF4 implements will end at end 2022 and die at end 2023. https://symfony.com/releases

TBH I upgrade it because of that (and PHP 8 too)

cavasinf avatar Dec 08 '21 14:12 cavasinf

Yeah. Maybe the bundle should be SF 5+ only. Just not right now, because my app is in the process of upgrading and I expect it to be a longer task, as I have SAML and LDAP stuff as well, which might become a nightmare during the upgrade...

kevinpapst avatar Dec 08 '21 14:12 kevinpapst

Back to topic: if you want to integrate a new form, please do so. I am a one man show and this bundle is only here, becuase I want to share the work I have to do anyways for my app. And I do make mistakes, a lot of them 😁 so any input to make it better is highly appreciated!

kevinpapst avatar Dec 08 '21 14:12 kevinpapst

Which security system is active in Symfony has little effect on this, right?

Both the 'old' security system and the new one have some sort of authenticator class, which takes the parameters out of the request and does 'the thing'.

So, which parameters to take out of the request has nothing to do with the security system in place, and thus with the Symfony version.

The only thing - I think - this issue wanted, is to align the form input names used in the examples / templates, with what bin/console make:auth scaffolds for users (that scaffolds an authenticator / guard class and thus scaffolds the code to retrieve user/password/remember_me/csrf from the request). It's nothing but 'aligning defaults' to streamline the development experience, I guess.

Am I correct in this? Because otherwise I don't get it :).

jorismak avatar Feb 28 '23 20:02 jorismak