Skip to content

WIP: Using SplFileObject::getSize instead of UploadedFile::getClientSize #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from

Conversation

adapik
Copy link

@adapik adapik commented May 31, 2018

solves #41

@weaverryan
Copy link
Member

Hey! We need to make sure that the getSize() method exists - it has not always be there (not sure what version of Symfony it was added). I think we should call it if it exists, else fall back to the current method.

@adapik
Copy link
Author

adapik commented May 31, 2018

@weaverryan It's inherited from \SplFileInfo, exists in PHP since PHP 5.1.2

@adapik adapik changed the title Using SplFileObject::getSize instead of UploadedFile::getClientSize WIP: Using SplFileObject::getSize instead of UploadedFile::getClientSize May 31, 2018
@fabpot
Copy link
Member

fabpot commented Jun 1, 2018

Tests are apparently broken.

Added php 7.1 7.2 to travis
.travis.yml Outdated
@@ -20,6 +20,8 @@ matrix:
- php: 5.6
env: COMPOSER_OPTIONS="" SYMFONY_DEPRECATIONS_HELPER=weak
- php: 7.0
- php: 7.1
- php: 7.2
- php: hhvm
allow_failures:
- php: hhvm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove HHVM, as we don't support it anymore anyway?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, i'll remove it

@adapik
Copy link
Author

adapik commented Jun 1, 2018

I have fixed failing tests. Some deprecation notices remaining:
Passing a size as 4th argument to the constructor of "Symfony\Component\HttpFoundation\File\UploadedFile" is deprecated since Symfony 4.1: 8x in HttpFoundationFactory::createUploadedFile and tests.

Should we fix it too in this PR? Any ideas how to support 2 versions of UploadedFile:__construct()?

@Nyholm
Copy link
Member

Nyholm commented Aug 6, 2018

This also is fixed in #45

@Nyholm
Copy link
Member

Nyholm commented Aug 8, 2018

This is can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants