New developer command to test all third-party extensions#228
Conversation
* `composer run-script phpstan-third-party` * Rename the directory for generate.php to `third-party` instead of `tmp` * Take advantage of PHPStan checkMissingOverrideMethodAttribute https://phpstan.org/config-reference#checkmissingoverridemethodattribute * Detected and fixed bug in URL of https://github.com/tunbridgep/freshrss-invidious
| if (file_exists($tempFolder)) { | ||
| // TODO: Improve by keeping git copy if possible (e.g. fetch + reset) | ||
| exec("rm -rf -- {$tempFolder}"); |
There was a problem hiding this comment.
For a future PR: help welcome for some commands to keep the local git copies and update them via git safely
| "phpstan": "phpstan analyse --memory-limit 512M .", | ||
| "phpstan-next": "phpstan analyse --level 9 --memory-limit 512M $(find . -type d -name 'vendor' -prune -o -name '*.php' -o -name '*.phtml' | grep -Fxvf ./tests/phpstan-next.txt | sort | paste -s -)", | ||
| "phpstan-next": "phpstan analyse --memory-limit 512M -c phpstan-next.neon .", | ||
| "phpstan-third-party": "phpstan analyse --memory-limit 512M -c phpstan-third-party.neon .", |
There was a problem hiding this comment.
For a future PR: it would be nice to add that during the GitHub Actions for generate.php to e.g. report warnings or even exclude failing extensions
There was a problem hiding this comment.
This memory limit thing is for GitHub Actions btw?
There was a problem hiding this comment.
It used to fail even on my machine without it, but I have not tested recently, and now that our code base has much fewer errors, it might work with the default value (which is lower)
There was a problem hiding this comment.
Ahh I figured it was the other way around. xD
|
PR to third-party extension ( @nicofrand ) so that they all pass the test https://framagit.org/nicofrand/xextension-togglablemenu/-/merge_requests/1 |
https://php.watch/versions/8.3/override-attr With PHPStan `checkMissingOverrideMethodAttribute` https://phpstan.org/config-reference#checkmissingoverridemethodattribute And modified the call to phpstan-next on the model of FreshRSS/Extensions#228 (more robust than the find method, which gave some strange errors)
|
Corresponding PR in core FreshRSS FreshRSS/FreshRSS#6273 |
* PHP 8.3 #[\Override] https://php.watch/versions/8.3/override-attr With PHPStan `checkMissingOverrideMethodAttribute` https://phpstan.org/config-reference#checkmissingoverridemethodattribute And modified the call to phpstan-next on the model of FreshRSS/Extensions#228 (more robust than the find method, which gave some strange errors) * Update extension example accordingly
composer run-script phpstan-third-partythird-partyinstead oftmp