From 05e38eadbeb3de19e5b26003c2b401e00bb71df4 Mon Sep 17 00:00:00 2001 From: polo Date: Sun, 18 Oct 2026 00:08:23 +0200 Subject: =?UTF-8?q?sortie=20de=20vendor=20du=20d=C3=A9p=C3=B4t,=20oubli=20?= =?UTF-8?q?dans=20config-template.ini?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vendor/doctrine/orm/src/ORMSetup.php | 127 ----------------------------------- 1 file changed, 127 deletions(-) delete mode 100644 vendor/doctrine/orm/src/ORMSetup.php (limited to 'vendor/doctrine/orm/src/ORMSetup.php') diff --git a/vendor/doctrine/orm/src/ORMSetup.php b/vendor/doctrine/orm/src/ORMSetup.php deleted file mode 100644 index 7354c71..0000000 --- a/vendor/doctrine/orm/src/ORMSetup.php +++ /dev/null @@ -1,127 +0,0 @@ -setMetadataDriverImpl(new AttributeDriver($paths)); - - return $config; - } - - /** - * Creates a configuration with an XML metadata driver. - * - * @param string[] $paths - */ - public static function createXMLMetadataConfiguration( - array $paths, - bool $isDevMode = false, - string|null $proxyDir = null, - CacheItemPoolInterface|null $cache = null, - bool $isXsdValidationEnabled = true, - ): Configuration { - $config = self::createConfiguration($isDevMode, $proxyDir, $cache); - $config->setMetadataDriverImpl(new XmlDriver($paths, XmlDriver::DEFAULT_FILE_EXTENSION, $isXsdValidationEnabled)); - - return $config; - } - - /** - * Creates a configuration without a metadata driver. - */ - public static function createConfiguration( - bool $isDevMode = false, - string|null $proxyDir = null, - CacheItemPoolInterface|null $cache = null, - ): Configuration { - $proxyDir = $proxyDir ?: sys_get_temp_dir(); - - $cache = self::createCacheInstance($isDevMode, $proxyDir, $cache); - - $config = new Configuration(); - - $config->setMetadataCache($cache); - $config->setQueryCache($cache); - $config->setResultCache($cache); - $config->setProxyDir($proxyDir); - $config->setProxyNamespace('DoctrineProxies'); - $config->setAutoGenerateProxyClasses($isDevMode); - - return $config; - } - - private static function createCacheInstance( - bool $isDevMode, - string $proxyDir, - CacheItemPoolInterface|null $cache, - ): CacheItemPoolInterface { - if ($cache !== null) { - return $cache; - } - - if (! class_exists(ArrayAdapter::class)) { - throw new RuntimeException( - 'The Doctrine setup tool cannot configure caches without symfony/cache.' - . ' Please add symfony/cache as explicit dependency or pass your own cache implementation.', - ); - } - - if ($isDevMode) { - return new ArrayAdapter(); - } - - $namespace = 'dc2_' . md5($proxyDir); - - if (extension_loaded('apcu') && apcu_enabled()) { - return new ApcuAdapter($namespace); - } - - if (MemcachedAdapter::isSupported()) { - return new MemcachedAdapter(MemcachedAdapter::createConnection('memcached://127.0.0.1'), $namespace); - } - - if (extension_loaded('redis')) { - $redis = new Redis(); - $redis->connect('127.0.0.1'); - - return new RedisAdapter($redis, $namespace); - } - - return new ArrayAdapter(); - } - - private function __construct() - { - } -} -- cgit v1.2.3