Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4786098

Browse files
committed
minor #32393 clean up remaining deprecations (xabbuh)
This PR was merged into the 5.0-dev branch. Discussion ---------- clean up remaining deprecations | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 33fddce clean up remaining deprecations
2 parents 22437d4 + 33fddce commit 4786098

File tree

5 files changed

+0
-24
lines changed

5 files changed

+0
-24
lines changed

src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,6 @@ protected function doFetch(array $ids)
116116
$values[$id] = null;
117117
} elseif (!\is_object($value)) {
118118
$values[$id] = $value;
119-
} elseif (!$value instanceof LazyValue) {
120-
// calling a Closure is for @deprecated BC and should be removed in Symfony 5.0
121-
$values[$id] = $value();
122119
} elseif (false === $values[$id] = include $value->file) {
123120
unset($values[$id], $this->values[$id]);
124121
$missingIds[] = $id;

src/Symfony/Component/Filesystem/Filesystem.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -600,10 +600,6 @@ public function mirror($originDir, $targetDir, \Traversable $iterator = null, $o
600600
*/
601601
public function isAbsolutePath($file)
602602
{
603-
if (null === $file) {
604-
@trigger_error(sprintf('Calling "%s()" with a null in the $file argument is deprecated since Symfony 4.4.', __METHOD__), E_USER_DEPRECATED);
605-
}
606-
607603
return strspn($file, '/\\', 0, 1)
608604
|| (\strlen($file) > 3 && ctype_alpha($file[0])
609605
&& ':' === $file[1]

src/Symfony/Component/Filesystem/Tests/FilesystemTest.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,15 +1400,6 @@ public function providePathsForIsAbsolutePath()
14001400
];
14011401
}
14021402

1403-
/**
1404-
* @group legacy
1405-
* @expectedDeprecation Calling "Symfony\Component\Filesystem\Filesystem::isAbsolutePath()" with a null in the $file argument is deprecated since Symfony 4.4.
1406-
*/
1407-
public function testIsAbsolutePathWithNull()
1408-
{
1409-
$this->assertFalse($this->filesystem->isAbsolutePath(null));
1410-
}
1411-
14121403
public function testTempnam()
14131404
{
14141405
$dirname = $this->workspace;

src/Symfony/Component/PropertyAccess/PropertyAccessor.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -820,10 +820,6 @@ private function getPropertyPath($propertyPath): PropertyPath
820820
*/
821821
public static function createCache(string $namespace, int $defaultLifetime, string $version, LoggerInterface $logger = null)
822822
{
823-
if (null === $defaultLifetime) {
824-
@trigger_error(sprintf('Passing null as "$defaultLifetime" 2nd argument of the "%s()" method is deprecated since Symfony 4.4, pass 0 instead.', __METHOD__), E_USER_DEPRECATED);
825-
}
826-
827823
if (!class_exists('Symfony\Component\Cache\Adapter\ApcuAdapter')) {
828824
throw new \LogicException(sprintf('The Symfony Cache component must be installed to use %s().', __METHOD__));
829825
}

src/Symfony/Component/Validator/Violation/ConstraintViolationBuilder.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,6 @@ public function setPlural(int $number)
121121
*/
122122
public function setCode(?string $code)
123123
{
124-
if (null !== $code && !\is_string($code)) {
125-
@trigger_error(sprintf('Not using a string as the error code in %s() is deprecated since Symfony 4.4. A type-hint will be added in 5.0.', __METHOD__), E_USER_DEPRECATED);
126-
}
127-
128124
$this->code = $code;
129125

130126
return $this;

0 commit comments

Comments
 (0)