10000 Remove old version check · symfony/symfony@d817f98 · GitHub
[go: up one dir, main page]

Skip to content

Commit d817f98

Browse files
committed
Remove old version check
1 parent f41bdf1 commit d817f98

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

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

Lines 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

Lines 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

Lines 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< D28A div class="diff-text-inner">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