Skip to content

Add return types - batch 5/n #42509

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 13, 2021
Merged

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 6.0
Bug fix? no
New feature? yes
Deprecations? no
Tickets #40154
License MIT
Doc PR -

Extracted from #42496

Not all possible return types are patched for the attached components, to save breaking BC cross-components, for now at least.

@nicolas-grekas
Copy link
Member Author

I would greatly appreciate any help on this one to fix the failing test cases.

@nicolas-grekas
Copy link
Member Author

Problematic part moved to #42512

@nicolas-grekas nicolas-grekas merged commit 5d6d160 into symfony:6.0 Aug 13, 2021
@nicolas-grekas nicolas-grekas deleted the return-types-5 branch August 13, 2021 09:42
derrabus added a commit that referenced this pull request Jul 4, 2024
This PR was merged into the 7.2 branch.

Discussion
----------

[Routing] Remove dead `is_object()` check

| Q             | A
| ------------- | ---
| Branch?       | 7.2
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        | N/A
| License       | MIT

Right after we call `ObjectLoader::getObject()`, we check if the returned value is actually an object. Since 6.0 (#42509), that method has a native return type of `object`, so we can be pretty sure that we won't ever not hold an object in our hands here.

Commits
-------

f734932 [Router] Remove dead is_object() check
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