Skip to content

Commit

Permalink
Do not use deprecated "Factory"
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloKowalczyk committed Oct 27, 2022
1 parent c3bd22d commit e40c7aa
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class Event implements PingableInterface
* The symfony lock factory that is used to acquire locks. If the value is null, but preventOverlapping = true
* crunz falls back to filesystem locks.
*
* @var Factory|LockFactory|null
* @var LockFactory|null
*/
private $lockFactory;
/** @var string[] */
Expand Down Expand Up @@ -731,10 +731,7 @@ public function preventOverlapping(object $store = null)

$lockStore = $store ?: $this->createDefaultLockStore();
$this->preventOverlapping = true;
$this->lockFactory = \class_exists(Factory::class)
? new Factory($lockStore)
: new LockFactory($lockStore)
;
$this->lockFactory = new LockFactory($lockStore);

// Skip the event if it's locked (processing)
$this->skip(function () {
Expand Down

0 comments on commit e40c7aa

Please sign in to comment.