-
Notifications
You must be signed in to change notification settings - Fork 2
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
Rejuvinate the Stepup Middleware #416
base: main
Are you sure you want to change the base?
Conversation
1ec4235
to
78ee79c
Compare
ea8aa70
to
4e910cc
Compare
They are monitored using Dependabot
The latest and greatest dependencies are installed.
The composer packages have been upgraded. Some code is now broken as proven by tests. This commit aims to eat the low hanging fruits, and get the tests as green as possible. The harder nuts will be fixed in the following commits
In v6, we set the rootnode name in the constructor of the tree builder. And then retrieve the rootnode via a getter
For now they: - Implement the find method (add return types) - Use the bridge ManagerRegistry
1. Added return type definitions 2. When possible; add parameter type definitions 3. Use imports, remove FQN
Simplify certain code constructs like: - Simplify return statement - Make 'is empty' statements more specific - Simplify regex statements
As performed by Rectors SYMFONY_CODE_QUALITY set list
And clean up the code accordingly
Many repos referred to a moved ManagerRegistry class. That was changed in this commit
Type definitions have been added where possible
5e544dc
to
b5071f9
Compare
9a06585
to
9d834af
Compare
This is done to prevent failing replays
Fix bugs after manual testing
d4cd580
to
894632a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work @pablothedude. This was quite an undertaking!
I have some questions, submitted as comments in this review thread, but also have a couple of peer review questions I'd like to look at with you IRL.
src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SelfVetOptionType.php
Show resolved
Hide resolved
src/Surfnet/StepupMiddleware/GatewayBundle/Entity/InstitutionConfiguration.php
Show resolved
Hide resolved
src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php
Outdated
Show resolved
Hide resolved
src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved ✔️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm about halfway through.
Submitting some minor points. Some might already be fixed, feel free to resolve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed with Bas.
After the points above are reviewed by Bas, I think its OK.
Some issues might still occur because of strict typing, but I don't think we can catch those by reviewing more.
Addressed all feedback |
The aim of this PR is to make the Stepup-Middleware project compatible with PHP 8.2 and Symfony 6.4.
This is not simply achieved by installing those requirements and call it a day. Many of the project dependencies need to be made compatible with the new standards Symfony adheres to. And that can quickly become a slippery slope.
In this PR so far I mainly focussed on improving the code quality to modern standards. For example by implementing PHP Stan's rules. Almost the entire app has been made type safe and PHP 8 compatible.
Some major steps to take are:
config/packages/[dev/prod/...]
folders and merge them into the main package config/migrations
folder imho, and be excluded from qa tests?For more details on things to do, this private Google Drive document shows more information and an estimation on what's left to do.