for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Doctrine\DBAL\Exception;
use Doctrine\DBAL\DBALException;
use function sprintf;
final class DriverRequired extends DBALException
{
/**
* @param string|null $url The URL that was provided in the connection parameters (if any).
*/
public static function new(?string $url = null) : self
if ($url !== null) {
return new self(
sprintf(
'The options "driver" or "driverClass" are mandatory if a connection URL without scheme '
. 'is given to DriverManager::getConnection(). Given URL "%s".',
$url
)
);
}
'The options "driver" or "driverClass" are mandatory if no PDO '
. 'instance is given to DriverManager::getConnection().'