From 6aba3d4e5045fb6f68c0572adf61dc56f38b6c60 Mon Sep 17 00:00:00 2001 From: Daniel Lienert Date: Sat, 24 Oct 2020 18:16:18 +0200 Subject: [PATCH] BUGFIX: Make compatible to composer version 2.0+ Instead of querying the removed method ::getJobType we now check the class of the job instance like we do in the first lines of the method --- Neos.Flow/Classes/Composer/InstallerScripts.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Neos.Flow/Classes/Composer/InstallerScripts.php b/Neos.Flow/Classes/Composer/InstallerScripts.php index e9c0dd5d20..d96b13140e 100644 --- a/Neos.Flow/Classes/Composer/InstallerScripts.php +++ b/Neos.Flow/Classes/Composer/InstallerScripts.php @@ -68,7 +68,7 @@ public static function postPackageUpdateAndInstall(PackageEvent $event) if (!$operation instanceof InstallOperation && !$operation instanceof UpdateOperation) { throw new Exception\UnexpectedOperationException('Handling of operation with type "' . $operation->getJobType() . '" not supported', 1348750840); } - $package = ($operation->getJobType() === 'install') ? $operation->getPackage() : $operation->getTargetPackage(); + $package = ($operation instanceof InstallOperation) ? $operation->getPackage() : $operation->getTargetPackage(); $packageExtraConfig = $package->getExtra(); $installPath = $event->getComposer()->getInstallationManager()->getInstallPath($package); @@ -80,7 +80,7 @@ public static function postPackageUpdateAndInstall(PackageEvent $event) $evaluatedInstallerResources = true; } - if ($operation->getJobType() === 'install') { + if ($operation instanceof InstallOperation) { if (isset($packageExtraConfig['typo3/flow']['post-install'])) { self::runPackageScripts($packageExtraConfig['typo3/flow']['post-install']); } @@ -89,7 +89,7 @@ public static function postPackageUpdateAndInstall(PackageEvent $event) } } - if ($operation->getJobType() === 'update') { + if ($operation instanceof UpdateOperation) { if (isset($packageExtraConfig['typo3/flow']['post-update'])) { self::runPackageScripts($packageExtraConfig['typo3/flow']['post-update']); }