Skip to content

[Messenger] Add AMPHP SQL messenger transport - #64892

Open
fabpot wants to merge 3 commits into
symfony:8.2from
fabpot:amp-sqlite-messenger
Open

[Messenger] Add AMPHP SQL messenger transport#64892
fabpot wants to merge 3 commits into
symfony:8.2from
fabpot:amp-sqlite-messenger

Conversation

@fabpot

@fabpot fabpot commented Jul 14, 2026

Copy link
Copy Markdown
Member
Q A
Branch? 8.2
Bug fix? no
New feature? yes
Deprecations? no
Issues n/a
License MIT

Docs: symfony/symfony-docs#22457

Adds a Symfony Messenger transport backed by asynchronous AMP SQL that allows to use Messenger without blocking an Amp event loop.

@carsonbot carsonbot added this to the 8.2 milestone Jul 14, 2026
@carsonbot carsonbot changed the title [Messenger] AMPHP SQLite3 messenger transport Jul 14, 2026
@fabpot fabpot changed the title [Messenger] AMPHP SQLite3 messenger transport Jul 15, 2026
@fabpot
fabpot force-pushed the amp-sqlite-messenger branch from 1921a15 to be40e18 Compare July 15, 2026 06:00
@fabpot fabpot changed the title [Messenger] AMPHP SQL messenger transport Jul 15, 2026
@fabpot
fabpot force-pushed the amp-sqlite-messenger branch 7 times, most recently from 064f48b to a4fd8ee Compare July 15, 2026 09:05
Comment thread composer.json Outdated
Comment thread composer.json Outdated
@nicolas-grekas

Copy link
Copy Markdown
Member

Two things I noticed that have not come up yet.

splitsh.json has no entry for the bridge, so the package would never be split or published. Nothing guards that in CI, since package-tests skips component_bridge. The precedent is 0f5b9b6039d, which retrofitted Prelude.

The SQLite DSN reads three slashes as a relative path. amp-sqlite:///tmp/messages.db resolves to tmp/messages.db, and an absolute path needs amp-sqlite:////tmp/messages.db. Everywhere else three slashes means absolute, including sqlite:/// in the PDO cache and lock stores. testSupports and the Messenger TransportFactoryTest fixture both use the three-slash form, so the tests currently lock the behaviour in.

Smaller: createTransport() catches \Throwable and rethrows a bare "DSN is invalid" with no previous exception, so a bad sslmode or a typo in an option loses its cause. And the two [CI] commits reworking static-analysis.yml look unrelated to the bridge. They are also why PHPStan and Psalm are red here: the refresh step wipes composer.lock and reinstalls from the PR's own composer.json, so the base and the PR are no longer analysed against the same tree. Neither job reports anything in an AmpSql file.

@fabpot
fabpot force-pushed the amp-sqlite-messenger branch from 9aec1f5 to f317384 Compare August 18, 2026 20:49
@fabpot
fabpot force-pushed the amp-sqlite-messenger branch from f317384 to 63084cd Compare August 18, 2026 21:00
@fabpot

fabpot commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

Two things I noticed that have not come up yet.

splitsh.json has no entry for the bridge, so the package would never be split or published. Nothing guards that in CI, since package-tests skips component_bridge. The precedent is 0f5b9b6039d, which retrofitted Prelude.

The SQLite DSN reads three slashes as a relative path. amp-sqlite:///tmp/messages.db resolves to tmp/messages.db, and an absolute path needs amp-sqlite:////tmp/messages.db. Everywhere else three slashes means absolute, including sqlite:/// in the PDO cache and lock stores. testSupports and the Messenger TransportFactoryTest fixture both use the three-slash form, so the tests currently lock the behaviour in.

Smaller: createTransport() catches \Throwable and rethrows a bare "DSN is invalid" with no previous exception, so a bad sslmode or a typo in an option loses its cause. And the two [CI] commits reworking static-analysis.yml look unrelated to the bridge. They are also why PHPStan and Psalm are red here: the refresh step wipes composer.lock and reinstalls from the PR's own composer.json, so the base and the PR are no longer analysed against the same tree. Neither job reports anything in an AmpSql file.

All fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment