Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpFoundation] Incorrect documentation and method name for UploadedFile::getClientSize()#25324

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@Simperfit
Copy link
Contributor

@SimperfitSimperfit commentedDec 5, 2017
edited
Loading

QA
Branch?4.1
Bug fix?no
New feature?no
BC breaks?no
Deprecations?yes
Tests pass?yes
Fixed tickets#23791
LicenseMIT
Doc PRnone

Replace the wrong named and documented method by another with better doc and better naming

@SimperfitSimperfit changed the title[HttpFoundation] Incorrect documentation and method name for Uploaded…[HttpFoundation] Incorrect documentation and method name for UploadedFile::getClientSize()Dec 5, 2017
@SimperfitSimperfitforce-pushed thebugfix/incorrect-documentation-and-method-namefor-uploadedfile-get-client-size branch 2 times, most recently from50794b6 todf51428CompareDecember 5, 2017 06:50
@nicolas-grekasnicolas-grekas added this to the4.1 milestoneDec 5, 2017
Copy link
Contributor

@ro0NLro0NL left a comment
edited
Loading

Choose a reason for hiding this comment

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

reasonable 👍

where's the picture/photo? 🤔

*/
publicfunctiongetClientSize()
{
@trigger_error(sprintf('%s is deprecated since 4.1 and will be removed in 5.0 use %s::%s.',__METHOD__,__CLASS__,'getSize'),E_USER_DEPRECATED);
Copy link
Contributor

Choose a reason for hiding this comment

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

"%s" ... 5.0. Use getFileSize() instead.

*
* @return int|null The file size
*/
publicfunctiongetFileSize()
Copy link
Contributor

Choose a reason for hiding this comment

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

getClientSize becomesgetSize?

Copy link
Contributor

Choose a reason for hiding this comment

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

which you are actually suggesting above :)

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

It's not the same thing I guess,getSize already exists.

Copy link
Contributor

@ro0NLro0NLDec 5, 2017
edited
Loading

Choose a reason for hiding this comment

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

Right, my bad.\SplFileInfo::getSize — Gets file size.

So what dowe suggest here? Another file size? Or should we override getSize to avoid re-calculating / forward if $size is null.

getUploadedSize maybe? Would it make sense?

@SimperfitSimperfitforce-pushed thebugfix/incorrect-documentation-and-method-namefor-uploadedfile-get-client-size branch fromdf51428 toeb469dcCompareDecember 5, 2017 17:17
@Simperfit
Copy link
ContributorAuthor

@ro0NL There are no picture on this one because i've pushed 2 PR this morning and didn't take the time to take one picture for this one ^^'.

ro0NL and sstok reacted with laugh emoji

*/
publicfunctiongetClientSize()
{
@trigger_error(sprintf('%s is deprecated since 4.1 and will be removed in 5.0 use %s instead.',__METHOD__,'getFileSize'),E_USER_DEPRECATED);
Copy link
Contributor

@ro0NLro0NLDec 5, 2017
edited
Loading

Choose a reason for hiding this comment

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

We really want the first%s to be quoted i guess for HTML purpose (e.g. make it bold in the profiler log panel).

Also i suggested to start a new sentence as of5.0. Use ... instead (no real reason to use a sprintf placeholder here also).

Sorry :) just following 3.x convention AFAIK.

Simperfit reacted with thumbs up emoji
@SimperfitSimperfitforce-pushed thebugfix/incorrect-documentation-and-method-namefor-uploadedfile-get-client-size branch 5 times, most recently from157f01a tof5a8168CompareDecember 9, 2017 08:21
$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);
Copy link
Member

Choose a reason for hiding this comment

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

"getSize()"

*/
publicfunctiongetClientSize()
{
@trigger_error(sprintf('"%s" is deprecated since 4.1 and will be removed in 5.0. Use getSize instead.',__METHOD__),E_USER_DEPRECATED);
Copy link
Member

Choose a reason for hiding this comment

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

same here

@SimperfitSimperfitforce-pushed thebugfix/incorrect-documentation-and-method-namefor-uploadedfile-get-client-size branch fromf5a8168 toa8e4d7aCompareDecember 11, 2017 21:58
@SimperfitSimperfitforce-pushed thebugfix/incorrect-documentation-and-method-namefor-uploadedfile-get-client-size branch froma8e4d7a tob136320CompareDecember 11, 2017 21:58
@Simperfit
Copy link
ContributorAuthor

The PR has been fixed from review and rebased with current master.

@fabpot
Copy link
Member

Thank you@Simperfit.

@fabpotfabpot merged commitb136320 intosymfony:masterDec 11, 2017
fabpot added a commit that referenced this pull requestDec 11, 2017
…me for UploadedFile::getClientSize() (Simperfit)This PR was merged into the 4.1-dev branch.Discussion----------[HttpFoundation] Incorrect documentation and method name for UploadedFile::getClientSize()| Q             | A| ------------- | ---| Branch?       | 4.1| Bug fix?      | no| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->| BC breaks?    | no| Deprecations? | yes <!-- don't forget to update UPGRADE-*.md files -->| Tests pass?   | yes| Fixed tickets |#23791| License       | MIT| Doc PR        | noneReplace the wrong named and documented method by another with better doc and better namingCommits-------b136320 [HttpFoundation] Incorrect documentation and method name for UploadedFile::getClientSize()
@SimperfitSimperfit deleted the bugfix/incorrect-documentation-and-method-namefor-uploadedfile-get-client-size branchDecember 11, 2017 22:11
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

+1 more reviewer

@ro0NLro0NLro0NL left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.1

Development

Successfully merging this pull request may close these issues.

5 participants

@Simperfit@fabpot@ro0NL@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp