From b15375f9bac966ca5bf62218c7c1cdc1bc9fceed Mon Sep 17 00:00:00 2001 From: Sammyjo20 <29132017+Sammyjo20@users.noreply.github.com> Date: Thu, 20 Nov 2025 23:39:50 +0000 Subject: [PATCH 1/5] Feature | PHP 8.5 Support --- .github/workflows/php-cs-fixer.yml | 30 +++++++++++++++++++++--------- .github/workflows/tests.yml | 4 ++-- .phpunit.cache/test-results | 1 + composer.json | 7 +++---- 4 files changed, 27 insertions(+), 15 deletions(-) create mode 100644 .phpunit.cache/test-results diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml index 5b8a976..00ec14d 100644 --- a/.github/workflows/php-cs-fixer.yml +++ b/.github/workflows/php-cs-fixer.yml @@ -13,18 +13,30 @@ on: permissions: contents: write +concurrency: + group: ${{ github.head_ref || github.ref || github.run_id }}_php_cs_fixer + cancel-in-progress: true + jobs: - php-cs-fixer: + lint: runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Run PHP CS Fixer - uses: docker://oskarstark/php-cs-fixer-ga + - uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 with: - args: --config=.php-cs-fixer.dist.php --allow-risky=yes - - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4 + php-version: '8.2' + + - name: Install Dependencies + run: | + composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist + + - name: Run PHP CS Fixer + run: ./vendor/bin/php-cs-fixer fix --allow-risky=yes + + - name: Commit Changes + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: 🪄 Code Style Fixes + commit_options: '--no-verify' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a15d439..1fdc01c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,14 +20,14 @@ jobs: fail-fast: true matrix: os: [ ubuntu-latest, windows-latest ] - php: [ 8.1, 8.2 ] + php: [ 8.2, 8.3, 8.4 ] stability: [ prefer-lowest, prefer-stable ] name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }} steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v5 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results new file mode 100644 index 0000000..a9088a2 --- /dev/null +++ b/.phpunit.cache/test-results @@ -0,0 +1 @@ +{"version":"pest_4.1.3","defects":[],"times":{"P\\Tests\\Feature\\CacheTest::__pest_evaluable_a_request_with_the_HasCaching_trait_will_cache_the_response_with_a_real_request":0.131,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_a_request_with_the_HasCaching_trait_will_cache_the_response":0.002,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_a_request_with_the_HasCaching_trait_will_cache_the_response_with_string_body":0.001,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_it_wont_cache_on_anything_other_than_GET_and_OPTIONS":0.001,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_it_will_cache_post_requests_if_you_customise_the_cacheableMethods_method":0.001,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_a_response_will_not_be_cached_if_the_response_was_not_2xx":0.001,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_a_custom_cache_key_can_be_provided_on_the_response":0.001,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_query_parameters_are_used_in_the_cache_key":0.001,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_body_can_be_used_in_the_cache_key":0.001,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_you_will_not_receive_a_cached_response_if_the_response_has_expired":3.007,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_you_can_define_a_cache_on_the_connector_and_it_returns_a_cached_response":0.003,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_if_a_request_has_cache_configuration_then_it_will_take_priority_over_the_connectors":0.004,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_you_can_disable_the_cache":0.003,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_cache_can_be_invalidated":0.003,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_it_throws_an_exception_if_you_use_the_HasCaching_trait_without_the_Cacheable_interface":0.002,"P\\Tests\\Feature\\Laravel\\LaravelCacheDriverTest::__pest_evaluable_it_will_return_a_cached_response":0.021,"P\\Tests\\Feature\\PsrCacheDriverTest::__pest_evaluable_it_will_return_a_cached_response":0.001}} \ No newline at end of file diff --git a/composer.json b/composer.json index de2617b..35bf78a 100644 --- a/composer.json +++ b/composer.json @@ -17,15 +17,14 @@ ], "minimum-stability": "stable", "require": { - "php": "^8.1", + "php": "^8.2", "saloonphp/saloon": "^3.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.13", - "pestphp/pest": "^2.3", - "spatie/ray": "^1.34.2", + "pestphp/pest": "^2.3 || ^4.0", "league/flysystem": "^3.12.2", - "orchestra/testbench": "^8.0", + "orchestra/testbench": "^9.0 || ^10.0", "psr/simple-cache": "^3.0" }, "scripts": { From 30819baf257971145cc212a0ce754bd03dd6121c Mon Sep 17 00:00:00 2001 From: Sammyjo20 <29132017+Sammyjo20@users.noreply.github.com> Date: Thu, 20 Nov 2025 23:40:21 +0000 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=AA=84=20Code=20Style=20Fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Data/CachedResponse.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Data/CachedResponse.php b/src/Data/CachedResponse.php index fcffb93..e9c7b70 100644 --- a/src/Data/CachedResponse.php +++ b/src/Data/CachedResponse.php @@ -15,9 +15,9 @@ class CachedResponse * Constructor */ public function __construct( - readonly public RecordedResponse $recordedResponse, - readonly public DateTimeImmutable $expiresAt, - readonly public int $ttl, + public readonly RecordedResponse $recordedResponse, + public readonly DateTimeImmutable $expiresAt, + public readonly int $ttl, ) { // } From 5b16852df74513af432d8b451711fbf486228668 Mon Sep 17 00:00:00 2001 From: Sammyjo20 <29132017+Sammyjo20@users.noreply.github.com> Date: Thu, 20 Nov 2025 23:40:19 +0000 Subject: [PATCH 3/5] Removed PHPUnit cache --- .phpunit.cache/test-results | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .phpunit.cache/test-results diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results deleted file mode 100644 index a9088a2..0000000 --- a/.phpunit.cache/test-results +++ /dev/null @@ -1 +0,0 @@ -{"version":"pest_4.1.3","defects":[],"times":{"P\\Tests\\Feature\\CacheTest::__pest_evaluable_a_request_with_the_HasCaching_trait_will_cache_the_response_with_a_real_request":0.131,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_a_request_with_the_HasCaching_trait_will_cache_the_response":0.002,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_a_request_with_the_HasCaching_trait_will_cache_the_response_with_string_body":0.001,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_it_wont_cache_on_anything_other_than_GET_and_OPTIONS":0.001,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_it_will_cache_post_requests_if_you_customise_the_cacheableMethods_method":0.001,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_a_response_will_not_be_cached_if_the_response_was_not_2xx":0.001,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_a_custom_cache_key_can_be_provided_on_the_response":0.001,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_query_parameters_are_used_in_the_cache_key":0.001,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_body_can_be_used_in_the_cache_key":0.001,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_you_will_not_receive_a_cached_response_if_the_response_has_expired":3.007,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_you_can_define_a_cache_on_the_connector_and_it_returns_a_cached_response":0.003,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_if_a_request_has_cache_configuration_then_it_will_take_priority_over_the_connectors":0.004,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_you_can_disable_the_cache":0.003,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_cache_can_be_invalidated":0.003,"P\\Tests\\Feature\\CacheTest::__pest_evaluable_it_throws_an_exception_if_you_use_the_HasCaching_trait_without_the_Cacheable_interface":0.002,"P\\Tests\\Feature\\Laravel\\LaravelCacheDriverTest::__pest_evaluable_it_will_return_a_cached_response":0.021,"P\\Tests\\Feature\\PsrCacheDriverTest::__pest_evaluable_it_will_return_a_cached_response":0.001}} \ No newline at end of file From f382f6a2cdfbb7f9f54134d22fcb95f762625c67 Mon Sep 17 00:00:00 2001 From: Sammyjo20 <29132017+Sammyjo20@users.noreply.github.com> Date: Thu, 20 Nov 2025 23:40:32 +0000 Subject: [PATCH 4/5] Ignore phpunit cache --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d10c490..ebba8f6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ vendor .php-cs-fixer.cache .phpunit.result.cache tests/cache +.phpunit.cache From 27c84a9f6a0317158e07b058cb33324e914094e6 Mon Sep 17 00:00:00 2001 From: Sammyjo20 <29132017+Sammyjo20@users.noreply.github.com> Date: Thu, 20 Nov 2025 23:43:12 +0000 Subject: [PATCH 5/5] Bump minimum version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 35bf78a..74b0776 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "friendsofphp/php-cs-fixer": "^3.13", "pestphp/pest": "^2.3 || ^4.0", "league/flysystem": "^3.12.2", - "orchestra/testbench": "^9.0 || ^10.0", + "orchestra/testbench": "^9.15 || ^10.7", "psr/simple-cache": "^3.0" }, "scripts": {