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/dbal/src/Schema/AbstractAsset.php | 157 ---------------------- 1 file changed, 157 deletions(-) delete mode 100644 vendor/doctrine/dbal/src/Schema/AbstractAsset.php (limited to 'vendor/doctrine/dbal/src/Schema/AbstractAsset.php') diff --git a/vendor/doctrine/dbal/src/Schema/AbstractAsset.php b/vendor/doctrine/dbal/src/Schema/AbstractAsset.php deleted file mode 100644 index de5b56f..0000000 --- a/vendor/doctrine/dbal/src/Schema/AbstractAsset.php +++ /dev/null @@ -1,157 +0,0 @@ - Table($tableName)); if you want to rename the table, you have to make sure this does not get - * recreated during schema migration. - */ -abstract class AbstractAsset -{ - protected string $_name = ''; - - /** - * Namespace of the asset. If none isset the default namespace is assumed. - */ - protected ?string $_namespace = null; - - protected bool $_quoted = false; - - /** - * Sets the name of this asset. - */ - protected function _setName(string $name): void - { - if ($this->isIdentifierQuoted($name)) { - $this->_quoted = true; - $name = $this->trimQuotes($name); - } - - if (str_contains($name, '.')) { - $parts = explode('.', $name); - $this->_namespace = $parts[0]; - $name = $parts[1]; - } - - $this->_name = $name; - } - - /** - * Is this asset in the default namespace? - */ - public function isInDefaultNamespace(string $defaultNamespaceName): bool - { - return $this->_namespace === $defaultNamespaceName || $this->_namespace === null; - } - - /** - * Gets the namespace name of this asset. - * - * If NULL is returned this means the default namespace is used. - */ - public function getNamespaceName(): ?string - { - return $this->_namespace; - } - - /** - * The shortest name is stripped of the default namespace. All other - * namespaced elements are returned as full-qualified names. - */ - public function getShortestName(?string $defaultNamespaceName): string - { - $shortestName = $this->getName(); - if ($this->_namespace === $defaultNamespaceName) { - $shortestName = $this->_name; - } - - return strtolower($shortestName); - } - - /** - * Checks if this asset's name is quoted. - */ - public function isQuoted(): bool - { - return $this->_quoted; - } - - /** - * Checks if this identifier is quoted. - */ - protected function isIdentifierQuoted(string $identifier): bool - { - return isset($identifier[0]) && ($identifier[0] === '`' || $identifier[0] === '"' || $identifier[0] === '['); - } - - /** - * Trim quotes from the identifier. - */ - protected function trimQuotes(string $identifier): string - { - return str_replace(['`', '"', '[', ']'], '', $identifier); - } - - /** - * Returns the name of this schema asset. - */ - public function getName(): string - { - if ($this->_namespace !== null) { - return $this->_namespace . '.' . $this->_name; - } - - return $this->_name; - } - - /** - * Gets the quoted representation of this asset but only if it was defined with one. Otherwise - * return the plain unquoted value as inserted. - */ - public function getQuotedName(AbstractPlatform $platform): string - { - $keywords = $platform->getReservedKeywordsList(); - $parts = explode('.', $this->getName()); - foreach ($parts as $k => $v) { - $parts[$k] = $this->_quoted || $keywords->isKeyword($v) ? $platform->quoteIdentifier($v) : $v; - } - - return implode('.', $parts); - } - - /** - * Generates an identifier from a list of column names obeying a certain string length. - * - * This is especially important for Oracle, since it does not allow identifiers larger than 30 chars, - * however building idents automatically for foreign keys, composite keys or such can easily create - * very long names. - * - * @param array $columnNames - */ - protected function _generateIdentifierName(array $columnNames, string $prefix = '', int $maxSize = 30): string - { - $hash = implode('', array_map(static function ($column): string { - return dechex(crc32($column)); - }, $columnNames)); - - return strtoupper(substr($prefix . '_' . $hash, 0, $maxSize)); - } -} -- cgit v1.2.3