fixed some deprecation messages

This commit is contained in:
Fabien Potencier 2018-01-03 08:40:15 +01:00
parent 3a7579d4b1
commit f4b56b3038
2 changed files with 3 additions and 3 deletions

View File

@ -61,7 +61,7 @@ class UploadedFile extends File
$this->mimeType = $mimeType ?: 'application/octet-stream';
$this->size = $size;
if (null !== $size) {
@trigger_error('Passing a size in the constructor is deprecated since 4.1 and will be removed in 5.0. Use getSize() instead.', E_USER_DEPRECATED);
@trigger_error('Passing a size in the constructor is deprecated since Symfony 4.1 and will be removed in 5.0. Use getSize() instead.', E_USER_DEPRECATED);
}
$this->error = $error ?: UPLOAD_ERR_OK;
$this->test = $test;
@ -150,7 +150,7 @@ class UploadedFile extends File
*/
public function getClientSize()
{
@trigger_error(sprintf('"%s" is deprecated since 4.1 and will be removed in 5.0. Use getSize() instead.', __METHOD__), E_USER_DEPRECATED);
@trigger_error(sprintf('"%s" is deprecated since Symfony 4.1 and will be removed in 5.0. Use getSize() instead.', __METHOD__), E_USER_DEPRECATED);
return $this->size;
}

View File

@ -208,7 +208,7 @@ class UploadedFileTest extends TestCase
/**
* @group legacy
* @expectedDeprecation Passing a size in the constructor is deprecated since 4.1 and will be removed in 5.0. Use getSize() instead.
* @expectedDeprecation Passing a size in the constructor is deprecated since Symfony 4.1 and will be removed in 5.0. Use getSize() instead.
*/
public function testConstructDeprecatedSize()
{