Skip to content

Commit 5a0546a

Browse files
authored
Merge pull request #174 from synolia/feature/update-ci
[v2] Update CI
2 parents 86a3cb0 + 58a50a8 commit 5a0546a

36 files changed

Lines changed: 134 additions & 562 deletions

.github/workflows/analysis.yaml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
php:
2020
- 8.2
2121
symfony:
22-
- '6.2.*'
22+
- '6.4.*'
2323
env:
2424
APP_ENV: test
2525
steps:
@@ -38,7 +38,7 @@ jobs:
3838
run: 'echo "::set-output name=dir::$(composer config cache-files-dir)"'
3939
-
4040
name: 'Composer - Set cache'
41-
uses: actions/cache@v2
41+
uses: actions/cache@v4
4242
with:
4343
path: '${{ steps.composer-cache.outputs.dir }}'
4444
key: 'php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles(''**/composer.json'') }}'
@@ -58,17 +58,12 @@ jobs:
5858
id: end-of-setup
5959
-
6060
name: 'PHPStan - Run'
61-
run: 'if [ -f rulesets/phpstan.neon ]; then vendor/bin/phpstan analyse -c rulesets/phpstan.neon src/ ; else echo PHPStan rulesets file does not exist, skipping step ; fi'
62-
if: 'always() && steps.end-of-setup.outcome == ''success'''
63-
-
64-
name: 'PHPSpec - Run'
65-
run: 'if [ -f phpspec.yml.dist ]; then vendor/bin/phpspec run ; else echo PHPSpec config file does not exist, skipping step ; fi'
66-
if: 'always() && steps.end-of-setup.outcome == ''success'''
67-
-
68-
name: 'Checks security issues - Run'
69-
run: 'symfony security:check'
61+
run: 'if [ -f ruleset/phpstan.neon ]; then vendor/bin/phpstan analyse -c ruleset/phpstan.neon src/ ; else echo PHPStan rulesets file does not exist, skipping step ; fi'
7062
if: 'always() && steps.end-of-setup.outcome == ''success'''
63+
# TODO: launch Grumphp
64+
7165
sonarcloud:
66+
if: github.event.repository.fork != true
7267
runs-on: ubuntu-latest
7368
continue-on-error: true
7469
steps:

.github/workflows/sylius.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ jobs:
2020
php:
2121
- 8.2
2222
sylius:
23-
- 1.12.0
23+
- 2.1.0
2424
symfony:
25-
- 6.2
25+
- 6.4
2626
node:
27-
- 14.x
27+
- 18.x
2828
env:
2929
APP_ENV: test
3030
package-name: payplug/sylius-payplug-plugin
@@ -54,7 +54,7 @@ jobs:
5454
run: 'echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'
5555
-
5656
name: 'Composer - Set cache'
57-
uses: actions/cache@v3
57+
uses: actions/cache@v4
5858
id: cache-composer
5959
with:
6060
path: '${{ steps.composer-cache.outputs.dir }}'
@@ -73,7 +73,7 @@ jobs:
7373
run: 'echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT'
7474
-
7575
name: 'Yarn - Set Cache'
76-
uses: actions/cache@v3
76+
uses: actions/cache@v4
7777
with:
7878
path: '${{ steps.yarn-cache.outputs.dir }}'
7979
key: 'node-${{ matrix.node }}-yarn-${{ hashFiles(''**/package.json **/yarn.lock'') }}'

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ In local environment, the plugin will not work properly because you will not be
8585
namespace App\Entity\Customer;
8686
8787
use Doctrine\ORM\Mapping as ORM;
88+
use PayPlug\SyliusPayPlugPlugin\Entity\CardsOwnerInterface;
8889
use PayPlug\SyliusPayPlugPlugin\Entity\Traits\CustomerTrait;
8990
use Sylius\Component\Core\Model\Customer as BaseCustomer;
9091
@@ -94,7 +95,7 @@ In local environment, the plugin will not work properly because you will not be
9495
*/
9596
#[ORM\Entity]
9697
#[ORM\Table(name: 'sylius_customer')]
97-
class Customer extends BaseCustomer
98+
class Customer extends BaseCustomer implements CardsOwnerInterface
9899
{
99100
use CustomerTrait;
100101
}

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"php-parallel-lint/php-parallel-lint": "1.4.0",
4242
"phpmd/phpmd": "^2.15.0",
4343
"phpro/grumphp": "^2.12",
44-
"phpspec/phpspec": "7.5.0",
4544
"phpstan/extension-installer": "1.4.3",
4645
"phpstan/phpstan": "2.0.4",
4746
"phpstan/phpstan-doctrine": "2.0.1",

phpspec.yml.dist

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

ruleset/ecs.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
dirname(__DIR__, 1) . '/src',
1212
dirname(__DIR__, 1) . '/tests/Behat',
1313
dirname(__DIR__, 1) . '/tests/PHPUnit',
14-
dirname(__DIR__, 1) . '/spec',
1514
]);
1615

1716
/** @phpstan-ignore-next-line */
1817
$ecsConfig->rule(\SlevomatCodingStandard\Sniffs\Classes\RequireMultiLineMethodSignatureSniff::class);
19-
};
18+
$ecsConfig->skip([\PhpCsFixer\Fixer\Basic\BracesFixer::class]);
19+
};

ruleset/ruleset.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
xsi:noNamespaceSchemaLocation="../vendor/squizlabs/php_codesniffer/phpcs.xsd">
44
<arg name="colors"/>
55
<arg name="extensions" value="php"/>
6-
<rule ref="PSR12"/>
6+
<rule ref="PSR12">
7+
<!-- This rules doesn't match with single_line_empty_body -->
8+
<exclude name="PSR2.Classes.ClassDeclaration.OpenBraceNewLine"/>
9+
<exclude name="Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore"/>
10+
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine"/>
11+
</rule>
712

813
<rule ref="Generic.PHP.ForbiddenFunctions">
914
<properties>
@@ -16,4 +21,4 @@
1621
</property>
1722
</properties>
1823
</rule>
19-
</ruleset>
24+
</ruleset>

spec/Action/ConvertPaymentActionSpec.php

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

0 commit comments

Comments
 (0)