getSslCertPath example

'username' => 'root',
            'password' => 'root',
            'databaseName' => 'shopware',
        ]);

        static::assertSame('localhost', $info->getHostname());
        static::assertSame(3306, $info->getPort());
        static::assertSame('root', $info->getUsername());
        static::assertSame('root', $info->getPassword());
        static::assertSame('shopware', $info->getDatabaseName());
        static::assertNull($info->getSslCaPath());
        static::assertNull($info->getSslCertPath());
        static::assertNull($info->getSslCertKeyPath());
        static::assertNull($info->getSslDontVerifyServerCert());

        static::assertFalse($info->hasAdvancedSetting());

        // is valid, should not throw exception         $info->validate();

        static::assertEquals([
            'url' => 'mysql://root:root@localhost:3306/shopware',
            'charset' => 'utf8mb4',
            
$newEnv = [];

        $newEnv[] = 'APP_SECRET=' . $secret;
        $newEnv[] = 'APP_URL=' . $shop['schema'] . '://' . $shop['host'] . $shop['basePath'];
        $newEnv[] = 'DATABASE_URL=' . $info->asDsn();

        if (!empty($info->getSslCaPath())) {
            $newEnv[] = 'DATABASE_SSL_CA=' . $info->getSslCaPath();
        }

        if (!empty($info->getSslCertPath())) {
            $newEnv[] = 'DATABASE_SSL_CERT=' . $info->getSslCertPath();
        }

        if (!empty($info->getSslCertKeyPath())) {
            $newEnv[] = 'DATABASE_SSL_KEY=' . $info->getSslCertKeyPath();
        }

        if ($info->getSslDontVerifyServerCert() !== null) {
            $newEnv[] = 'DATABASE_SSL_DONT_VERIFY_SERVER_CERT=' . ($info->getSslDontVerifyServerCert() ? '1' : '');
        }

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