diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 249a050542..9a66c44db2 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -25,4 +25,4 @@ on: jobs: coding-standards: name: "Coding Standards" - uses: "doctrine/.github/.github/workflows/coding-standards.yml@3.1.0" + uses: "doctrine/.github/.github/workflows/coding-standards.yml@4.0.0" diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 286c1385e2..1cfda1b111 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -87,9 +87,9 @@ jobs: run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml" - name: "Upload coverage file" - uses: "actions/upload-artifact@v3" + uses: "actions/upload-artifact@v4" with: - name: "phpunit-${{ matrix.extension }}-${{ matrix.deps }}-${{ matrix.php-version }}.coverage" + name: "phpunit-${{ matrix.extension }}-${{ matrix.dependencies }}-${{ matrix.php-version }}.coverage" path: "coverage.xml" phpunit-oci8: @@ -144,9 +144,9 @@ jobs: run: "vendor/bin/phpunit -c ci/github/phpunit/oci8${{ matrix.oracle-version < 23 && '-21' || '' }}.xml --coverage-clover=coverage.xml" - name: "Upload coverage file" - uses: "actions/upload-artifact@v3" + uses: "actions/upload-artifact@v4" with: - name: "${{ github.job }}-${{ matrix.php-version }}.coverage" + name: "${{ github.job }}-${{ matrix.php-version }}-${{ matrix.oracle-version }}.coverage" path: "coverage.xml" phpunit-pdo-oci: @@ -201,9 +201,9 @@ jobs: run: "vendor/bin/phpunit -c ci/github/phpunit/pdo_oci${{ matrix.oracle-version < 23 && '-21' || '' }}.xml --coverage-clover=coverage.xml" - name: "Upload coverage file" - uses: "actions/upload-artifact@v3" + uses: "actions/upload-artifact@v4" with: - name: "${{ github.job }}-${{ matrix.php-version }}.coverage" + name: "${{ github.job }}-${{ matrix.php-version }}-${{ matrix.oracle-version }}.coverage" path: "coverage.xml" phpunit-postgres: @@ -265,7 +265,7 @@ jobs: run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml" - name: "Upload coverage file" - uses: "actions/upload-artifact@v3" + uses: "actions/upload-artifact@v4" with: name: "${{ github.job }}-${{ matrix.postgres-version }}-${{ matrix.extension }}-${{ matrix.php-version }}.coverage" path: "coverage.xml" @@ -334,7 +334,7 @@ jobs: run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml" - name: "Upload coverage file" - uses: "actions/upload-artifact@v3" + uses: "actions/upload-artifact@v4" with: name: "${{ github.job }}-${{ matrix.mariadb-version }}-${{ matrix.extension }}-${{ matrix.php-version }}.coverage" path: "coverage.xml" @@ -409,7 +409,7 @@ jobs: run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}${{ matrix.config-file-suffix }}.xml --coverage-clover=coverage.xml" - name: "Upload coverage file" - uses: "actions/upload-artifact@v3" + uses: "actions/upload-artifact@v4" with: name: "${{ github.job }}-${{ matrix.mysql-version }}-${{ matrix.extension }}-${{ matrix.config-file-suffix }}-${{ matrix.php-version }}.coverage" path: "coverage.xml" @@ -476,7 +476,7 @@ jobs: run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml" - name: "Upload coverage file" - uses: "actions/upload-artifact@v3" + uses: "actions/upload-artifact@v4" with: name: "${{ github.job }}-${{ matrix.extension }}-${{ matrix.php-version }}-${{ matrix.collation }}.coverage" path: "coverage.xml" @@ -547,7 +547,7 @@ jobs: run: "vendor/bin/phpunit -c ci/github/phpunit/ibm_db2.xml --coverage-clover=coverage.xml" - name: "Upload coverage file" - uses: "actions/upload-artifact@v3" + uses: "actions/upload-artifact@v4" with: name: "${{ github.job }}-${{ matrix.php-version }}.coverage" path: "coverage.xml" @@ -601,7 +601,7 @@ jobs: fetch-depth: 2 - name: "Download coverage files" - uses: "actions/download-artifact@v3" + uses: "actions/download-artifact@v4" with: path: "reports" diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 4223053ca4..08a8852775 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -7,7 +7,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v6 + - uses: actions/stale@v9 with: stale-pr-message: > There hasn't been any activity on this pull request in the past 90 days, so diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 9b1999f3f8..ce807684af 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -34,7 +34,7 @@ jobs: strategy: matrix: php-version: - - "8.2" + - "8.3" steps: - name: "Checkout code" @@ -60,7 +60,7 @@ jobs: strategy: matrix: php-version: - - "8.2" + - "8.3" steps: - name: Checkout code diff --git a/src/Platforms/AbstractPlatform.php b/src/Platforms/AbstractPlatform.php index 3959e2fa29..0beb37a093 100644 --- a/src/Platforms/AbstractPlatform.php +++ b/src/Platforms/AbstractPlatform.php @@ -131,6 +131,7 @@ private function initializeAllDoctrineTypeMappings(): void foreach (Type::getTypesMap() as $typeName => $className) { foreach (Type::getType($typeName)->getMappedDatabaseTypes($this) as $dbType) { + $dbType = strtolower($dbType); $this->doctrineTypeMapping[$dbType] = $typeName; } } diff --git a/tests/Platforms/AbstractPlatformTestCase.php b/tests/Platforms/AbstractPlatformTestCase.php index 4687394934..54f5022b2d 100644 --- a/tests/Platforms/AbstractPlatformTestCase.php +++ b/tests/Platforms/AbstractPlatformTestCase.php @@ -85,6 +85,40 @@ public function testRegisterDoctrineMappingType(): void self::assertEquals(Types::INTEGER, $this->platform->getDoctrineTypeMapping('foo')); } + public function testCaseInsensitiveDoctrineTypeMappingFromType(): void + { + $type = new class () extends Type { + /** + * {@inheritDoc} + */ + public function getMappedDatabaseTypes(AbstractPlatform $platform): array + { + return ['TESTTYPE']; + } + + public function getName(): string + { + return 'testtype'; + } + + /** + * {@inheritDoc} + */ + public function getSQLDeclaration(array $column, AbstractPlatform $platform): string + { + return $platform->getDecimalTypeDeclarationSQL($column); + } + }; + + if (Type::hasType($type->getName())) { + Type::overrideType($type->getName(), $type::class); + } else { + Type::addType($type->getName(), $type::class); + } + + self::assertSame($type->getName(), $this->platform->getDoctrineTypeMapping('TeStTyPe')); + } + public function testRegisterUnknownDoctrineMappingType(): void { $this->expectException(Exception::class);