File tree Expand file tree Collapse file tree 8 files changed +120
-49
lines changed Expand file tree Collapse file tree 8 files changed +120
-49
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
15
- Upstream projects not having phpunit installed will install phpunit with an @stable version.
16
16
- Added support for Drupal configuration and templates.
17
17
- Migration docs for migration from v2 to v3 of the testing suite.
18
+ - Pimcore coding standards now uses PHP CS Fixer to support PER 2.0 coding standards
18
19
19
20
### Changed
20
21
- [ BREAKING] The composer.json configurations ` config.youwe-testing-suite.type ` and ` config.mediact-testing-suite.type `
@@ -32,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
32
33
- Updated remote schema location URL for phpmd rulesets to prevent redirecting which may cause flaky builds.
33
34
- Bumped phpro/grumphp-shim dependency from v1 to v2
34
35
- Bumped youwe/composer-dependency-installer from v1 to v2
36
+ - Default Pimcore coding standards disables PHPCS in favour of PHP CS Fixer
35
37
36
38
### Removed
37
39
- Removed support for EOL PHP versions. Projects running PHP < 8.1 can stick to version 2 of the testing-suite.
Original file line number Diff line number Diff line change @@ -3,4 +3,21 @@ imports:
3
3
4
4
# Extend git triggers with common pimcore constructs
5
5
parameters :
6
- git_blacklist.triggered_by : [ 'php', 'js', 'twig' ]
6
+ git_blacklist.triggered_by : [ 'php', 'js', 'twig' ]
7
+
8
+ phpcsfixer.allow_risky : false
9
+ phpcsfixer.verbose : true
10
+ phpcsfixer.diff : true
11
+ phpcsfixer.triggered_by : ['php']
12
+
13
+ grumphp :
14
+ tasks :
15
+ # Disable PHPCS in favor of PHP CS Fixer
16
+ phpcs :
17
+ metadata :
18
+ enabled : false
19
+ phpcsfixer :
20
+ allow_risky : ' %phpcsfixer.allow_risky%'
21
+ verbose : ' %phpcsfixer.verbose%'
22
+ diff : ' %phpcsfixer.diff%'
23
+ triggered_by : ' %phpcsfixer.triggered_by%'
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -55,6 +55,13 @@ class PackagesInstaller implements InstallerInterface
55
55
'updateDependencies ' => true ,
56
56
]
57
57
],
58
+ 'pimcore ' => [
59
+ // For Pimcore, use PHP CS Fixer instead of PHP Code Sniffer, because the latter lacks support for PER
60
+ // coding standards
61
+ 'php-cs-fixer/shim ' => [
62
+ 'version ' => '@stable ' ,
63
+ ],
64
+ ],
58
65
];
59
66
60
67
/**
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ $ finder = PhpCsFixer \Finder::create () // @phpstan-ignore class.notFound (class lives in phar file and can't be seen)
6
+ ->in (__DIR__ )
7
+ ->exclude ([
8
+ /**
9
+ * Default Pimcore excludes
10
+ */
11
+
12
+ // Symfony files
13
+ 'bin/console ' ,
14
+ 'public/index.php ' ,
15
+ // Full var folder, this contains all kind of auto-generated files (from cache to class definitions)
16
+ 'var ' ,
17
+ // Configuration written by Pimcore (which is written to var/ or to config/pimcore depending on settings)
18
+ 'config/pimcore ' ,
19
+
20
+ /**
21
+ * Add any project specific exclude below
22
+ */
23
+ ]);
24
+
25
+ $ config = new PhpCsFixer \Config (); // @phpstan-ignore class.notFound (class lives in phar file and can't be seen)
26
+ return $ config // @phpstan-ignore class.notFound (class lives in phar file and can't be seen)
27
+ ->setRules ([
28
+ // Alias for the latest revision of PER-CS rules, replace with '@PER-CS2.0' if you want explicitly use PER 2.0
29
+ '@PER-CS ' => true ,
30
+ ])
31
+ ->setFinder ($ finder );
Original file line number Diff line number Diff line change
1
+ # symfony default
2
+ /.web-server-pid
3
+ /config/pimcore/parameters.yml
4
+ /public/bundles/
5
+
6
+ # local config
7
+ /.env.local
8
+ /.env.local.php
9
+ /.env.*.local
10
+
11
+ /var/*
12
+ !/var/.gitkeep
13
+ !/var/classes/
14
+ /var/classes/DataObject
15
+
16
+ !/var/config
17
+ /var/config/debug-mode.php
18
+ /var/config/maintenance.php
19
+
20
+ !/var/admin/
21
+ /var/admin/*
22
+ !/var/admin/custom-logo.image
23
+
24
+ # project specific recommendations
25
+ /var/config/tag-manager.php
26
+ /var/config/reports.php
27
+ /var/config/portal
28
+
29
+ /public/var/
30
+ /public/sitemap*.xml
31
+
32
+ # PHP-CS-Fixer
33
+ /.php_cs
34
+ /.php_cs.cache
35
+
36
+ # composer
37
+ /vendor/
38
+ /build/deployer/vendor
39
+
40
+ # PhpStorm / IDEA
41
+ .idea
42
+ # NetBeans
43
+ nbproject
44
+ # VS Code
45
+ .prettierrc
46
+
47
+ # temp
48
+ .temp
49
+
50
+ .DS_Store
51
+ *.swp
52
+
53
+ # PhpUnit
54
+ phpunit.result.xml
55
+ .phpunit.result.cache
56
+
57
+ # PHP CS Fixer cache & local config
58
+ .php-cs-fixer.cache
59
+ .php-cs-fixer.php
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- {pimcore/,}phpcs.xml
1
+ {pimcore/,}.php-cs-fixer.dist.php
2
+ {pimcore/dot,.}gitignore
3
+ {pimcore/,}grumphp.yml
2
4
{pimcore/,}phpmd.xml
3
5
{pimcore/,}phpstan.neon
You can’t perform that action at this time.
0 commit comments