-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] schema assets filter causes TypeError #54769
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
Comments
Looks like I'm facing a similar issue after just upgrading Symfony to 6.4.7 on one of my clients projects. Our CI fails and the following error got reported to our Sentry:
The new patch release introduced a BC break. |
A regression maybe, a BC break nope ;) |
You're right! It does sound to be more like a regression than a BC break here with a the callable accepting |
see #54775 |
Symfony 7.0 also affected |
…schemas (xabbuh) This PR was merged into the 5.4 branch. Discussion ---------- [Messenger] accept AbstractAsset instances when filtering schemas | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #54769 | License | MIT Commits ------- 4d2679d accept AbstractAsset instances when filtering schemas
Saw this after 6.4.7
Should we wait for the next release? |
Yes, or try out the dev branch. |
… (chriskapp) This PR was submitted for the 7.2 branch but it was squashed and merged into the 6.4 branch instead. Discussion ---------- [Messenger] Added postgres asset filter integration test | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | #54769 | License | MIT This PR just adds an additional postgres integration test to test the already fixed issue #54769 regarding the asset filter to prevent those issues in the future. Commits ------- fcad142 [Messenger] Added postgres asset filter integration test
Symfony version(s) affected
6.4.7
Description
This commit introduced a new schema asset filter that filters anything that isn't the doctrine messenger table. However, the filter function can receive other types than string based on this doctrine code the filter can be
string|AbstractAsset
. This can cause a type error in PostgreSQL and potentially other databases.How to reproduce
Have a Symfony doctrine messenger setup on a PostgreSQL database that uses sequences and call the MessengerTransportDoctrineSchemaListener
Possible Solution
Change the typehint to
$configuration->setSchemaAssetsFilter(fn (string|AbstractAsset $tableName) => $tableName === $this->configuration['table_name']);
Additional Context
No response
The text was updated successfully, but these errors were encountered: