Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update phpstan-baseline.neon in order to remove ignored error #2346

Merged
merged 1 commit into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
dbal-version: "^2.13.1"
- deps: "highest"
php-version: "8.0"
dbal-version: "^3.1"
dbal-version: "^3.2"

steps:
- name: "Checkout"
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ a release.

## [Unreleased]
### Added
- Support for doctrine/dbal 3.x
- Support for doctrine/dbal >=3.2
- Timestampable: Support to use annotations as attributes on PHP >= 8.0.

### Changes
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
},
"conflict": {
"doctrine/cache": "<1.11",
"doctrine/dbal": "<2.13.1 || ~3.0.0",
"doctrine/dbal": "<2.13.1 || ^3.0 <3.2",
"doctrine/mongodb-odm": "<2.0",
"doctrine/orm": "<2.10.2",
"sebastian/comparator": "<2.0"
},
"require-dev": {
"doctrine/cache": "^1.11 || ^2.0",
"doctrine/dbal": "^2.13.1 || ^3.1",
"doctrine/dbal": "^2.13.1 || ^3.2",
"doctrine/doctrine-bundle": "^2.3",
"doctrine/mongodb-odm": "^2.0",
"doctrine/orm": "^2.10.2",
Expand Down
5 changes: 0 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,3 @@ parameters:
count: 1
path: src/Tool/Wrapper/MongoDocumentWrapper.php

-
message: "#^Class Doctrine\\\\DBAL\\\\Platforms\\\\PostgreSQLPlatform not found\\.$#"
count: 1
path: src/Translatable/Query/TreeWalker/TranslationWalker.php

7 changes: 1 addition & 6 deletions src/Translatable/Query/TreeWalker/TranslationWalker.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
namespace Gedmo\Translatable\Query\TreeWalker;

use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Types\Type;
use Doctrine\ORM\Mapping\ClassMetadata;
Expand Down Expand Up @@ -467,12 +466,8 @@ private function getCastedForeignKey(string $component, string $typeFK, string $
return $component;
}

// @todo: remove the `PostgreSQL94Platform` check when dropping doctrine/dbal 3.1.x support
// the below check prefers the `PostgreSQLPlatform` class for doctrine/dbal 2.13.x or 3.2
// and later and falls back to the `PostgreSQL94Platform` class for compatibility with 3.1
// where `PostgreSQLPlatform` does not exist
// try to look at postgres casting
if ($this->platform instanceof PostgreSQLPlatform || $this->platform instanceof PostgreSQL94Platform) {
if ($this->platform instanceof PostgreSQLPlatform) {
switch ($typeFK) {
case 'string':
case 'guid':
Expand Down