Add PHPStan config
continuous-integration/drone/push Build is passing Details

pull/6/head
Clément FRÉVILLE 6 months ago
parent d4cc71946d
commit 999dbee2c6

@ -0,0 +1,30 @@
kind: pipeline
name: default
type: docker
on:
push:
steps:
- name: install
image: composer/composer:2
commands:
- composer install --no-interaction
- name: lint
image: php:8.3
commands:
- php bin/console lint:container
- php vendor/bin/phpstan analyse
depends_on:
- install
- name: test
image: php:8.3
commands:
- php bin/console make:migration
- php bin/console doctrine:migrations:migrate --no-interaction
- php bin/console doctrine:fixtures:load --no-interaction --env=test
- php bin/phpunit
depends_on:
- install

4
.gitignore vendored

@ -27,3 +27,7 @@
/public/assets/
/assets/vendor/
###< symfony/asset-mapper ###
###> phpstan/phpstan ###
phpstan.neon
###< phpstan/phpstan ###

@ -97,6 +97,9 @@
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.6",
"fakerphp/faker": "^1.23",
"phpstan/phpstan": "^1.11",
"phpstan/phpstan-doctrine": "^1.4",
"phpstan/phpstan-symfony": "^1.4",
"phpunit/phpunit": "^9.5",
"symfony/browser-kit": "7.0.*",
"symfony/css-selector": "7.0.*",

204
composer.lock generated

@ -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": "c1ff69a0c8b2b96c87a3465776574718",
"content-hash": "963e7a72ac289ff9f4ad3c719ed70956",
"packages": [
{
"name": "composer/semver",
@ -7989,6 +7989,208 @@
},
"time": "2022-02-21T01:04:05+00:00"
},
{
"name": "phpstan/phpstan",
"version": "1.11.2",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "0d5d4294a70deb7547db655c47685d680e39cfec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/0d5d4294a70deb7547db655c47685d680e39cfec",
"reference": "0d5d4294a70deb7547db655c47685d680e39cfec",
"shasum": ""
},
"require": {
"php": "^7.2|^8.0"
},
"conflict": {
"phpstan/phpstan-shim": "*"
},
"bin": [
"phpstan",
"phpstan.phar"
],
"type": "library",
"autoload": {
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "PHPStan - PHP Static Analysis Tool",
"keywords": [
"dev",
"static analysis"
],
"support": {
"docs": "https://phpstan.org/user-guide/getting-started",
"forum": "https://github.com/phpstan/phpstan/discussions",
"issues": "https://github.com/phpstan/phpstan/issues",
"security": "https://github.com/phpstan/phpstan/security/policy",
"source": "https://github.com/phpstan/phpstan-src"
},
"funding": [
{
"url": "https://github.com/ondrejmirtes",
"type": "github"
},
{
"url": "https://github.com/phpstan",
"type": "github"
}
],
"time": "2024-05-24T13:23:04+00:00"
},
{
"name": "phpstan/phpstan-doctrine",
"version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan-doctrine.git",
"reference": "4b66f5c996865a6085983cc90b5c8a242d1959e7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan-doctrine/zipball/4b66f5c996865a6085983cc90b5c8a242d1959e7",
"reference": "4b66f5c996865a6085983cc90b5c8a242d1959e7",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0",
"phpstan/phpstan": "^1.11"
},
"conflict": {
"doctrine/collections": "<1.0",
"doctrine/common": "<2.7",
"doctrine/mongodb-odm": "<1.2",
"doctrine/orm": "<2.5",
"doctrine/persistence": "<1.3"
},
"require-dev": {
"cache/array-adapter": "^1.1",
"composer/semver": "^3.3.2",
"cweagans/composer-patches": "^1.7.3",
"doctrine/annotations": "^1.11 || ^2.0",
"doctrine/collections": "^1.6 || ^2.1",
"doctrine/common": "^2.7 || ^3.0",
"doctrine/dbal": "^2.13.8 || ^3.3.3",
"doctrine/lexer": "^2.0 || ^3.0",
"doctrine/mongodb-odm": "^1.3 || ^2.4.3",
"doctrine/orm": "^2.16.0",
"doctrine/persistence": "^2.2.1 || ^3.2",
"gedmo/doctrine-extensions": "^3.8",
"nesbot/carbon": "^2.49",
"nikic/php-parser": "^4.13.2",
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpstan/phpstan-phpunit": "^1.3.13",
"phpstan/phpstan-strict-rules": "^1.5.1",
"phpunit/phpunit": "^9.6.16",
"ramsey/uuid": "^4.2",
"symfony/cache": "^5.4"
},
"type": "phpstan-extension",
"extra": {
"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.4.0"
},
"time": "2024-04-24T14:05:48+00:00"
},
{
"name": "phpstan/phpstan-symfony",
"version": "1.4.1",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan-symfony.git",
"reference": "d530cfebba55763732bc2421f79d2576d9d7942f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/d530cfebba55763732bc2421f79d2576d9d7942f",
"reference": "d530cfebba55763732bc2421f79d2576d9d7942f",
"shasum": ""
},
"require": {
"ext-simplexml": "*",
"php": "^7.2 || ^8.0",
"phpstan/phpstan": "^1.11"
},
"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.3.11",
"phpstan/phpstan-strict-rules": "^1.5.1",
"phpunit/phpunit": "^8.5.29 || ^9.5",
"psr/container": "1.0 || 1.1.1",
"symfony/config": "^5.4 || ^6.1",
"symfony/console": "^5.4 || ^6.1",
"symfony/dependency-injection": "^5.4 || ^6.1",
"symfony/form": "^5.4 || ^6.1",
"symfony/framework-bundle": "^5.4 || ^6.1",
"symfony/http-foundation": "^5.4 || ^6.1",
"symfony/messenger": "^5.4",
"symfony/polyfill-php80": "^1.24",
"symfony/serializer": "^5.4",
"symfony/service-contracts": "^2.2.0"
},
"type": "phpstan-extension",
"extra": {
"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.4.1"
},
"time": "2024-05-24T14:00:29+00:00"
},
{
"name": "phpunit/php-code-coverage",
"version": "9.2.31",

@ -0,0 +1,10 @@
includes:
- vendor/phpstan/phpstan-symfony/extension.neon
- vendor/phpstan/phpstan-symfony/rules.neon
- vendor/phpstan/phpstan-doctrine/extension.neon
parameters:
level: 8
paths:
- src
- tests

@ -38,6 +38,18 @@
"migrations/.gitignore"
]
},
"phpstan/phpstan": {
"version": "1.11",
"recipe": {
"repo": "github.com/symfony/recipes-contrib",
"branch": "main",
"version": "1.0",
"ref": "5e490cc197fb6bb1ae22e5abbc531ddc633b6767"
},
"files": [
"phpstan.dist.neon"
]
},
"phpunit/phpunit": {
"version": "9.6",
"recipe": {

Loading…
Cancel
Save