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
-------
33fddce0fb
clean up remaining deprecations
This commit is contained in:
commit
47860981e8
@ -116,9 +116,6 @@ class PhpFilesAdapter extends AbstractAdapter implements PruneableInterface
|
|||||||
$values[$id] = null;
|
$values[$id] = null;
|
||||||
} elseif (!\is_object($value)) {
|
} elseif (!\is_object($value)) {
|
||||||
$values[$id] = $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) {
|
} elseif (false === $values[$id] = include $value->file) {
|
||||||
unset($values[$id], $this->values[$id]);
|
unset($values[$id], $this->values[$id]);
|
||||||
$missingIds[] = $id;
|
$missingIds[] = $id;
|
||||||
|
@ -600,10 +600,6 @@ class Filesystem
|
|||||||
*/
|
*/
|
||||||
public function isAbsolutePath($file)
|
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)
|
return strspn($file, '/\\', 0, 1)
|
||||||
|| (\strlen($file) > 3 && ctype_alpha($file[0])
|
|| (\strlen($file) > 3 && ctype_alpha($file[0])
|
||||||
&& ':' === $file[1]
|
&& ':' === $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()
|
public function testTempnam()
|
||||||
{
|
{
|
||||||
$dirname = $this->workspace;
|
$dirname = $this->workspace;
|
||||||
|
@ -820,10 +820,6 @@ class PropertyAccessor implements PropertyAccessorInterface
|
|||||||
*/
|
*/
|
||||||
public static function createCache(string $namespace, int $defaultLifetime, string $version, LoggerInterface $logger = null)
|
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')) {
|
if (!class_exists('Symfony\Component\Cache\Adapter\ApcuAdapter')) {
|
||||||
throw new \LogicException(sprintf('The Symfony Cache component must be installed to use %s().', __METHOD__));
|
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)
|
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;
|
$this->code = $code;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
Reference in New Issue
Block a user