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

[SDK-3669] Add StoreInterface bridge for Laravel Sessions #307

Merged
merged 8 commits into from
Oct 10, 2022

Conversation

evansims
Copy link
Member

@evansims evansims commented Oct 10, 2022

Changes

This PR:

  • Adds Auth0\Laravel\Store\LaravelSession — a StoreInterface bridge to enable Auth0-PHP SDK to use Laravel's native Sessions API. This should improve our SDK support for Octane.
  • Adds Auth0\Laravel\Cache\LaravelCachePool and Auth0\Laravel\Cache\LaravelCacheItem to enable Auth0-PHP SDK to use Laravel's native Cache API for JWKS cache storage.
  • Adds Auth0\Laravel\Event\Configuration\Built — an Event type that apps can listen for, enabling them to intercept and manipulate SDK configurations dynamically before they are handed to the underlying Auth0-PHP SDK.
  • This version drops support for PHP 7.4 ahead of the official deprecation in November, due to changes in the PHP 8.0 runtime and type strictness, it is not possible to maintain compatibility for CacheItemPoolInterface between 7.x and 8.x.

This PR also makes the following unrelated adjustments, necessary for the build to succeed:

  • Updates GitHub Workflows to drop PHP 7.4 checks, and add PHP 8.2 checks.

References

Resolves #299

Testing

Contributor Checklist

@evansims evansims added this to the 7.2.0 milestone Oct 10, 2022
@codecov
Copy link

codecov bot commented Oct 10, 2022

Codecov Report

Base: 13.17% // Head: 11.44% // Decreases project coverage by -1.72% ⚠️

Coverage data is based on head (ebb2c40) compared to base (11e68db).
Patch coverage: 11.14% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #307      +/-   ##
============================================
- Coverage     13.17%   11.44%   -1.73%     
- Complexity      132      199      +67     
============================================
  Files            19       23       +4     
  Lines           334      559     +225     
============================================
+ Hits             44       64      +20     
- Misses          290      495     +205     
Impacted Files Coverage Δ
src/Auth/Guard.php 0.00% <0.00%> (ø)
src/Auth/User/Provider.php 0.00% <0.00%> (ø)
src/Auth/User/Repository.php 0.00% <0.00%> (ø)
src/Cache/LaravelCacheItem.php 0.00% <0.00%> (ø)
src/Contract/Model/User.php 0.00% <0.00%> (ø)
src/Event/Configuration/Built.php 0.00% <0.00%> (ø)
src/Event/Stateful/AuthenticationFailed.php 0.00% <0.00%> (ø)
src/Event/Stateful/AuthenticationSucceeded.php 0.00% <0.00%> (ø)
src/Http/Controller/Stateful/Callback.php 0.00% <0.00%> (ø)
src/Http/Controller/Stateful/Login.php 0.00% <0.00%> (ø)
... and 13 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@evansims evansims marked this pull request as ready for review October 10, 2022 21:36
@evansims evansims requested a review from a team as a code owner October 10, 2022 21:36
@evansims evansims merged commit 45e7ecb into main Oct 10, 2022
@evansims evansims deleted the sdk-3669/laravel-session-store branch October 10, 2022 21:37
@evansims evansims mentioned this pull request Oct 11, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using Laravel's session store for the PHP SDK's sessionStorage/transientStorage
1 participant