Skip to content

Commit 31c63ca

Browse files
authored
Merge pull request #5 from FLUX-SE/3.0
Clean deps and upgrade to Symfony 7
2 parents b595fdd + 4332de6 commit 31c63ca

File tree

8 files changed

+36
-39
lines changed

8 files changed

+36
-39
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,15 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
php: [7.3, 7.4, 8.0]
23-
symfony: [^4.4, ^5.4, ^6.0]
24-
25-
exclude:
26-
-
27-
php: 7.3
28-
symfony: ^6.0
29-
-
30-
php: 7.4
31-
symfony: ^6.0
22+
php: [8.2, 8.3, 8.4]
23+
symfony: [^6.4, ^7.2]
3224

3325
env:
3426
APP_ENV: test
3527

3628
steps:
3729
-
38-
uses: actions/checkout@v2
30+
uses: actions/checkout@v4
3931

4032
-
4133
name: Setup PHP
@@ -53,11 +45,11 @@ jobs:
5345
-
5446
name: Get Composer cache directory
5547
id: composer-cache
56-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
48+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
5749

5850
-
5951
name: Cache Composer
60-
uses: actions/cache@v2
52+
uses: actions/cache@v3
6153
with:
6254
path: ${{ steps.composer-cache.outputs.dir }}
6355
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}

composer.json

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,36 @@
66
"require": {
77
"flux-se/payum-stripe": "^2.0",
88
"payum/payum-bundle": "^2.4",
9-
"symfony/http-kernel": "^4.4|^5.4|^6.0",
10-
"symfony/dependency-injection": "^4.4|^5.4|^6.0",
11-
"symfony/config": "^4.4|^5.4|^6.0"
9+
"symfony/http-kernel": "^6.4 | ^7.2",
10+
"symfony/dependency-injection": "^6.4 | ^7.2",
11+
"symfony/config": "^6.4 | ^7.2"
1212
},
1313
"require-dev": {
14-
"phpunit/phpunit": "^8|^9",
15-
"symplify/easy-coding-standard": "^11",
14+
"phpunit/phpunit": "^10",
15+
"symplify/easy-coding-standard": "^12",
1616
"php-http/guzzle6-adapter": "^2.0",
17-
"phpstan/phpstan": "^1",
18-
"vimeo/psalm": "^4.3"
17+
"phpstan/extension-installer": "^1.4",
18+
"phpstan/phpstan-symfony": "^1.4"
1919
},
2020
"autoload": {
2121
"psr-4": { "FluxSE\\PayumStripeBundle\\": "src/" }
2222
},
2323
"autoload-dev": {
2424
"psr-4": { "Tests\\FluxSE\\PayumStripeBundle\\": "tests/" }
2525
},
26+
"config": {
27+
"allow-plugins": {
28+
"phpstan/extension-installer": true
29+
}
30+
},
2631
"scripts": {
2732
"analyse": [
2833
"@composer validate --strict",
29-
"vendor/bin/ecs check .",
30-
"vendor/bin/phpstan.phar analyse -c phpstan.neon -l max src/",
31-
"vendor/bin/psalm"
34+
"vendor/bin/ecs check",
35+
"vendor/bin/phpstan.phar analyse"
3236
],
3337
"fix": [
34-
"vendor/bin/ecs check . --fix"
38+
"vendor/bin/ecs check --fix"
3539
]
3640
},
3741
"extra": {

ecs.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
use Symplify\EasyCodingStandard\Config\ECSConfig;
66

7-
return static function (ECSConfig $ecsConfig): void {
8-
$ecsConfig->import(__DIR__ . '/vendor/symplify/easy-coding-standard/config/set/psr12.php');
9-
};
7+
return ECSConfig::configure()
8+
->withSets([
9+
'vendor/symplify/easy-coding-standard/config/set/psr12.php',
10+
])
11+
->withPaths([
12+
'src',
13+
'tests',
14+
])
15+
;

phpstan.neon

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

phpstan.neon.dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
parameters:
22
reportUnmatchedIgnoredErrors: false
33

4+
level: max
5+
46
paths:
57
- src
68
- tests

src/DependencyInjection/FluxSEPayumStripeExtension.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,11 @@
1212

1313
class FluxSEPayumStripeExtension extends Extension
1414
{
15-
/**
16-
* @param string[] $configs
17-
*
18-
* @throws Exception
19-
*/
2015
public function load(array $configs, ContainerBuilder $container): void
2116
{
2217
$loader = new YamlFileLoader(
2318
$container,
24-
new FileLocator(dirname(__DIR__) . '/Resources/config')
19+
new FileLocator(dirname(__DIR__) . '/../config')
2520
);
2621
$loader->load('services.yaml');
2722
}

src/FluxSEPayumStripeBundle.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@
88

99
class FluxSEPayumStripeBundle extends Bundle
1010
{
11+
public function getPath(): string
12+
{
13+
return dirname(__DIR__);
14+
}
1115
}

0 commit comments

Comments
 (0)