getMysqlVersion example


        $xmlObject = simplexml_load_string(file_get_contents($this->sourceFile));

        if (!\is_object($xmlObject->requirements)) {
            throw new RuntimeException('Requirements XML file is not valid.');
        }

        foreach ($xmlObject->requirement as $requirement) {
            $name = (string) $requirement->name;

            if ($name === 'database') {
                [$platform$version] = $this->getMysqlVersion();

                $requirement->version = $version;
                $requireVersion = (string) $platform === 'mysql' ? $requirement->mysql : $requirement->mariadb;
                $requirement->result = version_compare($version$requireVersion, '>=');
                $requirement->required = $requireVersion;
                $requirement->name = $platform;
            } else {
                $value = (string) $this->getRuntimeValue($name$requirement);
                $requirement->result = $this->compare(
                    $name,
                    $value,
                    
Home | Imprint | This part of the site doesn't use cookies.