Libraries tagged by phi
phil/structured-data
32 Downloads
The schema.org graph of a page as values: immutable nodes with factories for the common types, stable @id, a @graph that merges the nodes of one @id and lifts nested ones, languages, validation of required and recommended properties, JSON-LD safe inside a script element, and a reader of the JSON-LD of a page
phil/safe-http
43 Downloads
Reading other sites safely: an HTTP client on Symfony HttpClient that refuses private networks, follows redirects it checks itself, and bounds the time, the size and the redirects of what it reads.
phil/resource
121 Downloads
Point at any record of your application by its kind and identifier, such as page:42, so a trash, a tag or a schedule can refer to it without knowing its class.
phil/recurrence
41 Downloads
Repeating dates from an iCalendar (RFC 5545) rule: read it, check it, write it, and list its occurrences in their time zone, with exceptions.
phil/qr-code
45 Downloads
Draw QR codes as SVG or PNG in pure PHP, with no service and no image library: the smallest code for your text, with room for a logo.
phil/money
38 Downloads
Handle money without rounding errors: exact integer amounts in a known currency, parsed and printed to its precision, split without ever losing a cent.
phil/markup
58 Downloads
Show text written in Markdown, BBCode, wiki syntaxes, UJO (Universal JSON Output) or HTML as safe HTML, purified at the level you choose: basic, forum or all.
phil/fonts
35 Downloads
Font metadata from TrueType, OpenType, collections, WOFF and WOFF2: names, weight, style, OS/2 embedding permissions, licence, variation axes; @font-face rules and a licence register per file
phil/enums
130 Downloads
Make PHP enums easier to list, compare, describe and group: traits and attributes with no dependency, and PHPStan extensions that understand them.
phil/email-address
42 Downloads
Email addresses a mail server can deliver to: RFC 5321 mailbox syntax with international domains and the RFC 6531 forms an application allows, MX, null MX and A records through a port, disposable domains and IANA top-level domains imported as data, denied and allowed domains, and suggestions for slips such as gmial.com, with a Symfony constraint
phil/dev-tools
73 Downloads
Shared development tooling for PHIL and Tilttek packages: quality-tool configurations, Composer scripts, documentation checks and the package skeleton.
phil/ddd-bundle
58 Downloads
The few types every bounded context of a Symfony application shares: identifiers, domain events, domain errors, and command and query buses on Messenger.
phil/css-sanitizer
80 Downloads
CSS written by people made safe to serve: a tokenizer and parser that follow CSS Syntax Level 3, allow lists of properties, functions, selectors and at-rules (@media, @supports, @page and margin boxes, @font-face), url() limited to allowed files, @import, expression(), javascript: and bindings refused, a serializer, and a validator constraint
phil/content-warnings
33 Downloads
Content warnings for PHP: a translated catalogue of warning themes each application completes or replaces, the warnings of a game, a book, an article or an event, and the themes a member folds or hides
phil/bot-detection-bundle
35 Downloads
Tell a robot from a human in a Symfony site: detectors run in the browser and give one verdict, which decides how much friction the visitor meets.