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
This commit is contained in:
Alexandre Alapetite 2024-04-07 17:06:35 +02:00
parent 9f21984b8c
commit cc6bf0d1e6
No known key found for this signature in database
GPG key ID: A24378C38E812B23
45 changed files with 192 additions and 100 deletions

View file

@ -7,7 +7,7 @@
*
* @author Kevin Papst
*/
class YouTubeExtension extends Minz_Extension
final class YouTubeExtension extends Minz_Extension
{
/**
* Video player width
@ -26,18 +26,11 @@ class YouTubeExtension extends Minz_Extension
*/
private bool $useNoCookie = false;
public function install() {
return true;
}
public function uninstall() {
return true;
}
/**
* Initialize this extension
*/
public function init()
#[Override]
public function init(): void
{
$this->registerHook('entry_before_display', array($this, 'embedYouTubeVideo'));
$this->registerHook('check_url_before_add', array($this, 'convertYoutubeFeedUrl'));
@ -250,6 +243,7 @@ class YouTubeExtension extends Minz_Extension
* - We save configuration in case of a post.
* - We (re)load configuration in all case, so they are in-sync after a save and before a page load.
*/
#[Override]
public function handleConfigureAction(): void
{
$this->registerTranslates();