Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ steps:
commands:
- ./libraries/vendor/bin/phan

- name: phpstan
image: joomlaprojects/docker-images:php8.2
depends_on: [ phpcs ]
failure: ignore
commands:
- ./libraries/vendor/bin/phpstan

- name: npm
image: node:20-bullseye-slim
depends_on: [ phpcs ]
Expand Down Expand Up @@ -414,6 +421,6 @@ trigger:

---
kind: signature
hmac: bd41423d85abadb875c8fc911f87596ead88b62d26fabf6a283737c5a7b4c5b9
hmac: ddec56bc5feb60a0a7009d94356b2425e3a3ae112f3f0c89683e1a55f87fa9c2

...
2 changes: 2 additions & 0 deletions build/build.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ function clean_checkout(string $dir)
system('find . -name psalm.xml.dist | xargs rm -rf -');
system('find . -name phpcs.xml | xargs rm -rf -');
system('find . -name phpcs.xml.dist | xargs rm -rf -');
system('find . -name phpstan.neon | xargs rm -rf -');
system('find . -name phpunit.xml | xargs rm -rf -');
system('find . -name phpunit.*.xml | xargs rm -rf -');
system('find . -name phpunit.xml.dist | xargs rm -rf -');
Expand Down Expand Up @@ -408,6 +409,7 @@ function clean_composer(string $dir)
'package.json',
'phpunit-pgsql.xml.dist',
'phpunit.xml.dist',
'phpstan.neon',
'plugins/sampledata/testing/language/en-GB/en-GB.plg_sampledata_testing.ini',
'plugins/sampledata/testing/language/en-GB/en-GB.plg_sampledata_testing.sys.ini',
'plugins/sampledata/testing/testing.php',
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.2",
"joomla/mediawiki": "^3.0",
"joomla/test": "~3.0",
"phan/phan": "^5.4.3"
"phan/phan": "^5.4.3",
"phpstan/phpstan": "^1.11",
"phpstan/phpstan-deprecation-rules": "^1.2"
},
"replace": {
"paragonie/random_compat": "9.99.99",
Expand Down
107 changes: 106 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 41 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
parameters:
level: 0
scanDirectories:
- libraries/php-encryption
- libraries/phpass
scanFiles:
- libraries/loader.php
- libraries/namespacemap.php
paths:
- libraries/src
- administrator
- components
- installation
- plugins
excludePaths:
- administrator/cache
- administrator/components/com_joomlaupdate/finalisation.php
ignoreErrors:
-
message: '#Access to protected property [a-zA-Z0-9\\_]+\\HtmlView::\$[a-zA-Z0-9\\_]+.#'
paths:
- components/*
- administrator/components/*
-
message: '#Call to protected method [a-zA-Z0-9\\_]+\(\) of class Joomla\\CMS\\MVC\\View\\AbstractView\.#'
paths:
- components/*
- administrator/components/*
-
message: '#Call to protected method [a-zA-Z0-9\\_]+\(\) of class Joomla\\CMS\\MVC\\View\\HtmlView\.#'
paths:
- components/*
- administrator/components/*
-
message: '#Call to protected method [a-zA-Z0-9\\_]+\(\) of class Joomla\\CMS\\.*\.#'
paths:
- plugins/*
-
message: '#Call to deprecated method \_\(\) of class Joomla\\CMS\\Language\\Language.*#'
includes:
- libraries/vendor/phpstan/phpstan-deprecation-rules/rules.neon