10000 Add some return types by nicolas-grekas · Pull Request #678 · predis/predis · GitHub
[go: up one dir, main page]

Skip to content

Add some return types #678

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
Feb 9, 2021
Merged

Add some return types #678

merged 1 commit into from
Feb 9, 2021

Conversation

nicolas-grekas
Copy link
Contributor

By making these return types explicit in the annotation, we preemptively tell consumers that some next major of Predis or PHP 9 might add real return types here.

These annotations are leveraged by Symfony's DebugClassLoader to help one spot some missing return types in their app. That's how I spotted these. They relate only to PHP internal's base types / magic methods.

@tillkruss
Copy link
Member

LGTM

nicolas-grekas added a commit to symfony/symfony that referenced this pull request Feb 4, 2021
…r (nicolas-grekas)

This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] fix parsing return types in DebugClassLoader

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

In 5.3, we might want to make `SYMFONY_PATCH_TYPE_DECLARATIONS=deprecations=1` the default, so that ppl know when they're missing some return types when they inherit some classes from vendors. This would fix https://github.com/orgs/symfony/projects/1#card-30856423

On 4.4, we have to disable this mode of reporting until these PRs are merged:
- twigphp/Twig#3481
- doctrine/collections#269
- predis/predis#678

Commits
-------

58e32b3 [ErrorHandler] fix parsing return types in DebugClassLoader
symfony-splitter pushed a commit to symfony/error-handler that referenced this pull request Feb 4, 2021
…r (nicolas-grekas)

This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] fix parsing return types in DebugClassLoader

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

In 5.3, we might want to make `SYMFONY_PATCH_TYPE_DECLARATIONS=deprecations=1` the default, so that ppl know when they're missing some return types when they inherit some classes from vendors. This would fix https://github.com/orgs/symfony/projects/1#card-30856423

On 4.4, we have to disable this mode of reporting until these PRs are merged:
- twigphp/Twig#3481
- doctrine/collections#269
- predis/predis#678

Commits
-------

58e32b3c2a [ErrorHandler] fix parsing return types in DebugClassLoader
@tillkruss tillkruss merged commit 3a14a39 into predis:v1.1 Feb 9, 2021
@nicolas-grekas nicolas-grekas deleted the ret-type branch February 10, 2021 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0