From a5b8f13ca5618addacf226e8ed88188d35a5bbc1 Mon Sep 17 00:00:00 2001 From: Christian Kuhn Date: Tue, 13 Aug 2024 16:27:25 +0200 Subject: [PATCH] [TASK] Add PHP 8.4 compatibility --- src/Plugin/Config.php | 2 +- src/Plugin/Core/IncludeFile.php | 2 +- src/Plugin/Core/IncludeFile/AppDirToken.php | 2 +- src/Plugin/Core/IncludeFile/BaseDirToken.php | 2 +- src/Plugin/Core/IncludeFile/RootDirToken.php | 2 +- src/Plugin/Core/IncludeFile/WebDirToken.php | 2 +- src/Plugin/PluginImplementation.php | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Plugin/Config.php b/src/Plugin/Config.php index 06b0b3a..cb93d81 100644 --- a/src/Plugin/Config.php +++ b/src/Plugin/Config.php @@ -192,7 +192,7 @@ public function getBaseDir() * @param IOInterface|null $io * @return Config */ - public static function load(Composer $composer, IOInterface $io = null) + public static function load(Composer $composer, ?IOInterface $io = null) { static $config; if ($config === null) { diff --git a/src/Plugin/Core/IncludeFile.php b/src/Plugin/Core/IncludeFile.php index ea0ecde..3ba9ca7 100644 --- a/src/Plugin/Core/IncludeFile.php +++ b/src/Plugin/Core/IncludeFile.php @@ -51,7 +51,7 @@ class IncludeFile * @param TokenInterface[] $tokens * @param Filesystem $filesystem */ - public function __construct(IOInterface $io, Composer $composer, array $tokens, Filesystem $filesystem = null) + public function __construct(IOInterface $io, Composer $composer, array $tokens, ?Filesystem $filesystem = null) { $this->io = $io; $this->composer = $composer; diff --git a/src/Plugin/Core/IncludeFile/AppDirToken.php b/src/Plugin/Core/IncludeFile/AppDirToken.php index 2a8f4da..2268286 100644 --- a/src/Plugin/Core/IncludeFile/AppDirToken.php +++ b/src/Plugin/Core/IncludeFile/AppDirToken.php @@ -48,7 +48,7 @@ class AppDirToken implements TokenInterface * @param Typo3PluginConfig $typo3PluginConfig * @param Filesystem $filesystem */ - public function __construct(IOInterface $io, Typo3PluginConfig $typo3PluginConfig, Filesystem $filesystem = null) + public function __construct(IOInterface $io, Typo3PluginConfig $typo3PluginConfig, ?Filesystem $filesystem = null) { $this->io = $io; $this->typo3PluginConfig = $typo3PluginConfig; diff --git a/src/Plugin/Core/IncludeFile/BaseDirToken.php b/src/Plugin/Core/IncludeFile/BaseDirToken.php index 5d0e67b..d71021b 100644 --- a/src/Plugin/Core/IncludeFile/BaseDirToken.php +++ b/src/Plugin/Core/IncludeFile/BaseDirToken.php @@ -48,7 +48,7 @@ class BaseDirToken implements TokenInterface * @param Typo3PluginConfig $typo3PluginConfig * @param Filesystem $filesystem */ - public function __construct(IOInterface $io, Typo3PluginConfig $typo3PluginConfig, Filesystem $filesystem = null) + public function __construct(IOInterface $io, Typo3PluginConfig $typo3PluginConfig, ?Filesystem $filesystem = null) { $this->io = $io; $this->typo3PluginConfig = $typo3PluginConfig; diff --git a/src/Plugin/Core/IncludeFile/RootDirToken.php b/src/Plugin/Core/IncludeFile/RootDirToken.php index d079f87..f994871 100644 --- a/src/Plugin/Core/IncludeFile/RootDirToken.php +++ b/src/Plugin/Core/IncludeFile/RootDirToken.php @@ -48,7 +48,7 @@ class RootDirToken implements TokenInterface * @param Typo3PluginConfig $typo3PluginConfig * @param Filesystem $filesystem */ - public function __construct(IOInterface $io, Typo3PluginConfig $typo3PluginConfig, Filesystem $filesystem = null) + public function __construct(IOInterface $io, Typo3PluginConfig $typo3PluginConfig, ?Filesystem $filesystem = null) { $this->io = $io; $this->typo3PluginConfig = $typo3PluginConfig; diff --git a/src/Plugin/Core/IncludeFile/WebDirToken.php b/src/Plugin/Core/IncludeFile/WebDirToken.php index 1af3ca6..061a2f5 100644 --- a/src/Plugin/Core/IncludeFile/WebDirToken.php +++ b/src/Plugin/Core/IncludeFile/WebDirToken.php @@ -48,7 +48,7 @@ class WebDirToken implements TokenInterface * @param Typo3PluginConfig $typo3PluginConfig * @param Filesystem $filesystem */ - public function __construct(IOInterface $io, Typo3PluginConfig $typo3PluginConfig, Filesystem $filesystem = null) + public function __construct(IOInterface $io, Typo3PluginConfig $typo3PluginConfig, ?Filesystem $filesystem = null) { $this->io = $io; $this->typo3PluginConfig = $typo3PluginConfig; diff --git a/src/Plugin/PluginImplementation.php b/src/Plugin/PluginImplementation.php index db60189..776bbac 100644 --- a/src/Plugin/PluginImplementation.php +++ b/src/Plugin/PluginImplementation.php @@ -55,8 +55,8 @@ class PluginImplementation */ public function __construct( Event $event, - ScriptDispatcher $scriptDispatcher = null, - IncludeFile $includeFile = null + ?ScriptDispatcher $scriptDispatcher = null, + ?IncludeFile $includeFile = null ) { $io = $event->getIO(); $this->composer = $event->getComposer();