File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,10 @@ composer require cybercog/php-db-locker
3232``` php
3333$dbConnection = new PDO($dsn, $username, $password);
3434
35- $postgresLocker = new PostgresAdvisoryLocker();
36- $postgresLockId = PostgresLockId::fromLockId(new LockId('user', '4'));
35+ $postgresLocker = new \Cog\DbLocker\Locker\PostgresAdvisoryLocker();
36+ $postgresLockId = \Cog\DbLocker\LockId\PostgresLockId::fromLockId(
37+ new LockId('user', '4'),
38+ );
3739
3840$dbConnection->beginTransaction();
3941$isLockAcquired = $postgresLocker->acquireLockWithinTransaction($dbConnection, $postgresLockId);
@@ -50,8 +52,10 @@ $dbConnection->commit();
5052``` php
5153$dbConnection = new PDO($dsn, $username, $password);
5254
53- $postgresLocker = new PostgresAdvisoryLocker();
54- $postgresLockId = PostgresLockId::fromLockId(new LockId('user', '4'));
55+ $postgresLocker = new \Cog\DbLocker\Locker\PostgresAdvisoryLocker();
56+ $postgresLockId = \Cog\DbLocker\LockId\PostgresLockId::fromLockId(
57+ new LockId('user', '4'),
58+ );
5559
5660$isLockAcquired = $postgresLocker->acquireLock($dbConnection, $postgresLockId);
5761if ($isLockAcquired) {
You can’t perform that action at this time.
0 commit comments