Skip to content

Commit 2bbd240

Browse files
committed
Fix versions, update metafiles
1 parent 6dc8ec6 commit 2bbd240

File tree

7 files changed

+34
-48
lines changed

7 files changed

+34
-48
lines changed

.github/workflows/cs-fix.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
on:
2+
push:
3+
branches:
4+
- '*.*'
5+
6+
name: Fix Code Style
7+
8+
jobs:
9+
cs-fix:
10+
permissions:
11+
contents: write
12+
uses: spiral/gh-actions/.github/workflows/cs-fix.yml@master

.github/workflows/cs.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/phpunit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ jobs:
1313
os: >-
1414
['ubuntu-latest']
1515
php: >-
16-
['8.1', '8.2', '8.3']
16+
['8.1', '8.2', '8.3', '8.4']
1717
stability: >-
1818
['prefer-lowest', 'prefer-stable']

.github/workflows/psalm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ jobs:
1313
os: >-
1414
['ubuntu-latest']
1515
php: >-
16-
['8.2']
16+
['8.3']

.php-cs-fixer.dist.php

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,10 @@
22

33
declare(strict_types=1);
44

5-
if (!file_exists(__DIR__.'/src')) {
6-
exit(0);
7-
}
5+
require_once 'vendor/autoload.php';
86

9-
return (new PhpCsFixer\Config())
10-
->setRules([
11-
'@PSR12' => true,
12-
'ternary_operator_spaces' => false,
13-
])
14-
->setRiskyAllowed(true)
15-
->setFinder(
16-
(new PhpCsFixer\Finder())
17-
->in(__DIR__.'/src')
18-
->append([__FILE__])
19-
)
20-
->setCacheFile('.php-cs-fixer.cache');
7+
return \Spiral\CodeStyle\Builder::create()
8+
->include(__DIR__ . '/src')
9+
->include(__DIR__ . '/tests')
10+
->include(__FILE__)
11+
->build();

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@
2424
],
2525
"require": {
2626
"php": ">=8.1",
27-
"symfony/property-info": "^6.3 || ^7.0",
28-
"phpstan/phpdoc-parser": "^2.1",
27+
"symfony/property-info": "^6.4.18 || ^7.2",
28+
"phpstan/phpdoc-parser": "^1.33 | ^2.1",
2929
"phpdocumentor/reflection-docblock": "^5.3"
3030
},
3131
"require-dev": {
32-
"roave/security-advisories": "dev-latest",
33-
"phpunit/phpunit": "^10.4",
34-
"friendsofphp/php-cs-fixer": "^3.38",
35-
"vimeo/psalm": "^5.15"
32+
"phpunit/phpunit": "^10.5.45",
33+
"spiral/code-style": "^2.2.2",
34+
"vimeo/psalm": "^5.26.1 || ^6.10"
3635
},
3736
"autoload": {
3837
"psr-4": {
@@ -45,8 +44,9 @@
4544
}
4645
},
4746
"scripts": {
48-
"test": "vendor/bin/phpunit",
49-
"psalm": "vendor/bin/psalm --config=psalm.xml ./src"
47+
"cs:fix": "php-cs-fixer fix -v",
48+
"test": "phpunit",
49+
"psalm": "psalm"
5050
},
5151
"config": {
5252
"sort-packages": true

psalm.xml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<?xml version="1.0"?>
2-
<psalm
3-
errorLevel="2"
4-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xmlns="https://getpsalm.org/schema/config"
6-
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
7-
findUnusedCode="false"
8-
findUnusedBaselineEntry="true"
2+
<psalm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="https://getpsalm.org/schema/config"
4+
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
5+
errorLevel="2"
6+
findUnusedCode="false"
7+
findUnusedBaselineEntry="true"
98
>
109
<projectFiles>
1110
<directory name="src" />

0 commit comments

Comments
 (0)