File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,8 @@ public function isLockProviderAvailable(): bool {
2626
2727 public function runInScope (LockScope $ lock , callable $ callback ): void {
2828 if (!$ this ->lockProvider ) {
29- throw new PreConditionNotMetException ('No lock provider available ' );
29+ $ callback ();
30+ return ;
3031 }
3132
3233 if ($ this ->lockInScope ) {
Original file line number Diff line number Diff line change @@ -22,7 +22,10 @@ public function registerLockProvider(ILockProvider $lockProvider): void;
2222 public function isLockProviderAvailable (): bool ;
2323
2424 /**
25- * @throws NoLockProviderException if there is no lock provider available
25+ * Run within the scope of a given lock condition
26+ *
27+ * The callback will also be executed if no lock provider is present
28+ *
2629 * @since 24.0.0
2730 */
2831 public function runInScope (LockScope $ lock , callable $ callback ): void ;
You can’t perform that action at this time.
0 commit comments