Generating documentation for a PHP library (API reference + articles)
I want to generate documentation for my library (which I've recently updated). Is there anything better than phpDocumentor for this? I haven't touched PHP in a decade, so I'm not up to date with the current tooling.
I want simple things:
Parsing PHP 7.0−8.4. Having documentation for all major versions of the library would be nice.
Switching between library versions. A dropdown or something.
Support for PHPStan syntax. This thing comes up first when googling for PHPDoc syntax, so I assume it's the standard now.
Extra non-API-reference articles next to API ref. Introductory articles, something beginner-friendly, which is too long for ReadMe.
Combining docs of multiple packages. If there're any addons to the main package, it'd be convenient to have everything in one place.
Pure static website with pure HTML. So that it can be put on GitHub Pages and be googlable and all.
Search would be nice. Without any backend, naturally.
Sensible syntax for templates and styles. If something needs adjusting, it shouldn't be too painful.
Links to sources of the library, links to official PHP documentation when built-in classes and functions are mentioned etc.
Bonus points for default templates looking nice, having dark theme, doing fast reloads with JS, all that fancy stuff.
Does a thing like this exist? What are the best options for generating documentation for PHP stuff in general? What are you using and why?
https://redd.it/1o9xbjp
@r_php
I want to generate documentation for my library (which I've recently updated). Is there anything better than phpDocumentor for this? I haven't touched PHP in a decade, so I'm not up to date with the current tooling.
I want simple things:
Parsing PHP 7.0−8.4. Having documentation for all major versions of the library would be nice.
Switching between library versions. A dropdown or something.
Support for PHPStan syntax. This thing comes up first when googling for PHPDoc syntax, so I assume it's the standard now.
Extra non-API-reference articles next to API ref. Introductory articles, something beginner-friendly, which is too long for ReadMe.
Combining docs of multiple packages. If there're any addons to the main package, it'd be convenient to have everything in one place.
Pure static website with pure HTML. So that it can be put on GitHub Pages and be googlable and all.
Search would be nice. Without any backend, naturally.
Sensible syntax for templates and styles. If something needs adjusting, it shouldn't be too painful.
Links to sources of the library, links to official PHP documentation when built-in classes and functions are mentioned etc.
Bonus points for default templates looking nice, having dark theme, doing fast reloads with JS, all that fancy stuff.
Does a thing like this exist? What are the best options for generating documentation for PHP stuff in general? What are you using and why?
https://redd.it/1o9xbjp
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Modern non-blocking driver for Nats
NATS is a modern, distributed, and reliable messaging platform. It supports pub-sub with at-most-once delivery guarantees, request-reply messaging, as well as persistent streams and durable queues powered by JetStream with at-least-once guarantees.
Our non-blocking driver implements all major capabilities of the platform:
pub/sub
request/reply
jetstream
key-value store
object store
And also includes recent updates:
Atomic counters based on CRDTs
Batch publishing
Message scheduling
We are also working on support for NATS Micro: using NATS as a transport layer for communication between microservices.
For more features, refer to the library's documentation. Feedback is welcome.
https://github.com/thesis-php/nats
https://redd.it/1oa0n6v
@r_php
NATS is a modern, distributed, and reliable messaging platform. It supports pub-sub with at-most-once delivery guarantees, request-reply messaging, as well as persistent streams and durable queues powered by JetStream with at-least-once guarantees.
Our non-blocking driver implements all major capabilities of the platform:
pub/sub
request/reply
jetstream
key-value store
object store
And also includes recent updates:
Atomic counters based on CRDTs
Batch publishing
Message scheduling
We are also working on support for NATS Micro: using NATS as a transport layer for communication between microservices.
For more features, refer to the library's documentation. Feedback is welcome.
https://github.com/thesis-php/nats
https://redd.it/1oa0n6v
@r_php
GitHub
GitHub - thesis-php/nats: Non-blocking (fiber based) client for Nats.
Non-blocking (fiber based) client for Nats. Contribute to thesis-php/nats development by creating an account on GitHub.
🏗️✨ Forerunner: Define LLM JSON Schemas Using Laravel's Migration Syntax
Hey r/laravel! I've been working with AI a lot over the past year, dipping in between various Laravel packages. One thing I was constantly using was structured outputs, and I never found a way I liked to write them.
Writing them in plain JSON is horrible IMO, and although there are some great packages that offer nice abstractions, I still didn't fully enjoy using them or like the syntax. I wanted to create something familiar and easy to implement, understand, and maintain.
I had some local classes I'd been copying and pasting into various projects and thought I'd package it up. Essentially, you define a structured output using a Laravel migration-style syntax. You can either use the facade or create a struct class.
What It Looks Like
Forerunner lets you define JSON schemas using familiar migration syntax:
https://preview.redd.it/0jw5ju4e1xvf1.png?width=3680&format=png&auto=webp&s=b6d72577a8d7c95ff17f0d715bd825d296f3a09a
https://preview.redd.it/7c5o4v4e1xvf1.png?width=3680&format=png&auto=webp&s=c439890ac16d0b35c91b37d48c8312bea93aab3f
https://preview.redd.it/4chuku4e1xvf1.png?width=3680&format=png&auto=webp&s=d69f87f0ec29de1d2881775495ee36fce80cebd6
# Key Features
Migration-like API: If you know Laravel migrations, you already know Forerunner
Helper methods:
Artisan command: `php artisan make:struct UserProfile` generates structure classes
Nested objects & arrays: Define complex schemas with nested builders
Strict mode: One-liner for OpenAI's structured output requirements
Type-safe: Full IDE autocomplete support
# What's Next
The next feature I'm planning is validation - so you can validate an LLM response against an existing schema.
This is still in pre-release (0.x), so I don't expect it to be 100% perfect. If you're interested, give it a try!
GitHub: https://github.com/Blaspsoft/forerunner
Would love to hear your thoughts and feedback!
https://redd.it/1oa3rv4
@r_php
Hey r/laravel! I've been working with AI a lot over the past year, dipping in between various Laravel packages. One thing I was constantly using was structured outputs, and I never found a way I liked to write them.
Writing them in plain JSON is horrible IMO, and although there are some great packages that offer nice abstractions, I still didn't fully enjoy using them or like the syntax. I wanted to create something familiar and easy to implement, understand, and maintain.
I had some local classes I'd been copying and pasting into various projects and thought I'd package it up. Essentially, you define a structured output using a Laravel migration-style syntax. You can either use the facade or create a struct class.
What It Looks Like
Forerunner lets you define JSON schemas using familiar migration syntax:
https://preview.redd.it/0jw5ju4e1xvf1.png?width=3680&format=png&auto=webp&s=b6d72577a8d7c95ff17f0d715bd825d296f3a09a
https://preview.redd.it/7c5o4v4e1xvf1.png?width=3680&format=png&auto=webp&s=c439890ac16d0b35c91b37d48c8312bea93aab3f
https://preview.redd.it/4chuku4e1xvf1.png?width=3680&format=png&auto=webp&s=d69f87f0ec29de1d2881775495ee36fce80cebd6
# Key Features
Migration-like API: If you know Laravel migrations, you already know Forerunner
Helper methods:
email(), url(), uuid(), datetime(), etc.Artisan command: `php artisan make:struct UserProfile` generates structure classes
Nested objects & arrays: Define complex schemas with nested builders
Strict mode: One-liner for OpenAI's structured output requirements
Type-safe: Full IDE autocomplete support
# What's Next
The next feature I'm planning is validation - so you can validate an LLM response against an existing schema.
This is still in pre-release (0.x), so I don't expect it to be 100% perfect. If you're interested, give it a try!
GitHub: https://github.com/Blaspsoft/forerunner
Would love to hear your thoughts and feedback!
https://redd.it/1oa3rv4
@r_php
Industry: a package for integrating factories with AI for text generation
https://redd.it/1oaco3y
@r_php
https://redd.it/1oaco3y
@r_php
Pitch Your Project 🐘
In this monthly thread you can share whatever code or projects you're working on, ask for reviews, get people's input and general thoughts, … anything goes as long as it's PHP related.
Let's make this a place where people are encouraged to share their work, and where we can learn from each other 😁
Link to the previous edition: /u/brendt_gd should provide a link
https://redd.it/1oajz8b
@r_php
In this monthly thread you can share whatever code or projects you're working on, ask for reviews, get people's input and general thoughts, … anything goes as long as it's PHP related.
Let's make this a place where people are encouraged to share their work, and where we can learn from each other 😁
Link to the previous edition: /u/brendt_gd should provide a link
https://redd.it/1oajz8b
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
A Week of Symfony #981 (October 13–19, 2025)
https://symfony.com/blog/a-week-of-symfony-981-october-13-19-2025?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1oalp1s
@r_php
https://symfony.com/blog/a-week-of-symfony-981-october-13-19-2025?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1oalp1s
@r_php
Symfony
A Week of Symfony #981 (October 13–19, 2025) (Symfony Blog)
This week, Symfony kept fixing bugs and refining the new features for the upcoming Symfony 7.4 and 8.0 releases. Meanwhile, we unveiled a special site to celebrate Symfony's 20th anniversary, and we p…
The new, standards‑compliant URI/URL API in PHP 8.5
https://amitmerchant.com/the-new-standards-compliant-uri-url-api-in-php-85/
https://redd.it/1oartbk
@r_php
https://amitmerchant.com/the-new-standards-compliant-uri-url-api-in-php-85/
https://redd.it/1oartbk
@r_php
Amit Merchant
The new, standards‑compliant URI/URL API in PHP 8.5
PHP’s parse_url was not compliant with RFC 3986 (generic, permissive URIs) or WHATWG URL (browser-style URLs), leading to inconsistent behavior, interoperability problems with tools like cURL, and subtle security issues such as parsing confusion.
Symfony UI Framwork for Javanoscript noob?
I have some intermediate know how with PHP and Synfony. I have no javanoscript experience. Handling the Symfony stuff (Controllers, Config, Docker, API Plattform, Doctrine ORM etc.) i get the hang of. But once Javanoscript is involved, it get's confusing. :-) I support in a project that uses VUE, and every time i know i have to touch or debug this, it's not my thing.
I am starting now with a small business app that needs a UI. Nothing fancy, only 5 guys from the customer itself use it, so it doesn't need to win a design award.
What would you recommand to learn in this case? VUE? UX Turbo? Something else? Do i have to bite the bullet and dive into javanoscript, or is there something else i should look at? It must not be reactive, it must not be super performance. I just need some UI elements which must work, but design and performance ist not an issue.
Any ideas?
https://redd.it/1oashhy
@r_php
I have some intermediate know how with PHP and Synfony. I have no javanoscript experience. Handling the Symfony stuff (Controllers, Config, Docker, API Plattform, Doctrine ORM etc.) i get the hang of. But once Javanoscript is involved, it get's confusing. :-) I support in a project that uses VUE, and every time i know i have to touch or debug this, it's not my thing.
I am starting now with a small business app that needs a UI. Nothing fancy, only 5 guys from the customer itself use it, so it doesn't need to win a design award.
What would you recommand to learn in this case? VUE? UX Turbo? Something else? Do i have to bite the bullet and dive into javanoscript, or is there something else i should look at? It must not be reactive, it must not be super performance. I just need some UI elements which must work, but design and performance ist not an issue.
Any ideas?
https://redd.it/1oashhy
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
Weekly /r/Laravel Help Thread
Ask your Laravel help questions here. To improve your chances of getting an answer from the community, here are some tips:
What steps have you taken so far?
What have you tried from the documentation?
Did you provide any error messages you are getting?
Are you able to provide instructions to replicate the issue?
Did you provide a code example?
Please don't post a screenshot of your code. Use the code block in the Reddit text editor and ensure it's formatted correctly.
For more immediate support, you can ask in the official Laravel Discord.
Thanks and welcome to the r/Laravel community!
https://redd.it/1oauufu
@r_php
Ask your Laravel help questions here. To improve your chances of getting an answer from the community, here are some tips:
What steps have you taken so far?
What have you tried from the documentation?
Did you provide any error messages you are getting?
Are you able to provide instructions to replicate the issue?
Did you provide a code example?
Please don't post a screenshot of your code. Use the code block in the Reddit text editor and ensure it's formatted correctly.
For more immediate support, you can ask in the official Laravel Discord.
Thanks and welcome to the r/Laravel community!
https://redd.it/1oauufu
@r_php
Laravel
Installation - Laravel 12.x - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
POC: auto-escaping untrusted PHP strings in SQL queries
https://github.com/mnapoli/autoescape
https://redd.it/1oat8ty
@r_php
https://github.com/mnapoli/autoescape
https://redd.it/1oat8ty
@r_php
GitHub
GitHub - mnapoli/autoescape: Auto-escaping untrusted strings in SQL queries
Auto-escaping untrusted strings in SQL queries. Contribute to mnapoli/autoescape development by creating an account on GitHub.
Ephemeral User Package
Of course while working on something else, I got sidetracked with a "why doesn't this exist already?" moment. Bottom line, I find myself sometimes reaching for a `new User()` to pass around a model without needing to persist it right away (or ever!). This felt a little more like the Laravel way of doing things, and was a relatively small lift considering.
https://github.com/kylearch/ephemeral-users
https://redd.it/1ob9nk8
@r_php
Of course while working on something else, I got sidetracked with a "why doesn't this exist already?" moment. Bottom line, I find myself sometimes reaching for a `new User()` to pass around a model without needing to persist it right away (or ever!). This felt a little more like the Laravel way of doing things, and was a relatively small lift considering.
https://github.com/kylearch/ephemeral-users
https://redd.it/1ob9nk8
@r_php
GitHub
GitHub - kylearch/ephemeral-users: Laravel package for creating ephemeral (non-persistent) user instances
Laravel package for creating ephemeral (non-persistent) user instances - kylearch/ephemeral-users
Why is using DTOs such a pain?
I’ve been trying to add proper DTOs into a Laravel project, but it feels unnecessarily complicated. Looked at Spatie’s Data package, great idea, but way too heavy for simple use cases. Lots of boilerplate and magic that I don’t really need.
There's nested DTOs, some libraries handle
validation, and its like they try to do more stuff than necessary. Associative arrays seem like I'm gonna break something at some point.
Anyone here using a lightweight approach for DTOs in Laravel? Do you just roll your own PHP classes, use value objects, or rely on something simpler than Spatie’s package?
https://redd.it/1oe6gda
@r_php
I’ve been trying to add proper DTOs into a Laravel project, but it feels unnecessarily complicated. Looked at Spatie’s Data package, great idea, but way too heavy for simple use cases. Lots of boilerplate and magic that I don’t really need.
There's nested DTOs, some libraries handle
validation, and its like they try to do more stuff than necessary. Associative arrays seem like I'm gonna break something at some point.
Anyone here using a lightweight approach for DTOs in Laravel? Do you just roll your own PHP classes, use value objects, or rely on something simpler than Spatie’s package?
https://redd.it/1oe6gda
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
My production architecture for Laravel build with Docker compose, Traefik and FrankenPhp
Hi, everyone, for my little product, coz.jp I completed an architecture that I'm proud of. Using the tech mentioned in the noscript I managed to prepare a stable, fast and easy to maintain infrastructure.
Here the full article with the files templates too. if you have any questions or more importantly suggesitons feel free to ask me here or on the linked article: https://coz.jp/TGzzQa
https://redd.it/1oe2q1b
@r_php
Hi, everyone, for my little product, coz.jp I completed an architecture that I'm proud of. Using the tech mentioned in the noscript I managed to prepare a stable, fast and easy to maintain infrastructure.
Here the full article with the files templates too. if you have any questions or more importantly suggesitons feel free to ask me here or on the linked article: https://coz.jp/TGzzQa
https://redd.it/1oe2q1b
@r_php
coz.jp
Fast URL Shortener | Coz.jp
Shorten URLs, track analytics, and manage links with ease. Get started now!
What is the difference between a bus and a transport
In my project I have these settings:
As you can see I have the follwoing transports:
async
failed
sql_channel_manager_dlq
sqschannelmanager
And the following buses:
event.bus
command.bus
But I have trouble inderstanding the difference between buses and transports.
My google-fu leads me only to generic info regarding on how to setup the queue listener: https://symfony.com/doc/current/messenger.html
But I fail to comperhend the difference between bus and transport. What is the difference between these 2?
So far I understood that a bus is some sort of road that transport uses it to handle a message, if it is true in my example how I can define that all messages passed through
https://redd.it/1oe3ocx
@r_php
In my project I have these settings:
framework:
messenger:
transports:
async: '%env(MESSENGER_TRANSPORT_DSN)%'
failed: 'doctrine://default?table_name=failed_messages'
sql_channel_manager_dlq:
dsn: '%env(SQS_CHANNEL_MANAGER_TRANSPORT_DLQ_DSN)%'
options:
access_key: '%env(AWS_ACCESS_KEY_ID)%'
secret_key: '%env(AWS_SECRET_ACCESS_KEY)%'
region: '%env(AWS_REGION)%'
queue_name: '%env(CHANNEL_MANAGER_QUEUE_NAME_DLQ)%'
sqs_channel_manager:
failure_transport: sql_channel_manager_dlq
dsn: '%env(SQS_CHANNEL_MANAGER_TRANSPORT_DSN)%'
serializer: App\Infrastructure\Messenger\ChannelManagerSerializer
options:
access_key: '%env(AWS_ACCESS_KEY_ID)%'
secret_key: '%env(AWS_SECRET_ACCESS_KEY)%'
region: '%env(AWS_REGION)%'
queue_name: '%env(CHANNEL_MANAGER_QUEUE_NAME)%'
failure_transport: failed
default_bus: command.bus
buses:
event.bus: ~
command.bus:
middleware:
- 'App\Infrastructure\Middleware\RequestIdMiddleware'
routing:
App\Message\TestQueue: async
App\Domain\Event\ChannelManager\ChannelManagerEventHasReceived: sqs_channel_manager
As you can see I have the follwoing transports:
async
failed
sql_channel_manager_dlq
sqschannelmanager
And the following buses:
event.bus
command.bus
But I have trouble inderstanding the difference between buses and transports.
My google-fu leads me only to generic info regarding on how to setup the queue listener: https://symfony.com/doc/current/messenger.html
But I fail to comperhend the difference between bus and transport. What is the difference between these 2?
So far I understood that a bus is some sort of road that transport uses it to handle a message, if it is true in my example how I can define that all messages passed through
sqs_channel_manager would be handled upon event.bus?https://redd.it/1oe3ocx
@r_php
Symfony
Messenger: Sync & Queued Message Handling (Symfony Docs)
Messenger provides a message bus with the ability to send messages and then handle them immediately in your application or send them through transports (e.g. queues) to be handled later. To learn more…
Introducing Nimbus: An integrated, in-browser API client for Laravel with a touch of magic
https://redd.it/1odpprx
@r_php
https://redd.it/1odpprx
@r_php
Nyno (open-source n8n alternative using YAML) now supports PHP functions for high performing Workflow commands.
https://github.com/empowerd-cms/nyno
https://redd.it/1oeg5iq
@r_php
https://github.com/empowerd-cms/nyno
https://redd.it/1oeg5iq
@r_php
GitHub
GitHub - empowerd-cms/nyno: Create and Run Linux Workflows without Limits. Short for "nine" / "yaml" / "no-code" / "automation".
Create and Run Linux Workflows without Limits. Short for "nine" / "yaml" / "no-code" / "automation". - GitHub - empowerd-cms...
SymfonyCon Amsterdam 2025: How native lazy objects will change Doctrine and Symfony forever
https://symfony.com/blog/symfonycon-amsterdam-2025-how-native-lazy-objects-will-change-doctrine-and-symfony-forever?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1ody6bp
@r_php
https://symfony.com/blog/symfonycon-amsterdam-2025-how-native-lazy-objects-will-change-doctrine-and-symfony-forever?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1ody6bp
@r_php
Symfony
SymfonyCon Amsterdam 2025: How native lazy objects will change Doctrine and Symfony forever (Symfony Blog)
⚡ Native lazy loading in PHP 8.4. Discover with Benjamin Eberlei how PHP 8.4’s built-in lazy objects and proxies will transform Doctrine and Symfony
Designing A 2D Game Engine for PHP (Using Swift)
https://youtu.be/ErYDVGER1Rg
https://redd.it/1odvk87
@r_php
https://youtu.be/ErYDVGER1Rg
https://redd.it/1odvk87
@r_php
YouTube
2D Swift Game Engine Designed For PHP - Phorst
Github soon.... Game engine developed in Swift for Windows, Linux, MacOS.
NativePHP Mobile: What's your dev workflow? Do you rebuild every time?
I'm working with NativePHP for mobile and I'm struggling to figure out an efficient development workflow.
I did my first build and deployed it to my phone, but rebuilding the entire app every time I want to see changes is painfully slow. I've searched online but couldn't find any documentation or discussions about mobile development workflows with NativePHP.
Do you rebuild the full app for every change, or is there a way to get live/hot reload working?
https://redd.it/1oejwmv
@r_php
I'm working with NativePHP for mobile and I'm struggling to figure out an efficient development workflow.
I did my first build and deployed it to my phone, but rebuilding the entire app every time I want to see changes is painfully slow. I've searched online but couldn't find any documentation or discussions about mobile development workflows with NativePHP.
Do you rebuild the full app for every change, or is there a way to get live/hot reload working?
https://redd.it/1oejwmv
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
NativePHP going truly native.. for real-real!
https://www.youtube.com/watch?v=yY9fHxvFOdk
https://redd.it/1od4yf4
@r_php
https://www.youtube.com/watch?v=yY9fHxvFOdk
https://redd.it/1od4yf4
@r_php
YouTube
NativePHP for Mobile v2 - REAL. NATIVE. PHP.
This is it.
No wrappers. No gimmicks.
NativePHP for Mobile v2 is the real deal — running Laravel directly on device, with native UI components like side navs, bottom tabs, and floating action buttons.
This video isn’t a commercial. It’s a glimpse at the…
No wrappers. No gimmicks.
NativePHP for Mobile v2 is the real deal — running Laravel directly on device, with native UI components like side navs, bottom tabs, and floating action buttons.
This video isn’t a commercial. It’s a glimpse at the…