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

Road to version 2 - Refactor and rewrite most of the library #33

Merged
merged 30 commits into from May 2, 2022

Conversation

drupol
Copy link
Member

@drupol drupol commented Apr 14, 2022

This PR

  • This will be the future version of cas-lib (version 2)
  • Break backward compatibility
  • Make sure that the CAS service is stateless by avoiding injecting the $request in the CAS constructor, also make sure that the Request is passed to each relevant method instead of being injected in the constructor.
  • Make it PSR15 compatible
  • Simplify configuration, get rid of allowed_parameters property.
  • Merge handlers, services and redirect classes.
  • Remove the dependency to monolog/monolog and throw exceptions when needed.
  • Remove Introspector, use Response decorator and factories
  • Now depends on loophp/psr17
  • Has more and updated tests

Related to ecphp/cas-bundle#63 and ecphp/cas-bundle#59
Related to ecphp/ecas#27
Related to ecphp/eu-login-bundle#40

@drupol drupol added the enhancement New feature or request label Apr 14, 2022
@drupol drupol self-assigned this Apr 14, 2022
@drupol drupol force-pushed the refactor/pass-the-request-to-each-methods branch 2 times, most recently from 45750bf to 7b12b2b Compare April 14, 2022 13:05
@drupol drupol mentioned this pull request Apr 14, 2022
1 task
@drupol drupol force-pushed the refactor/pass-the-request-to-each-methods branch 4 times, most recently from c4d9799 to 3cd0f0f Compare April 14, 2022 13:47
@drupol drupol changed the title Refactor: Pass the request to each methods Refactor: Pass $request to each CAS methods Apr 14, 2022
@drupol drupol force-pushed the refactor/pass-the-request-to-each-methods branch from af697b4 to 0aa843b Compare April 14, 2022 13:59
@drupol drupol force-pushed the refactor/pass-the-request-to-each-methods branch from 0aa843b to f884d92 Compare April 14, 2022 14:27
@drupol drupol force-pushed the refactor/pass-the-request-to-each-methods branch from d3a1b21 to 1d22bd4 Compare April 14, 2022 22:36
@drupol drupol changed the title Refactor: Pass $request to each CAS methods Road to version 2 - Refactor and rewrite most of the library Apr 14, 2022
@drupol drupol force-pushed the refactor/pass-the-request-to-each-methods branch from 1d22bd4 to 469f720 Compare April 14, 2022 22:47
@drupol drupol force-pushed the refactor/pass-the-request-to-each-methods branch from 6e6462f to bc9a8dc Compare April 15, 2022 14:33
@drupol drupol force-pushed the refactor/pass-the-request-to-each-methods branch from 0539fae to 5a3fe7d Compare April 15, 2022 21:03
@drupol drupol force-pushed the refactor/pass-the-request-to-each-methods branch from a1496b4 to 13e929d Compare April 18, 2022 08:47
Copy link

@J-Ben87 J-Ben87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks promising. I won't pretend that I got all the complexity of the lib and that I understood the reasons behind all the choices you made, but I can say that I like the way you merged the handlers, replaced the introspection by responses, simplified the configuration, and finally removed the ServerRequestInterface to inject the Request object in relevant methods instead.

Reviewing the Cas class was not made easy by all the GitHub Actions checks but I tried my best ^^

Anyway I find this version much more straight forward and easy to understand. Good job here!

docs/pages/configuration.rst Show resolved Hide resolved
@drupol drupol force-pushed the refactor/pass-the-request-to-each-methods branch from 31d7644 to 619cc7e Compare April 18, 2022 19:50
@drupol drupol mentioned this pull request Apr 20, 2022
2 tasks
@drupol drupol force-pushed the refactor/pass-the-request-to-each-methods branch from a05c55e to 5b90e2f Compare April 20, 2022 21:19
@drupol drupol mentioned this pull request Apr 21, 2022
6 tasks
@drupol drupol force-pushed the refactor/pass-the-request-to-each-methods branch from 081d2d7 to c548388 Compare May 2, 2022 11:11
@drupol drupol marked this pull request as ready for review May 2, 2022 11:35
@drupol drupol merged commit 3504b64 into master May 2, 2022
@drupol drupol deleted the refactor/pass-the-request-to-each-methods branch May 2, 2022 11:41
@drupol
Copy link
Member Author

drupol commented May 2, 2022

@J-Ben87 This branch has been merged into master branch.

In the upcoming days, I will update cas-bundle and do the same thing.

After a while testing the master branch of those packages, I'll tag'n'cut a release!

@J-Ben87
Copy link

J-Ben87 commented May 4, 2022

Thank you so much! Amazing work 💪

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

Successfully merging this pull request may close these issues.

None yet

2 participants