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

PSR: Cache #4667

Merged
merged 7 commits into from
May 11, 2021
Merged

PSR: Cache #4667

merged 7 commits into from
May 11, 2021

Conversation

MGatner
Copy link
Member

@MGatner MGatner commented May 10, 2021

Description
The core framework intentionally does not aim to meet all PSR interfaces, which for the most part works fine. Some PSR components allowing provisions for libraries and projects that complete the requirements. In this case, having adapters available in the framework itself can prevent CodeIgniter users from having to install additional third-party libraries that duplicate functionality.

This is the first PR to add adapters for PSR components, targeting Cache. There are two Cache PSR's from FIG:

These adapters sit on top of CodeIgniter\Cache's handlers. Because of the additional layer the PSR adapters are not recommended for direct use except when the PSR interfaces are required.

Tests are provided by php-cache who offers complete integration testing for PSR-6 and PSR-16 implementations.

Checklist:

  • Securely signed commits
  • Component(s) with PHPdocs
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@MGatner MGatner force-pushed the psr-cache branch 2 times, most recently from 27c3461 to 4f2f932 Compare May 11, 2021 01:18
@MGatner MGatner requested a review from lonnieezell May 11, 2021 01:44
Copy link
Member

@lonnieezell lonnieezell left a comment

Choose a reason for hiding this comment

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

I have no problem with this and the implementation looks fine. I just left one comment.

system/Psr/Cache/Pool.php Outdated Show resolved Hide resolved
@MGatner
Copy link
Member Author

MGatner commented May 11, 2021

@samsonasik any idea about this Rector error causing test failures?

Class                                                                  
         'Symplify\ComposerJsonManipulator\Bundle\ComposerJsonManipulatorBundle' not found

@samsonasik
Copy link
Member

@MGatner please rebase and re-run composer update, it fixed at #4671 (comment)

@MGatner
Copy link
Member Author

MGatner commented May 11, 2021

Ah great, thank you! I missed that - that's what I get for skipping my morning review 🙄

@MGatner MGatner merged commit d59c6d2 into codeigniter4:develop May 11, 2021
@MGatner MGatner deleted the psr-cache branch May 11, 2021 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants