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

Appearance settings

Commit d817f98

Browse filesBrowse files
committed
Remove old version check
1 parent f41bdf1 commit d817f98
Copy full SHA for d817f98

File tree

3 files changed

+4
-15
lines changed
Filter options

3 files changed

+4
-15
lines changed

‎src/Symfony/Component/Console/Command/LockableTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Command/LockableTrait.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private function lock($name = null, $blocking = false)
4343
throw new LogicException('A lock is already in place.');
4444
}
4545

46-
if (SemaphoreStore::isSupported($blocking)) {
46+
if (SemaphoreStore::isSupported()) {
4747
$store = new SemaphoreStore();
4848
} else {
4949
$store = new FlockStore(sys_get_temp_dir());

‎src/Symfony/Component/Console/Tests/Command/LockableTraitTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Command/LockableTraitTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testLockReturnsFalseIfAlreadyLockedByAnotherCommand()
4141
{
4242
$command = new \FooLockCommand();
4343

44-
if (SemaphoreStore::isSupported(false)) {
44+
if (SemaphoreStore::isSupported()) {
4545
$store = new SemaphoreStore();
4646
} else {
4747
$store = new FlockStore(sys_get_temp_dir());

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Store/SemaphoreStore.php
+2-13Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Symfony\Component\Lock\Exception\InvalidArgumentException;
1515
use Symfony\Component\Lock\Exception\LockConflictedException;
16-
use Symfony\Component\Lock\Exception\NotSupportedException;
1716
use Symfony\Component\Lock\Key;
1817
use Symfony\Component\Lock\StoreInterface;
1918

@@ -27,21 +26,11 @@ class SemaphoreStore implements StoreInterface
2726
/**
2827
* Returns whether or not the store is supported.
2928
*
30-
* @param bool|null $blocking When not null, checked again the blocking mode.
31-
*
3229
* @return bool
3330
*/
34-
public static function isSupported($blocking = null)
31+
public static function isSupported()
3532
{
36-
if (!extension_loaded('sysvsem')) {
37-
return false;
38-
}
39-
40-
if ($blocking === false && \PHP_VERSION_ID < 50601) {
41-
return false;
42-
}
43-
44-
return true;
33+
return extension_loaded('sysvsem');
4534
}
4635

4736
public function __construct()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.