You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug symfony#50761 [DoctrineBridge] Ignore invalid stores in LockStoreSchemaListener raised by StoreFactory (alexandre-daubois)
This PR was merged into the 6.3 branch.
Discussion
----------
[DoctrineBridge] Ignore invalid stores in `LockStoreSchemaListener` raised by `StoreFactory`
| Q | A
| ------------- | ---
| Branch? | 6.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | _NA_
| License | MIT
| Doc PR | _NA_
In our test environment, we're setting our `LOCK_DSN` env var at `null`. This works well in 6.2 but not in 6.3 anymore.
The version 6.3 of DoctrineBridge is bringing this BC break. Indeed, lock stores are being injected in `Symfony\Bridge\Doctrine\SchemaListener\LockStoreSchemaListener`. At runtime, the `StoreFactory` is used to instantiate stores when they are needed in `postGenerateSchema`.
Unfortunately, our `LOCK_DSN=null` doesn't match any case in `StoreFactory`, which has the effect to throw `Symfony\Component\Lock\Exception\InvalidArgumentException`, which is not catched in `LockStoreSchemaListener`.
This PR takes care of this: at this time, `LockStoreSchemaListener` only deals with `DoctrineDbalStore`. I think it is safe to ignore any instantiation problem that may occur in the `StoreFactory`.
Commits
-------
0acd403 [DoctrineBridge] Ignore invalid stores in `LockStoreSchemaListener` raised by `StoreFactory`
0 commit comments