Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions .github/workflows/analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
php:
- 8.2
symfony:
- '6.2.*'
- '6.4.*'
env:
APP_ENV: test
steps:
Expand All @@ -38,7 +38,7 @@ jobs:
run: 'echo "::set-output name=dir::$(composer config cache-files-dir)"'
-
name: 'Composer - Set cache'
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: '${{ steps.composer-cache.outputs.dir }}'
key: 'php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles(''**/composer.json'') }}'
Expand All @@ -58,17 +58,12 @@ jobs:
id: end-of-setup
-
name: 'PHPStan - Run'
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'
if: 'always() && steps.end-of-setup.outcome == ''success'''
-
name: 'PHPSpec - Run'
run: 'if [ -f phpspec.yml.dist ]; then vendor/bin/phpspec run ; else echo PHPSpec config file does not exist, skipping step ; fi'
if: 'always() && steps.end-of-setup.outcome == ''success'''
-
name: 'Checks security issues - Run'
run: 'symfony security:check'
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'
if: 'always() && steps.end-of-setup.outcome == ''success'''
# TODO: launch Grumphp

sonarcloud:
if: github.event.repository.fork != true
runs-on: ubuntu-latest
continue-on-error: true
steps:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/sylius.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
php:
- 8.2
sylius:
- 1.12.0
- 2.1.0
symfony:
- 6.2
- 6.4
node:
- 14.x
- 18.x
env:
APP_ENV: test
package-name: payplug/sylius-payplug-plugin
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
run: 'echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'
-
name: 'Composer - Set cache'
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-composer
with:
path: '${{ steps.composer-cache.outputs.dir }}'
Expand All @@ -73,7 +73,7 @@ jobs:
run: 'echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT'
-
name: 'Yarn - Set Cache'
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '${{ steps.yarn-cache.outputs.dir }}'
key: 'node-${{ matrix.node }}-yarn-${{ hashFiles(''**/package.json **/yarn.lock'') }}'
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ In local environment, the plugin will not work properly because you will not be
namespace App\Entity\Customer;

use Doctrine\ORM\Mapping as ORM;
use PayPlug\SyliusPayPlugPlugin\Entity\CardsOwnerInterface;
use PayPlug\SyliusPayPlugPlugin\Entity\Traits\CustomerTrait;
use Sylius\Component\Core\Model\Customer as BaseCustomer;

Expand All @@ -94,7 +95,7 @@ In local environment, the plugin will not work properly because you will not be
*/
#[ORM\Entity]
#[ORM\Table(name: 'sylius_customer')]
class Customer extends BaseCustomer
class Customer extends BaseCustomer implements CardsOwnerInterface
{
use CustomerTrait;
}
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"php-parallel-lint/php-parallel-lint": "1.4.0",
"phpmd/phpmd": "^2.15.0",
"phpro/grumphp": "^2.12",
"phpspec/phpspec": "7.5.0",
"phpstan/extension-installer": "1.4.3",
"phpstan/phpstan": "2.0.4",
"phpstan/phpstan-doctrine": "2.0.1",
Expand Down
4 changes: 0 additions & 4 deletions phpspec.yml.dist

This file was deleted.

4 changes: 2 additions & 2 deletions ruleset/ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
dirname(__DIR__, 1) . '/src',
dirname(__DIR__, 1) . '/tests/Behat',
dirname(__DIR__, 1) . '/tests/PHPUnit',
dirname(__DIR__, 1) . '/spec',
]);

/** @phpstan-ignore-next-line */
$ecsConfig->rule(\SlevomatCodingStandard\Sniffs\Classes\RequireMultiLineMethodSignatureSniff::class);
};
$ecsConfig->skip([\PhpCsFixer\Fixer\Basic\BracesFixer::class]);
};
9 changes: 7 additions & 2 deletions ruleset/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
xsi:noNamespaceSchemaLocation="../vendor/squizlabs/php_codesniffer/phpcs.xsd">
<arg name="colors"/>
<arg name="extensions" value="php"/>
<rule ref="PSR12"/>
<rule ref="PSR12">
<!-- This rules doesn't match with single_line_empty_body -->

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it match? Or is it OK like that?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's OK, PHPCSFixer is right in that case, and the following rule is wrong ;) (IMHO)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To add context, this rule enforce

public function __construct(
   Blabla $blaba
+) {
+}

where as the single_line_empty_body from phpcsfixer allow

public function __construct(
   Blabla $blaba
+) {}

<exclude name="PSR2.Classes.ClassDeclaration.OpenBraceNewLine"/>
<exclude name="Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore"/>
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine"/>
</rule>

<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
Expand All @@ -16,4 +21,4 @@
</property>
</properties>
</rule>
</ruleset>
</ruleset>
252 changes: 0 additions & 252 deletions spec/Action/ConvertPaymentActionSpec.php

This file was deleted.

Loading
Loading