@@ -507,11 +507,11 @@ The DoctrineDbalStore saves locks in an SQL database. It is identical to PdoStor
507507but requires a `Doctrine DBAL Connection `_, or a `Doctrine DBAL URL `_. This store
508508does not support blocking, and expects a TTL to avoid stalled locks::
509509
510- use Symfony\Component\Lock\Store\PdoStore ;
510+ use Symfony\Component\Lock\Store\DoctrineDbalStore ;
511511
512- // a PDO, a Doctrine DBAL connection or DSN for lazy connecting through PDO
512+ // a Doctrine DBAL connection or DSN
513513 $connectionOrURL = 'mysql://myuser:mypassword@127.0.0.1/app';
514- $store = new PdoStore ($connectionOrURL);
514+ $store = new DoctrineDbalStore ($connectionOrURL);
515515
516516.. note ::
517517
@@ -566,11 +566,11 @@ The DoctrineDbalPostgreSqlStore uses `Advisory Locks`_ provided by PostgreSQL.
566566It is identical to PostgreSqlStore but requires a `Doctrine DBAL Connection `_ or
567567a `Doctrine DBAL URL `_. It supports native blocking, as well as sharing locks::
568568
569- use Symfony\Component\Lock\Store\PostgreSqlStore ;
569+ use Symfony\Component\Lock\Store\DoctrineDbalPostgreSqlStore ;
570570
571- // a PDO instance or DSN for lazy connecting through PDO
572- $databaseConnectionOrDSN = 'pgsql:host=localhost;port= 5634;dbname= lock';
573- $store = new PostgreSqlStore ($databaseConnectionOrDSN, ['db_username' => 'myuser', 'db_password' => 'mypassword'] );
571+ // a Doctrine Connection or DSN
572+ $databaseConnectionOrDSN = 'postgresql+advisory://myuser:mypassword@127.0.0.1: 5634/ lock';
573+ $store = new DoctrineDbalPostgreSqlStore ($databaseConnectionOrDSN);
574574
575575In opposite to the ``DoctrineDbalStore ``, the ``DoctrineDbalPostgreSqlStore `` does not need a table to
576576store locks and does not expire.
0 commit comments