phil / newsletter-archive
Give sent newsletters a public home: issues published as clean web pages, free of tracking and personal links, browsed by list and tag or shared by link.
Package info
github.com/parler-haut-interagir-librement/newsletter-archive
Type:symfony-bundle
pkg:composer/phil/newsletter-archive
Requires
- php: >=8.5
- ext-ctype: *
- ext-dom: *
- ext-libxml: *
- ext-mbstring: *
- ext-sodium: *
- doctrine/dbal: ^4.6
- phil/markup: ^0.3@dev
- phil/newsletter-bundle: ^0.5@dev
- phil/slug: ^0.1@dev
- psr/clock: ^1.0
- symfony/config: ^8.2
- symfony/dependency-injection: ^8.2
- symfony/http-foundation: ^8.2
- symfony/http-kernel: ^8.2
- symfony/property-access: ^8.2
- symfony/property-info: ^8.2
- symfony/routing: ^8.2
- symfony/serializer: ^8.2
- twig/twig: ^3.31.1
Requires (Dev)
- doctrine/doctrine-bundle: ^3.3
- doctrine/orm: ^3.7
- phpunit/phpunit: ^13.4
- psr/log: ^3.0
- symfony/browser-kit: ^8.2
- symfony/clock: ^8.2
- symfony/console: ^8.2
- symfony/css-selector: ^8.2
- symfony/dom-crawler: ^8.2
- symfony/framework-bundle: ^8.2
- symfony/mailer: ^8.2
- symfony/messenger: ^8.2
- symfony/security-bundle: ^8.2
- symfony/translation: ^8.2
- symfony/twig-bundle: ^8.2
- symfony/yaml: ^8.2
Suggests
- doctrine/orm: To add the archive's tables to the schema the ORM generates, with ArchiveSchemaListener
- phil/slug-bundle: To make the slugs of the issues with a slugger of the configuration, named by the slugger option
- phil/social-cards: To give each issue a sharing image, in the block meta of the layout
- symfony/console: For the command that publishes, unpublishes, shares and retags the issues
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-12-02 03:15:12 UTC
README
The public archive of a site's sent newsletters: the issues an editor publishes, each at a clean address or behind a revocable link, in a web version that holds nothing of a subscriber.
phil/newsletter-archive is a Symfony bundle on phil/newsletter-bundle. A sent campaign enters the archive only when
an editor publishes it: it is then listed, a page at a time, filtered by list and by tag, and read at a slug made from
its subject. An editor may also share a campaign by a link, published or not: an opaque token of which the archive
keeps only the hash, revoked in one call, replaced by sharing again. Unpublishing withdraws both.
The web version is rendered once, when the issue is published, and kept as it is. It is rendered with neutral data in
place of the subscriber's: no unsubscription or preference link, no signed token, no tracked link, no tracking pixel,
nothing an inline style hides; then it is purified by phil/markup. Since the archive keeps no personal data, erasing
a subscriber leaves it as it is.
The pages are plain Twig templates, without a class the page needs, read well by the phil-ux stylesheet and overridden
like any bundle template; an issue's page gives its canonical address and its Open Graph title and description. A
command publishes, unpublishes, shares, revokes and retags; IssueFeed gives the latest issues to a feed.
Status
| Part | State |
|---|---|
ArchivedIssue, Tag, ArchiveFilter, IssuePage, ArchiveRepository |
Implemented and tested |
Archive, ArchiveReader, NeutralWebVersion, LinkTokens, IssueFeed |
Implemented and tested |
DbalArchiveRepository, ArchiveSchema, ArchiveSchemaListener |
Implemented and tested on SQLite |
| The pages, their routes and templates, the command, the Flex recipe | Implemented and tested |
Documentation
| Document | What it covers |
|---|---|
| Installation | Requirements, the bundle, the routes and the tables. |
| Configuration | Every option of phil_newsletter_archive. |
| The archive | Publishing, unpublishing, sharing by a link, tags and slugs, from code and from the command line. |
| The web version | How an issue is rendered with neutral data, purified and frozen; what that means for privacy. |
| Pages | The routes, the templates and their variables, the canonical address, the headers of a shared page. |
| Extension points | What an application may replace or add, and when it is stable. |
| Testing | The package's tests. |
| Reference | Every public type, with its role. |
Quick start
composer require phil/newsletter-archive
# config/routes/phil_newsletter_archive.yaml phil_newsletter_archive: resource: '@PhilNewsletterArchiveBundle/config/routes.php' prefix: /newsletter/archive
bin/console phil:newsletter-archive publish <campaign-id> --tag=events bin/console phil:newsletter-archive share <campaign-id>
Requirements
PHP 8.5 or later, phil/newsletter-bundle 0.3 or later, Doctrine DBAL 4.5, Symfony 8.2 and Twig 3.30.
Contributing
Contributions are welcome on the PHIL monorepo: read the contribution guide and the code of conduct. Report a vulnerability privately, as the security policy explains, never in a public issue.
License
MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.