From 381a6f72d382ff607ef58991a55d7691fd2cce58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 13 Oct 2021 04:14:21 +0200 Subject: [PATCH 1/2] Import Cake\Codeception\Console\Installer --- src/Console/Installer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Console/Installer.php b/src/Console/Installer.php index 8d98c77099..9fb4555ec2 100644 --- a/src/Console/Installer.php +++ b/src/Console/Installer.php @@ -20,6 +20,7 @@ define('STDIN', fopen('php://stdin', 'r')); } +use Cake\Codeception\Console\Installer; use Cake\Utility\Security; use Composer\Script\Event; use Exception; @@ -63,9 +64,8 @@ public static function postInstall(Event $event) static::setFolderPermissions($rootDir, $io); static::setSecuritySalt($rootDir, $io); - $class = 'Cake\Codeception\Console\Installer'; - if (class_exists($class)) { - $class::customizeCodeceptionBinary($event); + if (class_exists(Installer::class)) { + Installer::customizeCodeceptionBinary($event); } } From 23a6b1f2a3a337f46e24e59082ef453b0afe9c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 13 Oct 2021 04:17:22 +0200 Subject: [PATCH 2/2] Fix name conflict in Installer --- src/Console/Installer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Console/Installer.php b/src/Console/Installer.php index 9fb4555ec2..4bdccc104d 100644 --- a/src/Console/Installer.php +++ b/src/Console/Installer.php @@ -20,7 +20,7 @@ define('STDIN', fopen('php://stdin', 'r')); } -use Cake\Codeception\Console\Installer; +use Cake\Codeception\Console\Installer as CodeceptionInstaller; use Cake\Utility\Security; use Composer\Script\Event; use Exception; @@ -64,8 +64,8 @@ public static function postInstall(Event $event) static::setFolderPermissions($rootDir, $io); static::setSecuritySalt($rootDir, $io); - if (class_exists(Installer::class)) { - Installer::customizeCodeceptionBinary($event); + if (class_exists(CodeceptionInstaller::class)) { + CodeceptionInstaller::customizeCodeceptionBinary($event); } }