From 8fdd31762676f1422afb9b1863caa24082a2aab2 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Fri, 1 Sep 2023 15:02:33 +0200 Subject: [PATCH] allow typed versions of simplecache too --- .github/workflows/test-application.yaml | 5 +++++ CHANGELOG.md | 3 ++- composer.json | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-application.yaml b/.github/workflows/test-application.yaml index 77c78142..82c2c1d1 100644 --- a/.github/workflows/test-application.yaml +++ b/.github/workflows/test-application.yaml @@ -72,6 +72,11 @@ jobs: extensions: "pdo, pdo_sqlite, pdo_mysql, mysql, pdo_pgsql" tools: 'composer:v2' + - name: PHP 8.0 simple cache + # Symfony 5 is not compatible with SimpleCache 3 but does not declare a conflict. Symfony 6 can not be installed on PHP 8.0. + if: ${{ '8.0' == matrix.php-version }} + run: composer require psr/simple-cache "^2.0" --no-update + - name: Install dependencies with Composer uses: ramsey/composer-install@v2 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index dc4323e2..f2061da3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,12 @@ Changelog 2.0.0 (unreleased) ------------------ -* Added static typing whereever possible. This should not change anything, but the added strictness +* Added static typing wherever possible. This should not change anything, but the added strictness might trigger errors where it was more tolerant for incorrect types before. * Renamed cli-config.php.dist to cli-config.dist.php and cleaned up to be better documented. * [BC Break]: CachedClient now expects a PSR-16 cache rather than the abandoned doctrine/cache. When instantiating the client, you need to provide at least the cache instance for metadata, as CachedClient does not know which implementation to pick. +* If you are on PHP 8.0 and install Jackalope with `symfony/cache`, you need to restrict `psr/simple-cache` to `^1.0 || ^2.0` in your application because Symfony 5 does not declare a conflict with it, but fails at runtime. * Drop support for PHP 7. * Fixed: While it is allowed to call `Repository::login` with `null` credentials, there used to be an error. It now correctly works. If you use `jcr:createdBy` or `jcr:lastModifiedBy` in node types, those properties are not set if the credentials are `null`. diff --git a/composer.json b/composer.json index d9798960..50946db6 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "phpcr/phpcr": "~2.1.5", "phpcr/phpcr-utils": "^1.8.0", "jackalope/jackalope": "^2.0.0-beta2", - "psr/simple-cache": "^1.0" + "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" }, "provide": { "jackalope/jackalope-transport": "2.0.0"