Search by

phil / profiles-bundle

phil

Let members choose who sees each part of their profile: public, members or only me, declared fields, an opt-in directory, links verified by rel="me".

Package info

github.com/parler-haut-interagir-librement/profiles-bundle

Homepage

Type:symfony-bundle

pkg:composer/phil/profiles-bundle

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.0-alpha 2026-12-02 22:00 UTC

This package is auto-updated.

Last update: 2026-12-03 01:33:46 UTC


README

Member profile pages in Symfony: each part shown to the audience its member picks, declared fields, an opt-in directory, links verified by rel="me".

phil/profiles-bundle is a Symfony bundle for a member's public page: the name they go by, their pronouns, a bio, their links and the fields the application offers — a city, a website, a level. The member decides who sees each part; the page shows a viewer only what admits them.

  • An audience per part: the page, the pronouns, the bio, the links and each field have their own — public, members or only_me. A part is shown when both the page and the part admit the viewer, so a member hides the page from visitors who are not signed in by setting it to members.
  • Moderators see the page, not the private parts: a moderator opens a page whatever its audience, and never reads a part its member keeps to themselves.
  • A profile kept from the members its owner blocks: with phil/user-blocks, a block keeps the profile from the member blocked, who reads it as no profile at all; a mute or an ignore keeps nothing.
  • Fields the application declares: a line, a text, a web address or a choice, each with its bound and the audience a value gets by default. An address is read by phil/url and kept in its canonical form.
  • A directory the member opts into: off until they turn it on, sorted by name, filtered only on the fields the application makes filterable and only through values the viewer may see. Nothing in it sorts by last visit or by reputation.
  • Pronouns in a part of their own, never mixed into the name.
  • Links verified by rel="me": a link is marked verified when its page links back to the profile's page, read as a browser parses HTML; the fetches go through Symfony's HTTP client kept off private networks.
  • schema.org Person for a public page only: the name, the page's address, the public bio and the public links found to link back.
  • The names a member went by, for the moderators: a rename keeps the name left, up to a bound, read by a moderator only.
  • Erasure: erase() removes the profile, its fields and its history of names.
  • Events with identifiers only, PSR-14, and services that keep nothing between requests.

Status

Part State
Profiles, the parts and their audiences, the page audience Implemented and tested
Fields declared by the application: line, text, address, choice Implemented and tested
The page as a viewer sees it, the directory and its filters Implemented and tested
Blocks of phil/user-blocks, or the application's own access rule Implemented and tested
Link verification by rel="me", schema.org Person Implemented and tested
History of names for the moderators, erasure Implemented and tested
Doctrine and memory stores, PSR-14 events Implemented and tested
Twig templates of the page and the directory, avatars, a profile card on hover Not written

Documentation

Document What it covers
Installation Requirements, installing, the tables.
Configuration Every option, with an example.
Profiles Audiences, the parts, the fields, the page, the directory, the history of names, erasure.
Link verification How a link is verified by rel="me", its bounds and where to run it.
Extension points The services to replace and the events.
Testing The bundle's tests, and how to test code that uses profiles.
Reference Every public type, with its role.

Quick start

// config/bundles.php
Phil\ProfilesBundle\PhilProfilesBundle::class => ['all' => true],
# config/packages/phil_profiles.yaml
phil_profiles:
    fields:
        city: { type: line, max_length: 80, filterable: true }
        website: { type: url, default_audience: public }
    user_blocks: Phil\UserBlocks\UserBlocks
use Phil\ProfilesBundle\Application\ProfilePages;
use Phil\ProfilesBundle\Application\Profiles;
use Phil\ProfilesBundle\Domain\Enum\Audience;
use Phil\ProfilesBundle\Domain\ValueObject\Viewer;

$profiles->create('member-17', 'Ana Lopes', Audience::Public);
$profiles->changePronouns('member-17', 'she/her', Audience::Public);
$profiles->changeField('member-17', 'city', 'Laval');            // members only, by default
$profiles->list('member-17', true);                              // in the directory

$view = $pages->view('member-17', Viewer::visitor());            // the name, the pronouns, no city
$found = $pages->directory(Viewer::member('member-42'), ['city' => 'laval']);

Requirements

PHP 8.5 or later with ext-dom and ext-mbstring, Symfony 8.2 or later, and Doctrine ORM 3.8 or later for the Doctrine store.

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.