PHP Reddit – Telegram
PHP Reddit
34 subscribers
291 photos
37 videos
24.9K links
Channel to sync with /r/PHP /r/Laravel /r/Symfony. Powered by awesome @r_channels and @reddit2telegram
Download Telegram
I offer intro to Computer Programming Class. This is my Syllabus

Just wanted to share my syllabus for the class (you can even call it a bootcamp, that’s fine)

As an educator, or a student or a developer…what do you think? Do you think it’s solid? Any improvements? Should I add or omit anything.

Thanks in advance

Here it is: https://www.figma.com/proto/OpYXeDpozG4CPae139TEna?node-id=1-2&locale=en

https://redd.it/1ln5x0p
@r_php
Symfony AI Context Bundle (beta)

🚀 **\[Beta Release\] Symfony AI Context Bundle** 🤖

I'm excited to announce the first **beta** of the [Symfony AI Context Bundle](https://github.com/ai-context-lab/symfony-ai-context-bundle) — a developer tool that automatically generates a structured, AI-ready JSON file from your Symfony application.

# 🧠 What's it for?

This bundle extracts key information from your project:

* Entities (fields, associations)
* Services (methods & types)
* Controllers and routes
* Repositories
* Events
* Forms

The goal is to **feed this context file into ChatGPT or any LLM**, to get accurate and contextualized answers about your project.

# 🔧 Example usage with ChatGPT

Once you've generated the `ai-context.json`, paste it into ChatGPT (or use a custom GPT) and try prompts like:

`Give me an overview of this Symfony project.`
`Can you explain what the RandomNameService does?`
`List all the form types used and their data classes.`
`How does App\Controller\RandomController::new() work?`
`Generate a README for this app.`

It makes working with large Symfony codebases much more intuitive and AI-assisted.

# 🚀 Quickstart

composer require ai-context/symfony-ai-context-bundle --dev
php bin/console ai-context:generate

This command generates a single JSON file containing all the structural data of your app — perfect for AI tools or static analysis.

# ⚠️ Beta notice

This is a **beta release**, and I’m actively looking for feedback 🙏
If you try it, please let me know:

* Is it useful for your use case?
* What extractors are missing?
* Would you want more advanced prompts or integrations?

