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

Add basic test with long key #86

Merged
merged 1 commit into from Aug 7, 2017
Merged

Add basic test with long key #86

merged 1 commit into from Aug 7, 2017

Conversation

nicolas-grekas
Copy link
Collaborator

@nicolas-grekas nicolas-grekas commented Aug 7, 2017

We have a bug in Symfony, this test will ensure nobody will make the same mistake.
See symfony/symfony#23763

@prisis prisis merged commit 2dbf2f6 into php-cache:master Aug 7, 2017
@prisis
Copy link
Contributor

prisis commented Aug 7, 2017

Thank you :)

@nicolas-grekas nicolas-grekas deleted the long-keys branch August 7, 2017 09:04

$pool = $this->createCachePool();

$key = str_repeat('a', 300);

Choose a reason for hiding this comment

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

This should never happen as per PSR-16, which has a maximum cap of 64 chars: https://www.php-fig.org/psr/psr-16/

Copy link

Choose a reason for hiding this comment

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

Actually, it is a minimum of 64 chars.

Implementing libraries MAY support additional characters and encodings or longer lengths, but MUST support at least that minimum. 

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.

None yet

4 participants