Skip to content

Commit 01f3473

Browse files
authored
New developer command to test all third-party extensions (#228)
* New developer command to test all third-party extensions * `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 * Better syntax for registerHook * Fix static * #[\Override] * Static method
1 parent 45a66b0 commit 01f3473

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+197
-111
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
*.min.js
33
node_modules/
44
symbolic/
5+
third-party/
56
tmp/
67
vendor/

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
bin/
33
node_modules/
44
symbolic/
5+
third-party/
56
tmp/
67
vendor/

.jshintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.git/
22
node_modules/
33
symbolic/
4+
third-party/
45
tmp/
56
vendor/

.markdownlintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.git/
22
node_modules/
33
symbolic/
4+
third-party/
45
tmp/
56
vendor/

.stylelintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.git/
22
node_modules/
33
symbolic/
4+
third-party/
45
tmp/
56
vendor/

.typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ extend-exclude = [
1717
"bin/",
1818
"node_modules/",
1919
"symbolic/",
20+
"third-party/",
2021
"tmp/",
2122
"vendor/",
2223
"xExtension-ReadingTime/README.md"

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ To install an extension, download [the extension archive](https://github.com/Fre
66
Then, upload the specific extension(s) you want on your server.
77
Extensions must be in the `./extensions` directory of your FreshRSS installation.
88

9+
## Commands for developers
10+
11+
```sh
12+
# Test this repository and its extensions
13+
make test-all
14+
15+
# Test compatibility between `../FreshRSS/` core and all known extensions from `./repositories.json`
16+
./generate.php
17+
composer run-script phpstan-third-party
18+
```
19+
920
## Third-party extensions
1021

1122
There are some FreshRSS extensions out there, developed by community members:

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,22 @@
4545
"ext-pdo_pgsql": "*"
4646
},
4747
"require-dev": {
48-
"php": ">=8.0",
48+
"php": ">=7.4",
4949
"ext-phar": "*",
5050
"ext-tokenizer": "*",
5151
"ext-xmlwriter": "*",
5252
"phpstan/phpstan": "^1.10",
5353
"phpstan/phpstan-strict-rules": "^1.5",
54-
"squizlabs/php_codesniffer": "^3.7"
54+
"squizlabs/php_codesniffer": "^3.9"
5555
},
5656
"scripts": {
5757
"php-lint": "find . -type d -name 'vendor' -prune -o -name '*.php' -print0 | xargs -0 -n1 -P4 php -l 1>/dev/null",
5858
"phtml-lint": "find . -type d -name 'vendor' -prune -o -name '*.phtml' -print0 | xargs -0 -n1 -P4 php -l 1>/dev/null",
5959
"phpcs": "phpcs . -s",
6060
"phpcbf": "phpcbf . -p -s",
6161
"phpstan": "phpstan analyse --memory-limit 512M .",
62-
"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 -)",
62+
"phpstan-next": "phpstan analyse --memory-limit 512M -c phpstan-next.neon .",
63+
"phpstan-third-party": "phpstan analyse --memory-limit 512M -c phpstan-third-party.neon .",
6364
"test": [
6465
"@php-lint",
6566
"@phtml-lint",

composer.lock

Lines changed: 52 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extensions.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,17 @@
221221
"method": "git",
222222
"directory": "xExtension-Invidious"
223223
},
224+
{
225+
"name": "Invidious Video Feed",
226+
"author": "Paul Tunbridge (forked from Korbak and Kevin Papst)",
227+
"description": "Embed YouTube feeds inside article content, but with Invidious.",
228+
"version": "1.1",
229+
"entrypoint": "Invidious",
230+
"type": "user",
231+
"url": "https://github.com/tunbridgep/freshrss-invidious",
232+
"method": "git",
233+
"directory": "xExtension-Invidious"
234+
},
224235
{
225236
"name": "Kagi Summarizer",
226237
"author": "Rudis Muiznieks",

0 commit comments

Comments
 (0)