diff --git a/composer.json b/composer.json index d63e2a70719..c1e6946f224 100644 --- a/composer.json +++ b/composer.json @@ -33,6 +33,12 @@ "dealerdirect/phpcodesniffer-composer-installer": true } }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/matomo-org/matomo-coding-standards.git" + } + ], "require": { "php": ">=7.2.5", "composer/ca-bundle": "^1.2", @@ -66,10 +72,9 @@ "wikimedia/less.php": "^3.0" }, "require-dev": { - "phpunit/phpunit": "~8.5", - "slevomat/coding-standard": "~8.14.0", - "squizlabs/php_codesniffer": "~3.6", + "matomo-org/matomo-coding-standards": "dev-master", "phpstan/phpdoc-parser": "~1.24.0", + "phpunit/phpunit": "~8.5", "symfony/var-dumper": "~5.4.0", "symfony/yaml": "~5.4.0" }, diff --git a/composer.lock b/composer.lock index 0eb3959601a..745a35e3cdf 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "264a4cc5f19355e9946a291646289a03", + "content-hash": "4c2227527db4c5adbbbad7d19fe07903", "packages": [ { "name": "composer/ca-bundle", @@ -3701,6 +3701,35 @@ ], "time": "2022-12-30T00:15:36+00:00" }, + { + "name": "matomo-org/matomo-coding-standards", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/matomo-org/matomo-coding-standards.git", + "reference": "940f7ae7e058ff0d9afbed46a08a134d1a3622f0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/matomo-org/matomo-coding-standards/zipball/940f7ae7e058ff0d9afbed46a08a134d1a3622f0", + "reference": "940f7ae7e058ff0d9afbed46a08a134d1a3622f0", + "shasum": "" + }, + "require": { + "php": "~7.2 || ~8.0", + "phpstan/phpdoc-parser": "~1.24.0", + "slevomat/coding-standard": "~8.14.0", + "squizlabs/php_codesniffer": "~3.10" + }, + "default-branch": true, + "type": "phpcodesniffer-standard", + "description": "Coding standards for Matomo", + "support": { + "source": "https://github.com/matomo-org/matomo-coding-standards/tree/master", + "issues": "https://github.com/matomo-org/matomo-coding-standards/issues" + }, + "time": "2024-07-19T08:27:04+00:00" + }, { "name": "myclabs/deep-copy", "version": "1.12.0", @@ -5325,7 +5354,8 @@ "stability-flags": { "lox/xhprof": 20, "matomo/referrer-spam-list": 20, - "matomo/searchengine-and-social-list": 20 + "matomo/searchengine-and-social-list": 20, + "matomo-org/matomo-coding-standards": 20 }, "prefer-stable": false, "prefer-lowest": false, diff --git a/phpcs.xml b/phpcs.xml index d6834f30744..5c74cb3f3f3 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,7 +1,7 @@ - Matomo Coding Standard + Matomo Core Coding Standard @@ -12,21 +12,11 @@ tests/PHPUnit/proxy/* tests/PHPUnit/Unit/Config/test_files/* tests/javascript/* - */vendor/* - */libs/* plugins/(AnonymousPiwikUsageMeasurement|Bandwidth|CustomAlerts|CustomVariables|DeviceDetectorCache|LogViewer|LoginLdap|MarketingCampaignsReporting|Provider|QueuedTracking|SecurityInfo|TagManager|TasksTimetable|TrackingSpamPrevention|TreemapVisualization|VisitorGenerator)/* - - - - - - - - - + @@ -36,42 +26,9 @@ plugins/*/tests/* - - - core/Updates/* - plugins/*/Updates/* - - tests/PHPUnit/* plugins/*/tests/* - - - - - - - - - - - - - - - - - - - - - - - - - - */tests/* -