Skip to content

[5.0] Add return types on internal|final|private methods #33259

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

Merged
merged 1 commit into from
Aug 20, 2019

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #33228 #33236
License MIT
Doc PR -

I think some changes here can be backported to 4.4
Also, this fails with e.g. Return value of Symfony\Component\Serializer\Normalizer\ArrayDenormalizer::denormalize() must be an object, array returned
Which means we need to update DenormalizerInterface::denormalize() with @return object|array in 3.4.

@nicolas-grekas nicolas-grekas added this to the 5.0 milestone Aug 20, 2019
@nicolas-grekas nicolas-grekas force-pushed the return-50 branch 2 times, most recently from c4c24b8 to cfe03c0 Compare August 20, 2019 20:43
nicolas-grekas added a commit that referenced this pull request Aug 20, 2019
This PR was merged into the 3.4 branch.

Discussion
----------

More docblock fixes

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Found while working on #33259

Commits
-------

9b78d53 More docblock fixes
nicolas-grekas added a commit that referenced this pull request Aug 20, 2019
… (bis) (nicolas-grekas)

This PR was merged into the 4.4 branch.

Discussion
----------

[4.4] Add return types on internal|final|private methods (bis)

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Found while working on #33259

`: self` is used for final methods only. I'd have preferred using `: object` but that's not possible on PHP 7.1

Commits
-------

23faee4 [4.4] Add return types on internal|final|private methods (bis)
nicolas-grekas added a commit that referenced this pull request Aug 20, 2019
… (nicolas-grekas)

This PR was merged into the 5.0-dev branch.

Discussion
----------

[5.0] Add return types on internal|final|private methods

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #33228 #33236
| License       | MIT
| Doc PR        | -

I think some changes here can be backported to 4.4
Also, this fails with e.g. `Return value of Symfony\Component\Serializer\Normalizer\ArrayDenormalizer::denormalize() must be an object, array returned`
Which means we need to update `DenormalizerInterface::denormalize()` with `@return object|array` in 3.4.

Commits
-------

6f303b4 [5.0] Add return types on internal|final|private methods
@nicolas-grekas nicolas-grekas merged commit 6f303b4 into symfony:master Aug 20, 2019
@nicolas-grekas nicolas-grekas deleted the return-50 branch August 20, 2019 21:49
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.

2 participants