getVersionNumber($version), '11.1', '>=')) { return new DB2111Platform(); } Deprecation::trigger( 'doctrine/dbal', 'https://github.com/doctrine/dbal/pull/5156', 'IBM DB2 < 11.1 support is deprecated and will be removed in DBAL 4.' . ' Consider upgrading to IBM DB2 11.1 or later.', ); return $this->getDatabasePlatform(); } /** * Detects IBM DB2 server version * * @param string $versionString Version string as returned by IBM DB2 server, i.e. 'DB2/LINUXX8664 11.5.8.0' * * @throws DBALException */ private function getVersionNumber(string $versionString): string { if ( preg_match( '/^(?:[^\s]+\s)?(?P\d+)\.(?P\d+)\.(?P\d+)/i', $versionString, $versionParts, ) !== 1 ) { throw DBALException::invalidPlatformVersionSpecified( $versionString, '^(?:[^\s]+\s)?..', ); } return $versionParts['major'] . '.' . $versionParts['minor'] . '.' . $versionParts['patch']; } }