Skip to content

Commit 09681a1

Browse files
committed
fix deprecations
1 parent f13d0e6 commit 09681a1

File tree

5 files changed

+43
-27
lines changed

5 files changed

+43
-27
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ on:
99

1010
jobs:
1111
testsuite:
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-24.04
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
php-version: ['8.1']
16+
php-version: ['8.2', '8.3', '8.4']
1717
db-type: ['sqlite', 'mysql', 'pgsql']
1818
prefer-lowest: ['']
1919
include:
20-
- php-version: '8.1'
20+
- php-version: '8.2'
2121
db-type: 'sqlite'
2222
prefer-lowest: 'prefer-lowest'
2323

@@ -90,20 +90,20 @@ jobs:
9090
run: if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then vendor/bin/validate-prefer-lowest -m; fi
9191

9292
- name: Code Coverage Report
93-
if: success() && matrix.php-version == '8.1' && matrix.db-type == 'sqlite'
93+
if: success() && matrix.php-version == '8.2' && matrix.db-type == 'sqlite'
9494
uses: codecov/codecov-action@v1
9595

9696
validation:
9797
name: Coding Standard & Static Analysis
98-
runs-on: ubuntu-22.04
98+
runs-on: ubuntu-24.04
9999

100100
steps:
101101
- uses: actions/checkout@v2
102102

103103
- name: Setup PHP
104104
uses: shivammathur/setup-php@v2
105105
with:
106-
php-version: '8.1'
106+
php-version: '8.4'
107107
extensions: mbstring, intl
108108
coverage: none
109109

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
"license": "MIT",
66
"require": {
77
"php": ">=8.1",
8-
"cakephp/cakephp": "^5.0"
8+
"cakephp/cakephp": "5.3.0-RC2"
99
},
1010
"require-dev": {
11-
"cakedc/cakephp-phpstan": "^3.0",
11+
"cakedc/cakephp-phpstan": "^4.0",
1212
"cakephp/cakephp-codesniffer": "^5.0.0",
13-
"phpunit/phpunit": "^10.1.0"
13+
"phpunit/phpunit": "^10.1.0 || ^11 || ^12"
1414
},
1515
"autoload": {
1616
"psr-4": {
@@ -36,7 +36,7 @@
3636
"cs-check": "phpcs --colors --parallel=16 -p src/",
3737
"cs-fix": "phpcbf --colors --parallel=16 -p src/",
3838
"stan": "phpstan analyse",
39-
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^1.7.0 && mv composer.backup composer.json",
39+
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^2.1.0 && mv composer.backup composer.json",
4040
"lowest-setup": "composer update --prefer-lowest --prefer-stable --prefer-dist --no-interaction && cp composer.json composer.backup && composer require --dev dereuromark/composer-prefer-lowest && mv composer.backup composer.json"
4141
},
4242
"prefer-stable": true

phpstan.neon

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
parameters:
22
level: 6
3-
checkMissingIterableValueType: false
4-
checkGenericClassInNonGenericObjectType: false
5-
paths:
6-
- src
73
bootstrapFiles:
84
- tests/bootstrap.php
5+
paths:
6+
- src
7+
ignoreErrors:
8+
- identifier: missingType.generics
9+
- identifier: missingType.iterableValue
910

1011
includes:
1112
- vendor/cakedc/cakephp-phpstan/extension.neon

src/Plugin.php

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,8 @@
88
use Cake\Core\PluginApplicationInterface;
99

1010
/**
11-
* Plugin for ViteHelper
11+
* @deprecated 2.5.0 Use ViteHelperPlugin instead
1212
*/
13-
class Plugin extends BasePlugin
13+
class Plugin extends ViteHelperPlugin
1414
{
15-
/**
16-
* @inheritDoc
17-
*/
18-
public function bootstrap(PluginApplicationInterface $app): void
19-
{
20-
parent::bootstrap($app);
21-
22-
if (file_exists(ROOT . DS . 'config' . DS . 'app_vite.php')) {
23-
Configure::load('app_vite');
24-
}
25-
}
2615
}

src/ViteHelperPlugin.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
namespace ViteHelper;
5+
6+
use Cake\Core\BasePlugin;
7+
use Cake\Core\Configure;
8+
use Cake\Core\PluginApplicationInterface;
9+
10+
/**
11+
* Plugin for ViteHelper
12+
*/
13+
class ViteHelperPlugin extends BasePlugin
14+
{
15+
/**
16+
* @inheritDoc
17+
*/
18+
public function bootstrap(PluginApplicationInterface $app): void
19+
{
20+
parent::bootstrap($app);
21+
22+
if (file_exists(ROOT . DS . 'config' . DS . 'app_vite.php')) {
23+
Configure::load('app_vite');
24+
}
25+
}
26+
}

0 commit comments

Comments
 (0)