chore: 🔧 update to work with phpstan
This commit is contained in:
parent
3114de7fd5
commit
c12bcf7b5a
@ -24,7 +24,7 @@ jobs:
|
|||||||
- run: composer install
|
- run: composer install
|
||||||
- run: composer run lint
|
- run: composer run lint
|
||||||
- run: composer run cs:check
|
- run: composer run cs:check
|
||||||
- run: composer run psalm
|
- run: composer run phpstan
|
||||||
|
|
||||||
nodejs:
|
nodejs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
44
Makefile
44
Makefile
@ -84,42 +84,14 @@ appstore:
|
|||||||
rm -rf $(appstore_build_directory)
|
rm -rf $(appstore_build_directory)
|
||||||
mkdir -p $(appstore_build_directory)
|
mkdir -p $(appstore_build_directory)
|
||||||
tar -C .. -cvzf $(appstore_package_name).tar.gz \
|
tar -C .. -cvzf $(appstore_package_name).tar.gz \
|
||||||
--exclude="$(app_name)/build" \
|
$(app_name)/appinfo \
|
||||||
--exclude="$(app_name)/tests" \
|
$(app_name)/css \
|
||||||
--exclude="$(app_name)/Makefile" \
|
$(app_name)/img \
|
||||||
--exclude="$(app_name)/*.log" \
|
$(app_name)/js \
|
||||||
--exclude="$(app_name)/phpunit*xml" \
|
$(app_name)/l10n \
|
||||||
--exclude="$(app_name)/composer.*" \
|
$(app_name)/lib \
|
||||||
--exclude="$(app_name)/node_modules" \
|
$(app_name)/templates \
|
||||||
--exclude="$(app_name)/js/node_modules" \
|
$(app_name)/CHANGELOG.md
|
||||||
--exclude="$(app_name)/js/tests" \
|
|
||||||
--exclude="$(app_name)/js/test" \
|
|
||||||
--exclude="$(app_name)/js/*.log" \
|
|
||||||
--exclude="$(app_name)/js/package.json" \
|
|
||||||
--exclude="$(app_name)/js/bower.json" \
|
|
||||||
--exclude="$(app_name)/js/karma.*" \
|
|
||||||
--exclude="$(app_name)/js/protractor.*" \
|
|
||||||
--exclude="$(app_name)/package.json" \
|
|
||||||
--exclude="$(app_name)/bower.json" \
|
|
||||||
--exclude="$(app_name)/karma.*" \
|
|
||||||
--exclude="$(app_name)/protractor\.*" \
|
|
||||||
--exclude="$(app_name)/.*" \
|
|
||||||
--exclude="$(app_name)/js/.*" \
|
|
||||||
--exclude="$(app_name)/tsconfig.json" \
|
|
||||||
--exclude="$(app_name)/stylelint.config.cjs" \
|
|
||||||
--exclude="$(app_name)/README.md" \
|
|
||||||
--exclude="$(app_name)/package-lock.json" \
|
|
||||||
--exclude="$(app_name)/LICENSE" \
|
|
||||||
--exclude="$(app_name)/src" \
|
|
||||||
--exclude="$(app_name)/stubs" \
|
|
||||||
--exclude="$(app_name)/screens" \
|
|
||||||
--exclude="$(app_name)/vendor" \
|
|
||||||
--exclude="$(app_name)/translationfiles" \
|
|
||||||
--exclude="$(app_name)/Dockerfile" \
|
|
||||||
--exclude="$(app_name)/psalm.xml" \
|
|
||||||
--exclude="$(app_name)/renovate.json" \
|
|
||||||
--exclude="$(app_name)/vite.config.ts" \
|
|
||||||
$(app_name)
|
|
||||||
|
|
||||||
# Start a nextcloud server on Docker to kickstart developement
|
# Start a nextcloud server on Docker to kickstart developement
|
||||||
.PHONY: dev
|
.PHONY: dev
|
||||||
|
@ -18,25 +18,25 @@
|
|||||||
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './vendor-bin/*' -not -path './build/*' -print0 | xargs -0 -n1 php -l",
|
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './vendor-bin/*' -not -path './build/*' -print0 | xargs -0 -n1 php -l",
|
||||||
"cs:check": "php-cs-fixer fix --dry-run --diff",
|
"cs:check": "php-cs-fixer fix --dry-run --diff",
|
||||||
"cs:fix": "php-cs-fixer fix",
|
"cs:fix": "php-cs-fixer fix",
|
||||||
"psalm": "psalm --threads=1 --no-cache --show-info=true",
|
"phpstan": "phpstan clear-result-cache && phpstan analyse -c phpstan.neon",
|
||||||
"rector": "rector && composer cs:fix"
|
"rector": "rector && composer cs:fix"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "~8.1.17"
|
"php": "^8.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"nextcloud/ocp": "^30.0.6",
|
"nextcloud/ocp": "^30.0.6",
|
||||||
"roave/security-advisories": "dev-latest",
|
"roave/security-advisories": "dev-latest",
|
||||||
"nextcloud/coding-standard": "^1.3.2",
|
"nextcloud/coding-standard": "^1.3.2",
|
||||||
"nextcloud/rector": "^0.3.1",
|
"nextcloud/rector": "^0.3.1",
|
||||||
"rector/rector": "~1.2.10",
|
"phpstan/phpstan": "~1.12.18",
|
||||||
"vimeo/psalm": "^6.5.1"
|
"rector/rector": "~1.2.10"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"optimize-autoloader": true,
|
"optimize-autoloader": true,
|
||||||
"sort-packages": true,
|
"sort-packages": true,
|
||||||
"platform": {
|
"platform": {
|
||||||
"php": "8.1.17"
|
"php": "8.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
"eslint-config-prettier": "^10.0.1",
|
"eslint-config-prettier": "^10.0.1",
|
||||||
"eslint-plugin-prettier": "^5.2.3",
|
"eslint-plugin-prettier": "^5.2.3",
|
||||||
"typescript": "~5.5.4",
|
"typescript": "~5.5.4",
|
||||||
"vue-tsc": "^2.2.0"
|
"vue-tsc": "^2.2.2"
|
||||||
},
|
},
|
||||||
"prettier": "@nextcloud/prettier-config"
|
"prettier": "@nextcloud/prettier-config"
|
||||||
}
|
}
|
||||||
|
6
phpstan.neon
Normal file
6
phpstan.neon
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
parameters:
|
||||||
|
level: 9
|
||||||
|
paths:
|
||||||
|
- lib
|
||||||
|
ignoreErrors:
|
||||||
|
- '#Method [a-zA-Z0-9:\(\)\\_]+ return type with generic class OCP\\AppFramework\\Http\\[a-zA-Z]+ does not specify its types#'
|
21
psalm.xml
21
psalm.xml
@ -1,21 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<psalm
|
|
||||||
errorLevel="1"
|
|
||||||
resolveFromConfigFile="true"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xmlns="https://getpsalm.org/schema/config"
|
|
||||||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
|
||||||
findUnusedBaselineEntry="true"
|
|
||||||
findUnusedCode="false"
|
|
||||||
phpVersion="8.1"
|
|
||||||
>
|
|
||||||
<projectFiles>
|
|
||||||
<directory name="lib" />
|
|
||||||
<ignoreFiles>
|
|
||||||
<directory name="vendor" />
|
|
||||||
</ignoreFiles>
|
|
||||||
</projectFiles>
|
|
||||||
<extraFiles>
|
|
||||||
<directory name="vendor"/>
|
|
||||||
</extraFiles>
|
|
||||||
</psalm>
|
|
Loading…
x
Reference in New Issue
Block a user