phil / follow-bundle
Let members follow a topic, thread, listing or member and hear about new activity once, through notifications, with levels, approval requests and mutuals.
Package info
github.com/parler-haut-interagir-librement/follow-bundle
Type:symfony-bundle
pkg:composer/phil/follow-bundle
Requires
- php: >=8.5
- doctrine/dbal: ^4.5
- phil/notifications-bundle: ^0.4@dev
- psr/clock: ^1.0
- symfony/config: ^8.2
- symfony/dependency-injection: ^8.2
- symfony/http-foundation: ^8.2
- symfony/routing: ^8.2
- symfony/security-csrf: ^8.2
- symfony/translation-contracts: ^3.6
- symfony/uid: ^8.2
- twig/twig: ^3.21
Requires (Dev)
- doctrine/doctrine-bundle: ^3.3
- doctrine/orm: ^3.7
- phil/privacy-bundle: ^0.3@dev
- phpunit/phpunit: ^13.4
- psr/event-dispatcher: ^1.0
- psr/log: ^3.0
- symfony/browser-kit: ^8.2
- symfony/cache: ^8.2
- symfony/cache-contracts: ^3.6
- symfony/clock: ^8.2
- symfony/css-selector: ^8.2
- symfony/dom-crawler: ^8.1
- symfony/event-dispatcher: ^8.2
- symfony/event-dispatcher-contracts: ^3.6
- symfony/framework-bundle: ^8.2
- symfony/http-kernel: ^8.2
- symfony/lock: ^8.2
- symfony/messenger: ^8.2
- symfony/notifier: ^8.2
- symfony/scheduler: ^8.2
- symfony/translation: ^8.2
- symfony/twig-bundle: ^8.2
Suggests
- doctrine/orm: To add the tables to the schema the ORM generates, for doctrine:migrations:diff
- phil/privacy-bundle: For a member's follows, requests and relationships in the export and the erasure of their data
- symfony/cache-contracts: To keep the last run of the schedule in a cache pool
- symfony/lock: To keep the schedule to one worker
- symfony/messenger: To send activities to their followers in the background, a page at a time
- symfony/scheduler: To purge the activities, claims and marks every day
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-25 13:22:53 UTC
README
Follow a content item, a thread, a listing or a member, at the level each member chooses, and hear of new activity through phil/notifications-bundle: requests for locked profiles, mutual relationships, followers hidden on request.
phil/follow-bundle is a Symfony bundle. A member follows a subject — any record of the application, named by a type and
an identifier — at one of four levels: watching, mentions only, ignoring, or custom, a level for each
kind of event. Following a parent follows its children, unless the member chose otherwise on a nearer subject. When the
application publishes an activity, the bundle sends it to the followers through phil/notifications-bundle, a bounded
page at a time, by Messenger messages that carry identifiers only, and never twice to the same member.
$follows->follow($member, new SubjectReference('thread', $thread->id)); $activities->publish(new SubjectReference('thread', $thread->id), 'reply.created', $author, $mentioned, 'reply:'.$reply->id);
Features
- Levels: watching, mentions only, ignoring — which also stops what a followed parent brings —, and custom by event; see Following.
- Inheritance: the application names the parents of a subject; the nearest follow decides.
- Requests: a locked profile, or any subject the application approves, turns a follow into a request that its
approver accepts or rejects —
Follow,AcceptandReject, the words of ActivityPub. - Mutual relationships, turned on by configuration, beside one-way following; stopping to follow keeps them.
- Delivery through
phil/notifications-bundle: pages of followers, claims per member and activity so that a retry sends to no one twice, one notification on every channel until the member sees the subject, and the digest of the notifications bundle; see Delivery. - Automatic follows, when turned on, of what a member creates or replies to.
- Privacy: followers hidden at each member's choice, never shown by the API nor the templates; export and erasure through phil/privacy-bundle; see Privacy.
- Templates that work without JavaScript: the follow button and its menu of levels, the requests, the followers, the visibility of one's followers, the mutual relationship; see Templates.
- No activity feed: each application composes its home page from the follows and the notifications; see A home page.
Status
| Part | State |
|---|---|
| Follows, levels, preferences by event, inheritance | Implemented and tested |
| Requests, mutual relationships, automatic follows | Implemented and tested |
| Delivery by pages, claims, hold until seen, purge schedule | Implemented and tested |
| Followers' visibility, export and erasure | Implemented and tested |
| Templates and forms without JavaScript | Implemented and tested |
| Flex recipe | Not written yet |
Documentation
| Document | What it covers |
|---|---|
| Installation | Requirements, installing, the tables and the routes. |
| Configuration | Every option, with an example. |
| Following | Levels, preferences by event, inheritance, requests, mutual relationships, automatic follows. |
| Delivery | Publishing an activity, the pages, the claims, the hold until seen, the digest and the purge. |
| Templates | The templates, their Twig functions and their forms. |
| A home page | How an application composes a member's home page from the follows and the notifications. |
| Privacy | Hidden followers, the export and the erasure. |
| Extension points | The ports the application writes and the services it calls. |
| Testing | The bundle's tests. |
| Reference | Every public type of the bundle. |
Quick start
// config/bundles.php Phil\FollowBundle\PhilFollowBundle::class => ['all' => true],
# config/packages/phil_follow.yaml phil_follow: access: App\Follow\SubjectAccess # required with Symfony Security
# config/routes/phil_follow.yaml phil_follow: resource: '@PhilFollowBundle/config/routes.php' prefix: /follow
Requirements
PHP 8.5 or later, Symfony 8.2 or later, Doctrine DBAL 4.5 or later and phil/notifications-bundle 0.3 or later.
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.