Skip to content
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

Fluent methods in QueryBuilder are now documented as returning $this #2384

Merged
merged 1 commit into from
May 26, 2016

Conversation

Deltachaos
Copy link
Contributor

@Deltachaos Deltachaos commented May 10, 2016

According to the discussion in #2349 i would rather suggest to document the return type for the fluent interfaces methods with $this.
phpDocumentor recommends $this to be used for refer "This exact object instance, usually used to denote a fluent interface." instead of self "An object of the class where this type was used, if inherited it will still represent the class where it was originally defined.".

@deeky666 deeky666 merged commit 67ddb9b into doctrine:master May 26, 2016
@deeky666
Copy link
Member

Trivial. I don't care.... Thanks anyways!

@deeky666 deeky666 added this to the 2.5.5 milestone May 26, 2016
@deeky666 deeky666 self-assigned this May 26, 2016
@Deltachaos
Copy link
Contributor Author

@deeky666 thanks for merging!

@morozov
Copy link
Member

morozov commented Jun 15, 2017

@Ocramius is there a chance this gets backported into 2.5? Code analysis tools like phpstan/phpstan or vimeo/psalm complain about the code which extends the query builder and then expects the extended version.

@Ocramius
Copy link
Member

Ocramius commented Jun 15, 2017 via email

morozov added a commit that referenced this pull request Jun 15, 2017
…ented-as-returning-this' into 2.5

Backport #2384 to 2.5.x
@morozov
Copy link
Member

morozov commented Jun 15, 2017

Backported to 2.5 via 757a007

@Ocramius
Copy link
Member

@morozov thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants