Skip to content

Commit

Permalink
[TASK] Add PHP 8.4 compatibility (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
lolli42 authored Aug 13, 2024
1 parent 613d820 commit 29fb214
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/Installer/ExtensionInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ExtensionInstaller extends LibraryInstaller
public function __construct(
IOInterface $io,
Composer $composer,
Config $pluginConfig = null
?Config $pluginConfig = null
) {
parent::__construct($io, $composer);

Expand Down Expand Up @@ -78,7 +78,7 @@ public function getInstallPath(PackageInterface $package)
return $this->extensionDir . DIRECTORY_SEPARATOR . $extensionInstallDir;
}

public function cleanup($type, PackageInterface $package, PackageInterface $prevPackage = null)
public function cleanup($type, PackageInterface $package, ?PackageInterface $prevPackage = null)
{
$originalInstallPath = parent::getInstallPath($package);
if (file_exists($originalInstallPath) && $this->filesystem->isDirEmpty($originalInstallPath)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/Core/IncludeFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,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;
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/Core/IncludeFile/AppDirToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/Core/IncludeFile/BaseDirToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/Core/IncludeFile/RootDirToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/Core/IncludeFile/WebDirToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/PluginImplementation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/Util/ExtensionKeyResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ExtensionKeyResolver
* @throws \RuntimeException
* @return string
*/
public static function resolve(PackageInterface $package, IOInterface $io = null): string
public static function resolve(PackageInterface $package, ?IOInterface $io = null): string
{
if (strpos($package->getType(), 'typo3-cms-') === false) {
throw new \RuntimeException(sprintf('Tried to resolve an extension key from non extension package "%s"', $package->getName()), 1501195043);
Expand Down

0 comments on commit 29fb214

Please sign in to comment.