🔗 GitHub: [https://github.com/ai-context-lab/symfony-ai-context-bundle](https://github.com/ai-context-lab/symfony-ai-context-bundle)
🐘 Packagist: [https://packagist.org/packages/ai-context/symfony-ai-context-bundle](https://packagist.org/packages/ai-context/symfony-ai-context-bundle)

Thanks for trying it out!

https://redd.it/1lnafmt
@r_php
MCP Server for Laravel Codebases – Let your AI agents query your codebase like a database, directly inside Cursor, Windsurf, Claude Code etc...
https://redd.it/1lngh4p
@r_php
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/1lnjnqd
@r_php
I build my own Json parser using php

I found this cool challenge on John Crickett Coding Challenges, and when I checked the solutions, not a single one was in PHP. PHP is powerful, and it deserves more love in the low-level space too. So I took it personally and decided to solve this challenge in PHP.

🔗 https://github.com/DanielHemmati/json-parser-in-php/


Also, leave a if you liked it!

https://redd.it/1lnnkt9
@r_php
My experience with Laravel Cloud after 4 months

Wanted to share my experience with Laravel Cloud after using it for a startup.

For context, I’ve been working with Laravel professionally since 2017. At work, we ran everything using Docker Compose on a single DigitalOcean box for years. Eventually we outgrew that setup and moved to AWS and now everything’s on ECS Fargate and EC2.

When I started a new side project a few months ago, I didn’t want to deal with the overhead of setting up ECS again, so I figured I’d try out Laravel Cloud. At first, I was super impressed. The UX was clean, and spinning up a new environment was dead simple. I was paying under $10/month while developing, and that felt totally reasonable.

But once I launched the app publicly, the costs started to balloon fast. My last invoice included $155 just for bandwidth, and I don’t have anything crazy running (screenshots below if you’re curious). The monthly bill just kept climbing with no real clarity on what exactly was driving the cost.

Honestly, I don’t know who this service is supposed to be for. If you’re a small to mid-sized team, this pricing model just doesn’t work and you’d burn through your budget in no time. And if you’re a bigger company, you probably already have the resources to just manage things directly on AWS.

I’ve since moved everything over to Forge + Hetzner and am running on a $60/month machine. Way more predictable and manageable.

Laravel Cloud has a lot of potential. I’d love to see it become a standard for Laravel hosting, but not unless they seriously revisit their pricing model.

https://preview.redd.it/aqc3jl77ey9f1.png?width=1418&format=png&auto=webp&s=b1262283834fc60b6f35787adec4d27a4074f1e6

https://preview.redd.it/tkkavl77ey9f1.png?width=1078&format=png&auto=webp&s=5be0a808c1e931ab30a1d258db6e4d8a897c19d5

https://preview.redd.it/4g7w8o77ey9f1.png?width=1094&format=png&auto=webp&s=70ab6590695b2fc9cb1c60bb2d8170df48f2ab55

https://redd.it/1lntd26
@r_php
How to display the most viewed posts in a slider?

Hi there,



I've built a slider on my page using Elementor + Prime Slider. The combination works great, however, the default settings don’t provide an option to sort the posts by views.



I’ve tried several code solutions, but none have worked so far. Does anyone have any suggestions?



My website is https://vejaumbomfilme.com.br/, and I’m referring specifically to the slider under “Mais acessados”.



Thanks in advance!

https://redd.it/1lnsgj7
@r_php
Gedmo Doctrine Extensions and Doctrine 3

(Im on my phone as I write this, so apologies if I miss details)

So I've been trying to keep our symfony packages up to date, and recently updated to Symfony 7.3.

I didn't notice until recently that we were still running Doctrine 2 (as we had doctrine/common and doctrine/cache in our composer json). I removed these items and was able to do the update and got it all working.

One thing I've noticed is that for entities where we have applied the timestampable attribute and traits (which is basically all of them), I get a deprecation warning with it accessing a method in entity manager that will be removed in a future version.

Also the behat/transliterator is abandoned according to composer.

Has anyone else noticed this with Gedmo? What other timestamp packages are people using??

https://redd.it/1lnxt9y
@r_php
Weekly Ask Anything Thread

Feel free to ask any questions you think may not warrant a post. Asking for help here is also fine.

https://redd.it/1lnx7wj
@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/1lo00kd
@r_php
Do you use any S3 based object storage?

At the moment I'm using Minio as a storage solution for media files (not large, but previews, images, etc.).

It does work, but after Minio removed it's UI from the opensource server, and I've found it scanning (health checker) quite resource heavy, I'm thinking of just using simply FS (Btrfs/ZFS/NFS mount, which also have encryption + compression), and just add an asset controller to retrieve it over Laravel (it also can handle policies and such)

The only downside would be you'll talk to your Laravel instance (but you can also use stream responses).

What do you use? Did you move to something like Seafoodfs or juicefs? Or just not S3 at all?

*I've got nothing against S3. I think it's work fine on AWS/DO. This is for more private managed projects.

https://redd.it/1lo3106
@r_php
Can we already use property hooks with doctrine entites?

With PHP 8.4 we have property hooks and no longer need to write boilerplate getter/setter methods. Doctrine also supports property hooks with version 3.4.

Has anyone tried using them with the latest Symfony version? Are they already fully supported by Symfony? Or are there edge cases where they are not working nicely with Symfony currently?

https://redd.it/1loclqd
@r_php
Samarium ERP Update - Simple Business Management in PHP Laravel

Hello Everyone,

I shared my [Samarium](https://github.com/oitcode/samarium) project here a few months back, and I wanted to give you an update on the progress.

# What's [Samarium](https://github.com/oitcode/samarium)?

A simple, modular business management tool built with Laravel that handles:

* Invoice generation & finance tracking
* Website content management
* Task management
* Product/shop management
* Calendar & noticeboard features

# What's New Since Last Time

* **Improved Docker setup** \- Now easier to get running with docker-compose
* **Better module system** \- Enable/disable features through config
* **Enhanced UI customization** \- Bootstrap color themes configurable via config
* **More robust seeding** \- Creates sample data including admin user and basic website pages
* **Cleaner installation process** \- Both Docker and traditional setup options

# Why I Built This

Most ERP solutions are either too complex for small businesses or too expensive. Samarium aims to be the middle ground - powerful enough for real business use but simple enough that you're not drowning in features you don't need.

# Tech Stack

* **Backend**: Laravel, Livewire
* **Database**: MySQL 8.0+
* **Frontend**: Bootstrap + Blade templates
* **Containerization**: Docker support included

# What I'd Love Feedback On

* **Architecture**: How's the modular approach? Any suggestions for improvement?
* **Code quality**: Looking to follow PHP and Laravel best practices better
* **Feature gaps**: What would make this more useful for real businesses?

The project is MIT licensed and contributions are welcome. Would love to hear thoughts from the PHP, Laravel community.

**GitHub**: [https://github.com/oitcode/samarium](https://github.com/oitcode/samarium)


Been working on this as a side project to solve real business needs. Happy to answer any questions about the implementation or design decisions.

Thanks for your time.


https://redd.it/1lodzqe
@r_php
How to manage my datas? (HTML-Form, Array or mySQL)

Should I put my data structure as Array in a Class or as extended Array and then include?

My idea: I would like to manage charactersheets with html-forms and would like to store the datas into an MySQL-database.

I know the ‚basics‘ about the programming. All single parts are familiar for/with me. But I would like to manage the datas clever/smart.

Please tell me keywords/ articles/hints for my research. I would like to „Build“ my own experience.

Lots of thanks!

P.S.: sry, my english isn‘t well.

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