clean up remaining deprecations
This commit is contained in:
parent
22437d41bd
commit
33fddce0fb
@ -116,9 +116,6 @@ class PhpFilesAdapter extends AbstractAdapter implements PruneableInterface
|
||||
$values[$id] = null;
|
||||
} elseif (!\is_object($value)) {
|
||||
$values[$id] = $value;
|
||||
} elseif (!$value instanceof LazyValue) {
|
||||
// calling a Closure is for @deprecated BC and should be removed in Symfony 5.0
|
||||
$values[$id] = $value();
|
||||
} elseif (false === $values[$id] = include $value->file) {
|
||||
unset($values[$id], $this->values[$id]);
|
||||
$missingIds[] = $id;
|
||||
|
@ -600,10 +600,6 @@ class Filesystem
|
||||
*/
|
||||
public function isAbsolutePath($file)
|
||||
{
|
||||
if (null === $file) {
|
||||
@trigger_error(sprintf('Calling "%s()" with a null in the $file argument is deprecated since Symfony 4.4.', __METHOD__), E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
return strspn($file, '/\\', 0, 1)
|
||||
|| (\strlen($file) > 3 && ctype_alpha($file[0])
|
||||
&& ':' === $file[1]
|
||||
|
@ -1400,15 +1400,6 @@ class FilesystemTest extends FilesystemTestCase
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @group legacy
|
||||
* @expectedDeprecation Calling "Symfony\Component\Filesystem\Filesystem::isAbsolutePath()" with a null in the $file argument is deprecated since Symfony 4.4.
|
||||
*/
|
||||
public function testIsAbsolutePathWithNull()
|
||||
{
|
||||
$this->assertFalse($this->filesystem->isAbsolutePath(null));
|
||||
}
|
||||
|
||||
public function testTempnam()
|
||||
{
|
||||
$dirname = $this->workspace;
|
||||
|
@ -820,10 +820,6 @@ class PropertyAccessor implements PropertyAccessorInterface
|
||||
*/
|
||||
public static function createCache(string $namespace, int $defaultLifetime, string $version, LoggerInterface $logger = null)
|
||||
{
|
||||
if (null === $defaultLifetime) {
|
||||
@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);
|
||||
}
|
||||
|
||||
if (!class_exists('Symfony\Component\Cache\Adapter\ApcuAdapter')) {
|
||||
throw new \LogicException(sprintf('The Symfony Cache component must be installed to use %s().', __METHOD__));
|
||||
}
|
||||
|
@ -121,10 +121,6 @@ class ConstraintViolationBuilder implements ConstraintViolationBuilderInterface
|
||||
*/
|
||||
public function setCode(?string $code)
|
||||
{
|
||||
if (null !== $code && !\is_string($code)) {
|
||||
@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);
|
||||
}
|
||||
|
||||
$this->code = $code;
|
||||
|
||||
return $this;
|
||||
|
Reference in New Issue
Block a user