8000 [Cache] Use binary type for ID column for PostgreSQL by alexndlm · Pull Request #49748 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Cache] Use binary type for ID column for PostgreSQL #49748

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

Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
- fix code style
  • Loading branch information
alexndlm committed Mar 21, 2023
commit 2edd1084e2884fe1b00b0c1b154e303d809cf27a
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,6 @@ private function addTableToSchema(Schema $schema): void

private function getIdColumnType(): int
{
return $this->getPlatformName() === 'pgsql' ? ParameterType::BINARY : ParameterType::STRING;
return 'pgsql' === $this->getPlatformName() ? ParameterType::BINARY : ParameterType::STRING;
}
}
2 changes: 1 addition & 1 deletion src/Symfony/Component/Cache/Adapter/PdoAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,6 @@ private function getServerVersion(): string

private function getIdColumnType(): int
{
return $this->driver === 'pgsql' ? \PDO::PARAM_LOB : \PDO::PARAM_STR;
return 'pgsql' === $this->driver ? \PDO::PARAM_LOB : \PDO::PARAM_STR;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,11 @@

namespace Symfony\Component\Cache\Tests\Adapter;

use Doctrine\DBAL\DriverManager;
use PHPUnit\Framework\SkippedTestSuiteError;
use Psr\Cache\CacheItemPoolInterface;
use Symfony\Component\Cache\Adapter\AbstractAdapter;
use Symfony\Component\Cache\Adapter\DoctrineDbalAdapter;
use Symfony\Component\Cache\Adapter\PdoAdapter;
use Symfony\Component\Cache\Adapter\TagAwareAdapter;
use Symfony\Component\Cache\Tests\Adapter\TagAwareAdapterTestCase;

/**
* @group time-sensitive
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,12 @@
namespace Symfony\Component\Cache\Tests\Adapter;

use PHPUnit\Framework\MockObject\MockObject;
use Psr\Cache\CacheItemPoolInterface;
use Symfony\Component\Cache\Adapter\AbstractAdapter;
< 5937 span class='blob-code-inner blob-code-marker ' data-code-marker=" ">use Symfony\Component\Cache\Adapter\AdapterInterface;
use Symfony\Component\Cache\Adapter\ArrayAdapter;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\Cache\Adapter\TagAwareAdapter;
use Symfony\Component\Cache\PruneableInterface;
use Symfony\Component\Cache\Tests\Adapter\AdapterTestCase;
use Symfony\Component\Cache\Tests\Adapter\TagAwareTestTrait;
use Symfony\Component\Cache\Tests\Fixtures\PrunableAdapter;

abstract class TagAwareAdapterTestCase extends AdapterTestCase
Expand Down
0