Skip to content

Update psr/simple-cache version constraint#339

Merged
tboothman merged 1 commit intotboothman:masterfrom
DariusIII:patch-1
Jan 7, 2026
Merged

Update psr/simple-cache version constraint#339
tboothman merged 1 commit intotboothman:masterfrom
DariusIII:patch-1

Conversation

@DariusIII
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings September 16, 2025 21:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Updates the PSR Simple Cache dependency constraint to support both version 1.0 and 3.0 branches, providing compatibility with newer versions of the PSR Simple Cache interface.

  • Expanded version constraint from ^1.0 to ^1.0|^3.0 for psr/simple-cache dependency

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@trovster
Copy link
Copy Markdown

trovster commented Jan 7, 2026

Could this be merged? I am getting conflicts with other dependencies (PHPUnit, Pest).

@tboothman
Copy link
Copy Markdown
Owner

Sure. I've not written any PHP in a long time but from what I can gather from https://www.php-fig.org/psr/psr-16/meta/#82-type-additions the interface is the same it's just got types so it shouldn't make any difference to this library

@tboothman tboothman merged commit 4ca0ea6 into tboothman:master Jan 7, 2026
@trovster
Copy link
Copy Markdown

trovster commented Jan 8, 2026

Perfect, thanks for this.

@CicerBro
Copy link
Copy Markdown
Contributor

Could we get a new tagged release too? ;-)

@tboothman
Copy link
Copy Markdown
Owner

Enjoy https://github.com/tboothman/imdbphp/releases/tag/v8.3.2

@trovster
Copy link
Copy Markdown

Strange. I am now just getting an error with this, which I'm sure I wasn't when using the PR:

Declaration of Imdb\Cache::get($key, $default = null) must be compatible with Psr\SimpleCache\CacheInterface::get(string $key, mixed $default = null): mixed

@trovster
Copy link
Copy Markdown

If anyone needs this, I have solved this by using https://github.com/cweagans/composer-patches and applying a patch to the Cache.php file.

I have attached the patch file I have used – psr-cache.patch

Below is the composer.json extra information:

"extra": {
    "patches": {
        "imdbphp/imdbphp": [
            {
                "description": "Add typehints to IMDBPHP to support psr/simple-cache v3",
                "url": "patches/imdbphp/imdbphp/psr-cache.patch"
            }
        ]
    }
},

@trovster trovster mentioned this pull request Mar 3, 2026
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.

5 participants