Skip to content

Commit

Permalink
[TASK] Configure scripts for php-cs-fixer and PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
dot3media committed Aug 27, 2024
1 parent 5c0f5bb commit 3e9c8c5
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 60 deletions.
17 changes: 0 additions & 17 deletions Build/phpstan/Core11/phpstan.neon

This file was deleted.

6 changes: 0 additions & 6 deletions Build/phpstan/Core12/phpstan-baseline.neon

This file was deleted.

18 changes: 0 additions & 18 deletions Build/phpstan/Core12/phpstan.neon

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ parameters:
-
message: "#^Variable \\$_EXTKEY might not be defined\\.$#"
count: 1
path: ../../../ext_emconf.php
path: ../../ext_emconf.php
17 changes: 17 additions & 0 deletions Build/phpstan/phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
includes:
- ../../.Build/vendor/saschaegerer/phpstan-typo3/extension.neon
- phpstan-baseline.neon

parameters:
# Use local .cache dir instead of /tmp
tmpDir: ../../.cache/phpstan

level: 8

paths:
- ../../Classes
- ../../Configuration
- ../../Resources
- ../../ext_emconf.php
- ../../ext_localconf.php
- ../../ext_tables.php
42 changes: 24 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
},
"homepage": "https://github.com/fgtclb/academic-jobs",
"repositories": [
{ "type": "git", "url": "https://github.com/andreaswolf/typo3-ext-migrations.git" }
],
"require": {
"php": "^8.1",
"typo3/cms-core": "^11.5",
"typo3/cms-rte-ckeditor": "^11.5"
},
{ "type": "git", "url": "https://github.com/andreaswolf/typo3-ext-migrations.git" }
],
"require": {
"php": "^8.1",
"typo3/cms-core": "^11.5",
"typo3/cms-rte-ckeditor": "^11.5"
},
"require-dev": {
"typo3/cms-adminpanel": "^11.5",
"typo3/cms-backend": "^11.5",
Expand All @@ -49,26 +49,26 @@
"typo3/cms-setup": "^11.5",
"typo3/cms-tstemplate": "^11.5",
"typo3/minimal": "^11",
"typo3/cms-composer-installers": "v4.0.0-RC1",
"helhum/typo3-console": "^7.1 || ^8.0",
"saschaegerer/phpstan-typo3": "^1.8",
"friendsofphp/php-cs-fixer": "^3.14",
"bk2k/bootstrap-package": "^14.0",
"typo3/cms-composer-installers": "v4.0.0-RC1",
"helhum/typo3-console": "^7.1 || ^8.0",
"saschaegerer/phpstan-typo3": "^1.8",
"friendsofphp/php-cs-fixer": "^3.14",
"bk2k/bootstrap-package": "^14.0",
"kaystrobach/migrations": "0.11.0",
"andreaswolf/typo3-uuid": "^0.3.0",
"cweagans/composer-patches": "^1.7"
},
},
"autoload": {
"psr-4": {
"FGTCLB\\AcademicJobs\\": "Classes/"
}
},
"autoload-dev": {
"psr-4": {
"FGTCLB\\AcademicJobs\\Migrations\\": "Migrations/",
"FGTCLB\\AcademicJobs\\Tests\\": "Tests/"
}
},
"psr-4": {
"FGTCLB\\AcademicJobs\\Migrations\\": "Migrations/",
"FGTCLB\\AcademicJobs\\Tests\\": "Tests/"
}
},
"config": {
"vendor-dir": ".Build/vendor",
"bin-dir": ".Build/bin",
Expand All @@ -85,5 +85,11 @@
"Load migrations from autoload-dev": "patches/migrations/autoload.patch"
}
}
},
"scripts": {
"cs:check": "php-cs-fixer fix --config Build/php-cs-fixer/php-cs-rules.php --ansi --diff --verbose --dry-run",
"cs:fix": "php-cs-fixer fix --config Build/php-cs-fixer/php-cs-rules.php --ansi",
"analyze:php": ".Build/bin/phpstan analyse --ansi --no-progress --memory-limit=768M --configuration=Build/phpstan/phpstan.neon",
"analyze:baseline": ".Build/bin/phpstan analyse --ansi --no-progress --memory-limit=768M --configuration=Build/phpstan/phpstan.neon --generate-baseline=Build/phpstan/phpstan-baseline.neon"
}
}

0 comments on commit 3e9c8c5

Please sign in to comment.