Skip to content

Conversation

lyrixx
Copy link
Member

@lyrixx lyrixx commented Jul 2, 2020

Q A
Branch? master
Bug fix? no
New feature? yes
Deprecations? no
Tickets
License MIT
Doc PR

This is a very simple PR but I think it increases the DX when working
with uploaded files: I looked at for this method and I did not found it.
So I had to check witch method returns the "pathname" or to remember I
can cast the object to string to get its pathname.

It's a small detail, but IMHO it's better with it.

About file_get_contents vs stream: let's be simple here. If one want a
stream, they can use the code they always used for it :)

@lyrixx
Copy link
Member Author

lyrixx commented Jul 3, 2020

So, what should I do?

  • getContent() => consistant with Symfony => 🎉
  • getContents() => consistant with PHP => 🚀

@nicolas-grekas nicolas-grekas added this to the next milestone Jul 3, 2020
@lyrixx lyrixx force-pushed the uploaded-file-content branch from 331f7cc to 50d5167 Compare July 7, 2020 11:53
@lyrixx
Copy link
Member Author

lyrixx commented Jul 7, 2020

OK, it looks like everyone prefer to have consistency with Symfony.
The PR is ready

@fabpot
Copy link
Member

fabpot commented Jul 15, 2020

Thank you @lyrixx.

@fabpot fabpot merged commit a4550da into symfony:master Jul 15, 2020
@lyrixx lyrixx deleted the uploaded-file-content branch July 16, 2020 07:29
@nicolas-grekas nicolas-grekas modified the milestones: next, 5.2 Oct 5, 2020
@fabpot fabpot mentioned this pull request Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants