PHP Reddit
31 subscribers
305 photos
40 videos
25.3K links
Channel to sync with /r/PHP /r/Laravel /r/Symfony. Powered by awesome @r_channels and @reddit2telegram
Download Telegram
Symfony Kit For Developers

Hi people! updating you guys I am moving forward with this project, new features comming soon:

VSCode Marketplace: Symfonykd

>Symfonykd brings Symfony project exploration, framework intelligence, and command workflows directly into VS Code. This extension is designed to bring common Symfony workflows closer to the editor so developers can inspect project data, navigate faster, and run framework tasks without leaving VS Code.

# Next Release Features (19/04/26)

# Sidebar and workspace indicator

https://preview.redd.it/2e22v82natvg1.png?width=434&format=png&auto=webp&s=19aac7ba89f5c76eb9980fe1e348d98378216330

Sidebar and workspace indicator

https://preview.redd.it/5kshhgqnatvg1.png?width=1457&format=png&auto=webp&s=89309bd5565c853bc3fb725f9a77f2e1f69e0265

# Workspace view

Click in workspace indicator and the workspace view will show with basic information

Workspace view

# Sidebar features

# Configuration

https://preview.redd.it/4xm72ikoatvg1.png?width=1869&format=png&auto=webp&s=80ef51e1c59e74082e83b47cbb3fd256dc8c438f

Actions
Refresh
Search in sidebar tree
Envs Diff
Quick picks driven setup to compare two environments
Full Configuration explorer
Just a expanded view of the sidebar tree - same features: serach, compare, navigation to services alias definitions
Sidebar tree
Copy keys and values
Navigation to services

# Console commands

https://preview.redd.it/v2ewdn0qatvg1.png?width=1869&format=png&auto=webp&s=b78744377ae522ddfaeb07d2d31b3f4001ea006f

History support
Quick commands on editor view
Actions
Execute command (ctrl+shift+p \->Symfonykd: Execute Console Command ): Quick pick driven command setup and dedicated output channel to stout/sterr
Compare commands output
Clear history
Favorites commands -> go to recent command and click in the start
Recent commands -> on lick re-run
Running tasks -> on lick open output log
Recent outputs -> on lick open output log

# Dependency Injection

https://preview.redd.it/0gfj317ratvg1.png?width=383&format=png&auto=webp&s=caa1d4f9287f78fbfe6ec123b2d444a88df52edc

App environments variables values tree
App parameters tree list
Configurations Files tree list
Binded Arguments list -> on click navigate to definition
Services: Full list of services -> on click navigate to definition

# Routes

https://preview.redd.it/65llwgrratvg1.png?width=382&format=png&auto=webp&s=76f6e4c2dec28f01a21e9da9954a4b368350cc5a

List of available routes with the related information, navigation on lick in controller references

# Profiler

https://preview.redd.it/jea3liesatvg1.png?width=376&format=png&auto=webp&s=e7bf76206a04ce97b426a92a25a560ad042e375d

Actions
Clear history
help -> setup project to use profiler module and avoid cors issues
reload
Start -> can be automatically managed when using vscode debugger enabling symfonykd.profiler.autoStartWithDebugger setting
Tree list of profiler entries captures
On click open profiler webpage in vscode

# Forms

https://preview.redd.it/8p0wscctatvg1.png?width=378&format=png&auto=webp&s=30774827292ab8c58f45f4c237e2bbb70e7161a9

Builtin form types -> full list of available types installed from external libraries
Services Form types -> Form types defined as services (normally the app form types)
Support on click navigation
Type Extensions
Support on click navigation
Type Guessers
Support on click navigation

# Twig

https://preview.redd.it/q8l95qztatvg1.png?width=388&format=png&auto=webp&s=001400f7f609bdc2a178e113a860b47361c7144e

Components list
Navigation for app classes
Templates
Templates list by bundles

# Doctrine

https://preview.redd.it/ah0n2tkuatvg1.png?width=389&format=png&auto=webp&s=a768de4db9fe8e85f69f756c9932ec4aa53f679f

Actions
Show diagram
Entities tree view
metadata
Symfony Kit For Developers

Hi people! updating you guys I am moving forward with this project, new features comming soon:

[VSCode Marketplace: Symfonykd](https://marketplace.visualstudio.com/items?itemName=AndresCevallos.vscode-symfonykd-devkit)

>Symfonykd brings Symfony project exploration, framework intelligence, and command workflows directly into VS Code. This extension is designed to bring common Symfony workflows closer to the editor so developers can inspect project data, navigate faster, and run framework tasks without leaving VS Code.

# Next Release Features (19/04/26)

# Sidebar and workspace indicator

https://preview.redd.it/2e22v82natvg1.png?width=434&format=png&auto=webp&s=19aac7ba89f5c76eb9980fe1e348d98378216330

Sidebar and workspace indicator

https://preview.redd.it/5kshhgqnatvg1.png?width=1457&format=png&auto=webp&s=89309bd5565c853bc3fb725f9a77f2e1f69e0265

# Workspace view

Click in workspace indicator and the workspace view will show with basic information

Workspace view

# Sidebar features

# Configuration

https://preview.redd.it/4xm72ikoatvg1.png?width=1869&format=png&auto=webp&s=80ef51e1c59e74082e83b47cbb3fd256dc8c438f

* **Actions**
* Refresh
* Search in sidebar tree
* Envs Diff
* Quick picks driven setup to compare two environments
* Full Configuration explorer
* Just a expanded view of the sidebar tree - same features: serach, compare, navigation to services alias definitions
* **Sidebar tree**
* Copy keys and values
* Navigation to services

# Console commands

https://preview.redd.it/v2ewdn0qatvg1.png?width=1869&format=png&auto=webp&s=b78744377ae522ddfaeb07d2d31b3f4001ea006f

* History support
* Quick commands on editor view
* **Actions**
* Execute command (`ctrl+shift+p` \->`Symfonykd: Execute Console Command` ): Quick pick driven command setup and dedicated output channel to stout/sterr
* Compare commands output
* Clear history
* Favorites commands -> go to recent command and click in the start
* Recent commands -> on lick re-run
* Running tasks -> on lick open output log
* Recent outputs -> on lick open output log

# Dependency Injection

https://preview.redd.it/0gfj317ratvg1.png?width=383&format=png&auto=webp&s=caa1d4f9287f78fbfe6ec123b2d444a88df52edc

* App environments variables values tree
* App parameters tree list
* Configurations Files tree list
* Binded Arguments list -> on click navigate to definition
* Services: Full list of services -> on click navigate to definition

# Routes

https://preview.redd.it/65llwgrratvg1.png?width=382&format=png&auto=webp&s=76f6e4c2dec28f01a21e9da9954a4b368350cc5a

List of available routes with the related information, navigation on lick in controller references

# Profiler

https://preview.redd.it/jea3liesatvg1.png?width=376&format=png&auto=webp&s=e7bf76206a04ce97b426a92a25a560ad042e375d

* **Actions**
* Clear history
* help -> setup project to use profiler module and avoid cors issues
* reload
* Start -> can be automatically managed when using vscode debugger enabling `symfonykd.profiler.autoStartWithDebugger` setting
* **Tree list of profiler entries captures**
* On click open profiler webpage in vscode

# Forms

https://preview.redd.it/8p0wscctatvg1.png?width=378&format=png&auto=webp&s=30774827292ab8c58f45f4c237e2bbb70e7161a9

* Builtin form types -> full list of available types installed from external libraries
* Services Form types -> Form types defined as services (normally the app form types)
* Support on click navigation
* Type Extensions
* Support on click navigation
* Type Guessers
* Support on click navigation

# Twig

https://preview.redd.it/q8l95qztatvg1.png?width=388&format=png&auto=webp&s=001400f7f609bdc2a178e113a860b47361c7144e

* **Components list**
* Navigation for app classes
* **Templates**
* Templates list by bundles

# Doctrine

https://preview.redd.it/ah0n2tkuatvg1.png?width=389&format=png&auto=webp&s=a768de4db9fe8e85f69f756c9932ec4aa53f679f

* **Actions**
* Show diagram
* **Entities tree view**
* metadata
*
fields

https://preview.redd.it/0nttl4gvatvg1.png?width=1148&format=png&auto=webp&s=ad6007d4878672ae2994599873826042e4d69585

# Language server

# Symfony features

# Codelens

* (PHP) (extended) nelmio alias
* (YAML) (vanilla) params envs
* (YAML) (vanilla) Bundle configuration full view

# Completions

* (PHP) (extended) doctrine orm mapping convention
* (PHP) (extended) doctrine orm query completion
* (PHP) (extended) Form options and constrains

# Definition navigation

* (YAML) (vanilla) services navigation -> fqn, `@` alias and services ids
* (PHP) (extended) Doctrine mapping columns references navigation
* (PHP) (extended) Openapi navigation from `#/components/...` to named entity (alias) defintion
* (YAML) (extended) Openapi navigation from alias class to class file

# Diagnosis

* (PHP) (extended) Doctrine diagnostics for QueryBuilder/DQL semantics and migration drift checks.
* (PHP) (extended) Apidoc consistency with routes definition in controllers
* (PHP) (extended) Diagnostics for form field and entity/DTO property mismatches.

# Implementations

* (PHP) (extended) Support for navigation from form types -> `getBlockPrefix` to twig block defined

# Refactor

* (PHP) (extended) Doctrine entity fields across usages in code and references
* (PHP) (extended) Rename php class
* (PHP) (extended) Rename services ids
* (YAML) (extended) Rename nelmio named entities aliases

# References

* (PHP) (extended) Handle for Nelmio API Doc alias references

# Twig Features

# Codelens

* Block inherance
* Controllers references -> show controllers where the template is used

# Completions

* controllers
* filters
* functions
* global variables
* route names
* template paths
* twig components
* for-loop

# Definitions

* assets
* components
* controller
* env-variables
* form blocks
* form theme
* parameters
* routes
* services
* template-paths

# Gutters

* block inherance -> navigation hover
* controller

# Hovers

* filters
* for-loop
* functions
* global-variables
* local-variables
* (extended+) twig-components

# Chat Participant

This extension enables `@symfony` chat participant that have access to tools and project context and custom prompting to specialize and focus agent as PHP/Symfony expert.

User must set provider and model to use in settings -> available in workspace status full view.

`@symfony` have the following commands

* `/status` Show routes in the current Symfony project
* `/parameters` Show parameters in the current Symfony project
* `/bundles` Show bundles in the current Symfony project
* `/controllers` Show controllers in the current Symfony project
* `/templates` Show templates in the current Symfony project
* `/variables` Show chat prompt variables
* `/make` Create a Symfony component such as a controller, entity, or form.

`@symfony` have the following tools - managed automatically by the chat participant

* `symfony_command_info`
* `symfony_list_commands`
* `symfony_execute`

Commands security policy is managed via settings. Chat participant implements a commands policy layer that is gonna ask the user before execute commands.

>

**I am looking for a closed group of users to help me to debug, this will be formalized later as "insider user" program.**

https://redd.it/1socnzl
@r_php
I built HorizonHub: monitor multiple Laravel Horizon services in one place

Hey everyone,

I wanted to share something I built for myself called **HorizonHub**.

I work with several Laravel services using Horizon in production environment, and I kept feeling the same pain: checking queues/jobs/workers across services was messy and annoying.
For me it's important that these jobs workflows are correctly scheduled and executed, because failed jobs or even when workers become offline could have a real, negative impact (revenue, support load, data consistency, SLAs, on-call, etc.).
So I started building a small tool to make my own life easier.

Right now, HorizonHub lets me:

* Monitor jobs from multiple Laravel services in one place
* Restart jobs in batch
* Receive alerts

[All jobs can be viewed at a glance](https://preview.redd.it/qcazg2amwsvg1.png?width=2994&format=png&auto=webp&s=c2b2c562dc2f2686134171cc057d0a456adc6cd9)

https://preview.redd.it/vautl6a0xsvg1.png?width=2994&format=png&auto=webp&s=cec635dcebaa3e6e947555d03667ae37bc876213

It’s still early and very much a real "*built-from-need*" project.

If you run several Laravel apps with Horizon and are tired of switching between dashboards, this might be useful.

If anyone wants to try it, checkout the Github repository: [https://github.com/enegalan/horizonhub](https://github.com/enegalan/horizonhub).
Any feedback (good or bad) helps me improve it 🙏

https://redd.it/1soau8j
@r_php
AuditTrailBundle v3: Improvements

There’s a much bigger list of improvements in v3 release, but I wanted to share one feature I’m especially happy with: when reverting an audit log, the UI now previews exactly what will be restored, including many-to-many relationships like tags and categories.

That makes revert workflows feel a lot safer and much less like a blind rollback.

If this looks useful for your Symfony/Doctrine projects, give it a try and let me know what you think. Feedback would really help shape the next improvements.

symfony audit bundle



https://redd.it/1sowpj0
@r_php
! $thing vs !$thing - minor pint microrant

Who is really putting a space after the ! in conditions? The Laravel pint rules just seem a bit off on this point. Am I alone?

if (! $thing) { } // ??
if (!$thing) { } // The way of the 99%

https://redd.it/1soxshm
@r_php
A job is "successful", but did nothing - how do you catch that?

6 days ago I was discussing queue monitoring in Laravel. Someone asked a really interesting question:

>

Example: a job was supposed to create \~2000 users, but ended up creating \~400 and still showed as success 🤡 That made me realize I wasn’t tracking this at all.

No errors → everything is green → but the data is already off. So I tried a simple approach: now each job builds a “normal” execution time baseline, and if a new run is:

suspiciously fast
or much slower than usual

it gets flagged as anomalous. Basically trying to catch silent failures where there’s no exception, but something clearly went wrong. Also added a few more things: when I detect jobs that stopped mid-execution, I can now get real-time notifications via Slack or Webhooks. For more critical cases, I can escalate alerts through PagerDuty or Opsgenie (I personally use both).

Curious how others handle this - do you track anything like this or rely on business-level checks?

https://redd.it/1soxdxo
@r_php
EasyAdmin and Rich Doctrine Models

Hi there! In the Doctrine Getting Started tutorial, they recommend using rich models for entities, and I really like this approach.

But on the other hand, we have EasyAdmin, which doesn’t work well with rich models and instead prefers anemic models with simple getters/setters or even public fields.

So my main question is: how do you organize your rich models (if you use them) together with EasyAdmin?

Because EasyAdmin even throws an exception when your entity’s __construct() method has parameters :/

https://redd.it/1soycds
@r_php
Your job "succeeded" but did nothing how do you even catch that?

Had an interesting conversation recently about queue monitoring in Laravel. Someone came to me with a production case: a job was supposed to create 10,000 users, created 400, and still reported as successful. No errors, no exceptions, everything green. And I realized, right now my system can't even tell whether a job actually did what it was supposed to. I started looking at other monitoring tools, and most of them just say "it ran" or "it failed". But what about when it runs, doesn't crash, and just ... does the wrong thing?
Started thinking about tracking execution time baselines, if a job that normally takes 30 seconds suddenly finishes in 2, something's probably off. But that only catches the obvious cases. The harder question is: should the job itself validate its own result? Like "I was supposed to create 10,000 records, I created 400, that's not right"? Or is that already business logic and doesn't belong in monitoring?
Because the moment you start checking results, you're basically writing tests for every job, and that feels like a rabbit hole.
Curious how you guys handle this. Do you just trust "no error = success" or do you actually verify what happened after the job ran?

https://preview.redd.it/h4rmtwsh5zvg1.png?width=1254&format=png&auto=webp&s=97bc1b8e41e91829b89a2408b1c35f7d9d294d42

Is it even worth digging into this or is it overengineering?

GitHub: https://github.com/RomaLytar/yammi-jobs-monitoring-laravel


https://redd.it/1sp21ht
@r_php
I built a VS Code extension to make Laravel projects easier for AI tools to understand

I was working on some older Laravel projects recently and noticed something frustrating when using AI tools like Codex or Claude.

They struggle to understand the actual database schema of the app.

Even though all the information is technically there (models, migrations, relationships), the AI has to parse everything manually, which:

wastes tokens
misses relationships sometimes
makes responses inconsistent

So I built a small VS Code extension to solve this.

It scans:

app/Models
database/migrations

And generates a clean Markdown file with:

table structure
columns
foreign keys
Eloquent relationships

The idea is simple:

Instead of making AI read your entire codebase, you give it a structured summary of your schema.

This makes it easier to:

explain your project to AI
debug faster
onboard into older Laravel codebases

I’m still experimenting with it, so I’d love feedback:

Would this actually fit into your workflow?
Anything you’d want it to include?

GitHub:
https://github.com/u-did-it/laravel-model-markdown-generator

https://redd.it/1sp75be
@r_php
Wall of Shame: 22% of PHP composer packages' disk space occupied by just 481 packages

**The Top 99.9 Percentile of Packagist.org packages by Disk Space**

Vendors who have projects that are 137.56 MB or more in disk space.

| vendor | repo_count | total_mb | total_stars | badness_score |
|---------------|------------|----------|-------------|----------------|
| themelogy | 55 | 2117.94 | 0 | 2117.9375 |
| correctch | 1 | 1838.14 | 0 | 1838.1406 |
| acosf | 2 | 8455.12 | 4 | 1691.0242 |
| azaw | 7 | 1541.30 | 0 | 1541.2969 |
| khandieyea | 5 | 2752.62 | 1 | 1376.3105 |
| rockmelodies | 2 | 1191.33 | 0 | 1191.3320 |
| triasigaka | 3 | 1130.77 | 0 | 1130.7695 |
| quatrain | 1 | 1127.27 | 0 | 1127.2695 |
| shakilahmmed | 1 | 1038.98 | 0 | 1038.9805 |
| mhinspeya | 46 | 867.81 | 0 | 867.8086 |
| simp | 14 | 611.33 | 0 | 611.3320 |
| queenco | 1 | 582.62 | 0 | 582.6211 |
| olcaytaner | 24 | 582.17 | 0 | 582.1680 |
| youdevcms | 1 | 556.47 | 0 | 556.4727 |
| centurion | 1 | 551.42 | 0 | 551.4180 |
| devarul | 1 | 550.79 | 0 | 550.7891 |
| pantech | 1 | 527.14 | 0 | 527.1445 |
| zfmaster | 3 | 519.66 | 0 | 519.6641 |
| vectorbross | 47 | 517.84 | 0 | 517.8359 |
| ing‑lib | 1 | 476.87 | 0 | 476.8711 |
| stampy | 1 | 466.27 | 0 | 466.2695 |
| ivan‑matthews | 3 | 465.25 | 0 | 465.2461 |
| order‑counter | 1 | 447.11 | 0 | 447.1055 |
| jsmarion | 1 | 438.70 | 0 | 438.6953 |
| coffeekraken | 1 | 416.82 | 0 | 416.8164 |
| phila088 | 1 | 416.44 | 0 | 416.4375 |
| zver | 22 | 408.09 | 0 | 408.0898 |
| pggns | 15 | 397.84 | 0 | 397.8398 |
| planet4‑rpg | 1 | 396.80 | 0 | 396.7969 |
| yalla‑ya | 2 | 1187.23 | 2 | 395.7448 |

* Disk space used by all (440,000+) of Packagist.org projects? **699,648 MB**
* Disk space used by Biggest 481? **163,425 MB (23.36%)**


Full report and more stats: https://github.com/bettergistco/PackagistArchive/blob/master/huge_vendors.md

Note: None of these packages are included in the Bettergist Packagist Archive + Civilization Bootstrap USBs. This shrinks total necessary space, after compression, from more than 300 GB to exactly 95 GB, a considerable savings.

This is because the majority of the disk space used by the Biggest 481 packages is occupied by already-compressed image and video assets.

https://redd.it/1spbhfn
@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/1spmssc
@r_php
When your first learn php what confuse the most ?

coming from go (I love golang) but I wanna do a little bit of freelancing so im doing some leetcode to understand php so I can learn lavarel and im not gonna lie im confuse by $ for local variable and params function (params function is variable underneath so it make sense ) and the array_push(references, ...values) and you what surprise or confuse you when you first learn php ? just started but php seems a little bit more complex than go am I wrong ?

https://redd.it/1spvhzm
@r_php
Planning to get back into writing Laravel content and would love some feedback on my direction

I've been building with Laravel for a while now and somewhere along the way I stopped writing about it. Life, client work, you know how it goes.

But I've decided to get back into it properly. I'm refreshing my site and starting to put out content that's actually useful for the Laravel community rather than just generic tutorial stuff that already exists everywhere.

My focus is going to be on:

1. Real world implementation patterns not just hello world examples.

2. Laravel with modern tooling like Livewire, Filament, and Inertia.

3. AI integration in Laravel apps which is something I've been doing a lot of lately.

4. Performance and architecture decisions for production apps.

I want it to feel less like a documentation mirror and more like something written by someone who's actually shipped Laravel apps and hit the real problems.

If anyone's curious the site is larashout.com, it's a bit bare right now but that's kind of the point of this post. I'm rebuilding it with intention this time.

My question for the community is what are you actually struggling with in Laravel right now that you can't find a solid answer for? What would you actually want to read?

I'd rather write ten posts that genuinely help people than a hundred that nobody bookmarks.

https://redd.it/1spt4l5
@r_php
Weekly help thread

Hey there!

This subreddit isn't meant for help threads, though there's one exception to the rule: in this thread you can ask anything you want PHP related, someone will probably be able to help you out!

https://redd.it/1sqgs0t
@r_php