8000 Relax type declaration by greg0ire · Pull Request #375 · doctrine/persistence · GitHub
[go: up one dir, main page]

Skip to content

Relax type declaration #375

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
Jun 19, 2024
Merged

Relax type declaration #375

merged 1 commit into from
Jun 19, 2024

Conversation

greg0ire
Copy link
Member
@greg0ire greg0ire commented Jun 19, 2024

getService() does not always return ObjectManager instances

getService() does not always return ObjectManager instances
@greg0ire greg0ire added the Bug Something isn't working label Jun 19, 2024
@greg0ire greg0ire added this to the 3.3.3 milestone Jun 19, 2024
@greg0ire greg0ire merged commit 53c572a into doctrine:3.3.x Jun 19, 2024
14 checks passed
@greg0ire greg0ire deleted the fix-types-amr branch June 19, 2024 20:38
@MatTheCat
Copy link

Looks like these assertions make some tests fail on Symfony’s workflows (https://github.com/symfony/symfony/actions/runs/9599668041/job/26473995866?pr=57467#step:7:2678 e.g.).

@greg0ire
Copy link
Member Author

@MatTheCat probably some too naive mocking is involved. This has to be fixed on Symfony's end IMO.

@MatTheCat
Copy link
MatTheCat commented Jun 21, 2024

@greg0ire you were right, thanks 😁

xabbuh added a commit to symfony/symfony that referenced this pull request Jun 21, 2024
This PR was merged into the 5.4 branch.

Discussion
----------

[DoctrineBridge] Test reset with a true manager

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

Now that [assertions were added to the `AbstractManagerRegistry`](doctrine/persistence#375), the `ManagerRegistryTest` must register instances of `ObjectManager` to avoid tests failing with
```
assert(): assert($service instanceof ObjectManager) failed
```

Changes mostly come from #48484 but the ProxyManager is still used on 5.4, so beware when merging this in 6.4.

Commits
-------

79b03db [DoctrineBridge] Test reset with a true manager
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0