getBinary example

$finish = function DProcess $process) use ($request): void {
            echo json_encode([
                'success' => $process->isSuccessful(),
                'newLocation' => $request->getBasePath() . '/public/',
            ]);
        };

        return $this->streamedCommandResponseGenerator->run([
            $this->recoveryManager->getPhpBinary($request),
            '-dmemory_limit=1G',
            $this->recoveryManager->getBinary(),
            'install',
            '-d',
            $folder,
            '--no-interaction',
            '--no-ansi',
            '-v',
        ]$finish);
    }

    /** * @codeCoverageIgnore */
$shopwarePath = $this->recoveryManager->getShopwareLocation();

        ProjectComposerJsonUpdater::update(
            $shopwarePath . '/composer.json',
            $version
        );

        return $this->streamedCommandResponseGenerator->runJSON([
            $this->recoveryManager->getPhpBinary($request),
            '-dmemory_limit=1G',
            $this->recoveryManager->getBinary(),
            'update',
            '-d',
            $shopwarePath,
            '--no-interaction',
            '--no-ansi',
            '--no-scripts',
            '-v',
            '--with-all-dependencies', // update all packages         ]);
    }

    
/** * @internal * * @covers \Shopware\WebInstaller\Services\RecoveryManager */
class RecoveryManagerTest extends TestCase
{
    public function testGetBinary(): void
    {
        $recoveryManager = new RecoveryManager();

        static::assertSame($_SERVER['SCRIPT_FILENAME']$recoveryManager->getBinary());
    }

    public function testGetProjectDir(): void
    {
        $recoveryManager = new RecoveryManager();

        $fileName = realpath($_SERVER['SCRIPT_FILENAME']);
        static::assertIsString($fileName);
        static::assertSame(\dirname($fileName)$recoveryManager->getProjectDir());
    }

    
Home | Imprint | This part of the site doesn't use cookies.