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
This commit is contained in:
Alexandre Alapetite 2024-04-11 09:09:50 +02:00 committed by GitHub
parent 45a66b0de7
commit 01f3473368
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 197 additions and 111 deletions

View file

@ -11,14 +11,12 @@ final class ImageProxyExtension extends Minz_Extension {
private const SCHEME_INCLUDE = '';
private const URL_ENCODE = '1';
#[\Override]
public function init(): void {
if (!FreshRSS_Context::hasSystemConf()) {
throw new FreshRSS_Context_Exception('System configuration not initialised!');
}
$this->registerHook(
'entry_before_display',
array('ImageProxyExtension', 'setImageProxyHook')
);
$this->registerHook('entry_before_display', [self::class, 'setImageProxyHook']);
// Defaults
$save = false;
if (is_null(FreshRSS_Context::userConf()->image_proxy_url)) {
@ -55,6 +53,7 @@ final class ImageProxyExtension extends Minz_Extension {
}
}
#[\Override]
public function handleConfigureAction(): void {
$this->registerTranslates();