From b9115f0532072a243c6344b30f2e08c3e34202b7 Mon Sep 17 00:00:00 2001 From: Camille Simiand <camille.simiand@tetras-libre.fr> Date: Fri, 19 Nov 2021 16:12:39 +0100 Subject: [PATCH] Add PHPStan dependency - REF #31 PHPStan is PHP code analysis tool that helps maintain a clean base code. These dependencies have been installed in dev section via composer: - phpstan/phpstan - phpstan/extension-installer - phpstan/phpstan-doctrine We will probably have to configure the tool later on to customize it according to the project needs. --- composer.json | 4 + composer.lock | 252 +++++++++++++++++++++++++++++++++++++++++++++++++- symfony.lock | 12 +++ 3 files changed, 266 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index d027932..74ad5b9 100644 --- a/composer.json +++ b/composer.json @@ -44,6 +44,10 @@ "twig/twig": "^2.12|^3.0" }, "require-dev": { + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.2", + "phpstan/phpstan-doctrine": "^1.0", + "phpstan/phpstan-symfony": "^1.0", "phpunit/phpunit": "^9.5", "symfony/browser-kit": "5.3.*", "symfony/css-selector": "5.3.*", diff --git a/composer.lock b/composer.lock index 886014a..59afc64 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": "476d6e3faaad98e90d063f8b13516d1f", + "content-hash": "31a646c540f5c6ff7a49690077e86ec5", "packages": [ { "name": "composer/package-versions-deprecated", @@ -7939,6 +7939,254 @@ }, "time": "2021-09-10T09:02:12+00:00" }, + { + "name": "phpstan/extension-installer", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/phpstan/extension-installer.git", + "reference": "66c7adc9dfa38b6b5838a9fb728b68a7d8348051" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/66c7adc9dfa38b6b5838a9fb728b68a7d8348051", + "reference": "66c7adc9dfa38b6b5838a9fb728b68a7d8348051", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1 || ^2.0", + "php": "^7.1 || ^8.0", + "phpstan/phpstan": ">=0.11.6" + }, + "require-dev": { + "composer/composer": "^1.8", + "phing/phing": "^2.16.3", + "php-parallel-lint/php-parallel-lint": "^1.2.0", + "phpstan/phpstan-strict-rules": "^0.11 || ^0.12" + }, + "type": "composer-plugin", + "extra": { + "class": "PHPStan\\ExtensionInstaller\\Plugin" + }, + "autoload": { + "psr-4": { + "PHPStan\\ExtensionInstaller\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Composer plugin for automatic installation of PHPStan extensions", + "support": { + "issues": "https://github.com/phpstan/extension-installer/issues", + "source": "https://github.com/phpstan/extension-installer/tree/1.1.0" + }, + "time": "2020-12-13T13:06:13+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "cbe085f9fdead5b6d62e4c022ca52dc9427a10ee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/cbe085f9fdead5b6d62e4c022ca52dc9427a10ee", + "reference": "cbe085f9fdead5b6d62e4c022ca52dc9427a10ee", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "support": { + "issues": "https://github.com/phpstan/phpstan/issues", + "source": "https://github.com/phpstan/phpstan/tree/1.2.0" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpstan", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2021-11-18T14:09:01+00:00" + }, + { + "name": "phpstan/phpstan-doctrine", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-doctrine.git", + "reference": "ea3919219c4915f4a3896227aaa9e5d3d2034bd7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-doctrine/zipball/ea3919219c4915f4a3896227aaa9e5d3d2034bd7", + "reference": "ea3919219c4915f4a3896227aaa9e5d3d2034bd7", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "phpstan/phpstan": "^1.0" + }, + "conflict": { + "doctrine/collections": "<1.0", + "doctrine/common": "<2.7", + "doctrine/mongodb-odm": "<1.2", + "doctrine/orm": "<2.5", + "doctrine/persistence": "<1.3" + }, + "require-dev": { + "doctrine/annotations": "^1.11.0", + "doctrine/collections": "^1.6", + "doctrine/common": "^2.7 || ^3.0", + "doctrine/dbal": "^2.13.1", + "doctrine/mongodb-odm": "^1.3 || ^2.1", + "doctrine/orm": "^2.9.1", + "doctrine/persistence": "^1.1 || ^2.0", + "nesbot/carbon": "^2.49", + "nikic/php-parser": "^4.13.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "ramsey/uuid-doctrine": "^1.5.0" + }, + "type": "phpstan-extension", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + }, + "phpstan": { + "includes": [ + "extension.neon", + "rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Doctrine extensions for PHPStan", + "support": { + "issues": "https://github.com/phpstan/phpstan-doctrine/issues", + "source": "https://github.com/phpstan/phpstan-doctrine/tree/1.0.1" + }, + "time": "2021-11-02T13:28:55+00:00" + }, + { + "name": "phpstan/phpstan-symfony", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-symfony.git", + "reference": "edb55af46fe1aaa62fafae51c36ccd1b577125bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/edb55af46fe1aaa62fafae51c36ccd1b577125bb", + "reference": "edb55af46fe1aaa62fafae51c36ccd1b577125bb", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "php": "^7.1 || ^8.0", + "phpstan/phpstan": "^1.0" + }, + "conflict": { + "symfony/framework-bundle": "<3.0" + }, + "require-dev": { + "nikic/php-parser": "^4.13.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/config": "^4.2 || ^5.0", + "symfony/console": "^4.0 || ^5.0", + "symfony/framework-bundle": "^4.4 || ^5.0", + "symfony/http-foundation": "^4.0 || ^5.0", + "symfony/messenger": "^4.2 || ^5.0", + "symfony/serializer": "^4.0 || ^5.0" + }, + "type": "phpstan-extension", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + }, + "phpstan": { + "includes": [ + "extension.neon", + "rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lukáš Unger", + "email": "looky.msc@gmail.com", + "homepage": "https://lookyman.net" + } + ], + "description": "Symfony Framework extensions and rules for PHPStan", + "support": { + "issues": "https://github.com/phpstan/phpstan-symfony/issues", + "source": "https://github.com/phpstan/phpstan-symfony/tree/1.0.1" + }, + "time": "2021-11-03T14:14:43+00:00" + }, { "name": "phpunit/php-code-coverage", "version": "9.2.8", @@ -9928,5 +10176,5 @@ "ext-iconv": "*" }, "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.0.0" } diff --git a/symfony.lock b/symfony.lock index 921f3be..73d5fb8 100644 --- a/symfony.lock +++ b/symfony.lock @@ -118,6 +118,18 @@ "phpspec/prophecy": { "version": "1.14.0" }, + "phpstan/extension-installer": { + "version": "1.1.0" + }, + "phpstan/phpstan": { + "version": "1.2.0" + }, + "phpstan/phpstan-doctrine": { + "version": "1.0.1" + }, + "phpstan/phpstan-symfony": { + "version": "1.0.1" + }, "phpunit/php-code-coverage": { "version": "9.2.8" }, -- GitLab