fixed some deprecation messages
This commit is contained in:
parent
3a7579d4b1
commit
f4b56b3038
@ -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;
|
||||
}
|
||||
|
@ -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()
|
||||
{
|
||||
|
Reference in New Issue
Block a user