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
feature #250 Adding a make:user command (weaverryan)
This PR was squashed before being merged into the 1.0-dev branch (closes#250).
Discussion
----------
Adding a make:user command
Hi guys!
My latest experiment π¨π»βπ¬!
**User is an Entity**
<img width="1277" alt="screen shot 2018-08-28 at 2 16 20 pm" src="https://user-images.githubusercontent.com/121003/44742077-faa57d80-aacc-11e8-8f73-acce0b669c7a.png">
**User is a Model Class**
<img width="1278" alt="screen shot 2018-08-28 at 2 11 38 pm" src="https://user-images.githubusercontent.com/121003/44742324-98994800-aacd-11e8-8ddd-8e52310dc61a.png">
This walks people through some of the most confusing parts of starting with Symfony's security so that they can get straight to writing authenticators.
A) It can generate an **entity or non-entity** `User` class
B) It sets up your **`User::getUsername()` method correctly**, which can be confusing... because often you don't have a username (e.g. you have an email)
C) It correctly **fills in `getSalt()` and `getPassword()`** based on whether or not your app actually *needs* to check passwords
D) It **updates** the `providers` and `encoders` sections in **`security.yaml` file without losing formatting or comments**. If this process fails (it's not perfect), the command will tell you exactly what YAML to update. It defaults to using `argon2i` when the system supports it.
Example generated `User` class source: `tests/Security/fixtures/expected/*`
Example generated `security.yaml` source: `tests/Security/yaml_fixtures/expected_user_class/`*
I'd love to have feedback from people trying it. You should be able to switch to the `dev-make-user` branch of this repository to get it.
Cheers!
Commits
-------
c5fb5df more phpcs fixing
603a815 reducing length of unique field to avoid index length problems
f6e273a Not requiring \in_array() style on generated code
23116fa bumping MySQL sever_version to 5.6 to fix Travis & JSON fields
3a40c86 updating to latest phpcs
c44b1d5 Getting info about cs problems
93a846d Adding make:user command
0 commit comments