Skip to content

Commit

Permalink
Merge branch '3.3.x' into 4.0.x
Browse files Browse the repository at this point in the history
* 3.3.x:
  Drop DBAL 2 compat code (#11674)
  Update branch metadata (#11672)
  • Loading branch information
derrabus committed Oct 13, 2024
2 parents a0f5b4c + e9f3ca2 commit 25066f8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
10 changes: 8 additions & 2 deletions .doctrine-project.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,23 @@
"slug": "latest",
"upcoming": true
},
{
"name": "3.4",
"branchName": "3.4.x",
"slug": "3.4",
"upcoming": true
},
{
"name": "3.3",
"branchName": "3.3.x",
"slug": "3.3",
"upcoming": true
"current": true
},
{
"name": "3.2",
"branchName": "3.2.x",
"slug": "3.2",
"current": true
"maintained": false
},
{
"name": "3.1",
Expand Down
13 changes: 4 additions & 9 deletions tests/Tests/ORM/Functional/Ticket/GH10747Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Doctrine\Tests\OrmFunctionalTestCase;
use PHPUnit\Framework\Attributes\Group;

use function method_exists;
use function str_replace;

/**
Expand Down Expand Up @@ -135,23 +134,19 @@ public function __construct(GH10747Article $article, public string $name)

class GH10747CustomIdObjectHashType extends DBALType
{
public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): mixed
public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): string
{
return $value->id . '_test';
}

public function convertToPHPValue(mixed $value, AbstractPlatform $platform): mixed
public function convertToPHPValue(mixed $value, AbstractPlatform $platform): CustomIdObject
{
return new CustomIdObject(str_replace('_test', '', $value));
}

public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform): string
public function getSQLDeclaration(array $column, AbstractPlatform $platform): string
{
if (method_exists($platform, 'getStringTypeDeclarationSQL')) {
return $platform->getStringTypeDeclarationSQL($fieldDeclaration);
}

return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration);
return $platform->getStringTypeDeclarationSQL($column);
}

public function getName(): string
Expand Down

0 comments on commit 25066f8

Please # to comment.