Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit14d99b6

Browse files
committed
Update changelogs
1 parent2244bec commit14d99b6

File tree

5 files changed

+35
-19
lines changed

5 files changed

+35
-19
lines changed

‎UPGRADE-5.4.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ HttpFoundation
4141

4242
* Mark`Request::get()` internal, use explicit input sources instead
4343

44+
Lock
45+
----
46+
47+
* Deprecate usage of`PdoStore` with a`Doctrine\DBAL\Connection` or a DBAL url, use the new`DoctrineDbalStore` instead
48+
* Deprecate usage of`PostgreSqlStore` with a`Doctrine\DBAL\Connection` or a DBAL url, use the new`DoctrineDbalPostgreSqlStore` instead
49+
4450
Messenger
4551
---------
4652

‎UPGRADE-6.0.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ Lock
139139

140140
* Removed the`NotSupportedException`. It shouldn't be thrown anymore.
141141
* Removed the`RetryTillSaveStore`. Logic has been moved in`Lock` and is not needed anymore.
142+
* Removed usage of`PdoStore` with a`Doctrine\DBAL\Connection` or a DBAL url, use the new`DoctrineDbalStore` instead
143+
* Removed usage of`PostgreSqlStore` with a`Doctrine\DBAL\Connection` or a DBAL url, use the new`DoctrineDbalPostgreSqlStore` instead
142144

143145
Mailer
144146
------

‎src/Symfony/Component/Lock/CHANGELOG.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
CHANGELOG
22
=========
33

4+
5.4.0
5+
-----
6+
7+
* added`DoctrineDbalStore` identical to`PdoStore` for`Doctrine\DBAL\Connection` or DBAL url
8+
* deprecated usage of`PdoStore` with`Doctrine\DBAL\Connection` or DBAL url
9+
* added`DoctrineDbalPostgreSqlStore` identical to`PdoPostgreSqlStore` for`Doctrine\DBAL\Connection` or DBAL url
10+
* deprecated usage of`PdoPostgreSqlStore` with`Doctrine\DBAL\Connection` or DBAL url
11+
412
5.2.0
513
-----
614

‎src/Symfony/Component/Lock/Store/DoctrineDbalPostgreSqlStore.php‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,26 +34,26 @@ class DoctrineDbalPostgreSqlStore implements BlockingSharedLockStoreInterface, B
3434

3535
/**
3636
* You can either pass an existing database connection a Doctrine DBAL Connection
37-
* or aDSN string that will be used to connect to the database.
37+
* or aURL that will be used to connect to the database.
3838
*
39-
* @param Connection|string $connOrDsn A Connection instance orDSN string
39+
* @param Connection|string $connOrUrl A Connection instance orDoctrine URL
4040
*
4141
* @throws InvalidArgumentException When first argument is not Connection nor string
4242
*/
43-
publicfunction__construct($connOrDsn)
43+
publicfunction__construct($connOrUrl)
4444
{
45-
if ($connOrDsninstanceof Connection) {
46-
if (!$connOrDsn->getDatabasePlatform()instanceof PostgreSQLPlatform) {
47-
thrownewInvalidArgumentException(sprintf('The adapter "%s" does not support the "%s" platform.',__CLASS__,\get_class($connOrDsn->getDatabasePlatform())));
45+
if ($connOrUrlinstanceof Connection) {
46+
if (!$connOrUrl->getDatabasePlatform()instanceof PostgreSQLPlatform) {
47+
thrownewInvalidArgumentException(sprintf('The adapter "%s" does not support the "%s" platform.',__CLASS__,\get_class($connOrUrl->getDatabasePlatform())));
4848
}
49-
$this->conn =$connOrDsn;
50-
}elseif (\is_string($connOrDsn)) {
49+
$this->conn =$connOrUrl;
50+
}elseif (\is_string($connOrUrl)) {
5151
if (!class_exists(DriverManager::class)) {
52-
thrownewInvalidArgumentException(sprintf('Failed to parse the DSN "%s". Try running "composer require doctrine/dbal".',$connOrDsn));
52+
thrownewInvalidArgumentException(sprintf('Failed to parse the DSN "%s". Try running "composer require doctrine/dbal".',$connOrUrl));
5353
}
54-
$this->conn = DriverManager::getConnection(['url' =>$this->filterDsn($connOrDsn)]);
54+
$this->conn = DriverManager::getConnection(['url' =>$this->filterDsn($connOrUrl)]);
5555
}else {
56-
thrownew \TypeError(sprintf('Argument 1 passed to "%s()" must be "%s" or string, "%s" given.', Connection::class,__METHOD__,get_debug_type($connOrDsn)));
56+
thrownew \TypeError(sprintf('Argument 1 passed to "%s()" must be "%s" or string, "%s" given.', Connection::class,__METHOD__,get_debug_type($connOrUrl)));
5757
}
5858
}
5959

‎src/Symfony/Component/Lock/Store/DoctrineDbalStore.php‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,27 +50,27 @@ class DoctrineDbalStore implements PersistingStoreInterface
5050
* * db_token_col: The column where to store the lock token [default: key_token]
5151
* * db_expiration_col: The column where to store the expiration [default: key_expiration].
5252
*
53-
* @param Connection|string $connOrDsn A DBAL Connection instance or DoctrineDSN string
53+
* @param Connection|string $connOrUrl A DBAL Connection instance or DoctrineURL
5454
* @param array $options An associative array of options
5555
* @param float $gcProbability Probability expressed as floating number between 0 and 1 to clean old locks
5656
* @param int $initialTtl The expiration delay of locks in seconds
5757
*
5858
* @throws InvalidArgumentException When namespace contains invalid characters
5959
* @throws InvalidArgumentException When the initial ttl is not valid
6060
*/
61-
publicfunction__construct($connOrDsn,array$options = [],float$gcProbability =0.01,int$initialTtl =300)
61+
publicfunction__construct($connOrUrl,array$options = [],float$gcProbability =0.01,int$initialTtl =300)
6262
{
6363
$this->init($options,$gcProbability,$initialTtl);
6464

65-
if ($connOrDsninstanceof Connection) {
66-
$this->conn =$connOrDsn;
67-
}elseif (\is_string($connOrDsn)) {
65+
if ($connOrUrlinstanceof Connection) {
66+
$this->conn =$connOrUrl;
67+
}elseif (\is_string($connOrUrl)) {
6868
if (!class_exists(DriverManager::class)) {
69-
thrownewInvalidArgumentException(sprintf('Failed to parse the DSN "%s". Try running "composer require doctrine/dbal".',$connOrDsn));
69+
thrownewInvalidArgumentException(sprintf('Failed to parse the DSN "%s". Try running "composer require doctrine/dbal".',$connOrUrl));
7070
}
71-
$this->conn = DriverManager::getConnection(['url' =>$connOrDsn]);
71+
$this->conn = DriverManager::getConnection(['url' =>$connOrUrl]);
7272
}else {
73-
thrownew \TypeError(sprintf('Argument 1 passed to "%s()" must be "%s" or string, "%s" given.', Connection::class,__METHOD__,get_debug_type($connOrDsn)));
73+
thrownew \TypeError(sprintf('Argument 1 passed to "%s()" must be "%s" or string, "%s" given.', Connection::class,__METHOD__,get_debug_type($connOrUrl)));
7474
}
7575
}
7676

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp