PHP Reddit – Telegram
PHP Reddit
34 subscribers
289 photos
37 videos
24.8K links
Channel to sync with /r/PHP /r/Laravel /r/Symfony. Powered by awesome @r_channels and @reddit2telegram
Download Telegram
Config mixture: the Laravel way

I’m trying to add an external config source to my project. This config source I can access over HTTP. However, I would like to keep using config() to access configuration values.

On top of that, the values that I receive from the external source might be a reference to some env() value or another key in that external source.

Env values I have are coming either from .env file or OS.

So, I have a mixture of everything here.

What is THE Laravel way to configure such configuration sources?

https://redd.it/1n629rt
@r_php
What SAST/DAST Tools Work for you?

Even devs who know the OWASP Top 10 by heart can still write vulnerable code. SQL injections, XSS, IDOR - you name it — mistakes happen. That’s where tools like SAST and DAST come in, and I’m curious about what’s working for the community.

In my latest newsletter, I mentioned tools like Composer audit, Psalm, and PHPStan for catching issues early, and Trivy or Hadolint for infrastructure-level checks. I’ve also seen commercial options like Snyk or Sonar’s RIPS, but I’ve found them hit-or-miss with false positives or missing real issues. So far, none of the tools made me feel really safe, so I’m wondering: what SAST or DAST tools do you rely on in your PHP projects? Are there any you can recommend?

https://redd.it/1n6e8hq
@r_php
Why --dump-sql still outputs sql despite being executed?

In the server I've run:

```
$ php bin/console doctrine:schema:update --force

Updating database schema...

93 queries were executed

[OK\] Database schema updated successfully!
```

But once I executed the sql above once I run:

```
$ php bin/console doctrine:schema:update --dump-sql | head

ALTER TABLE xxx1 CHANGE expires_at expires_at DATETIME DEFAULT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL;

ALTER TABLE xx2 CHANGE name name VARCHAR(255) DEFAULT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE unique_identifier unique_identifier VARCHAR(255) DEFAULT NULL;

ALTER TABLE xx3 CHANGE denoscription denoscription VARCHAR(255) DEFAULT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL, CHANGE unique_identifier unique_identifier VARCHAR(255) DEFAULT NULL;

.....

```

Even if I execute manually:

```
LTER TABLE xxx1 CHANGE expires_at expires_at DATETIME DEFAULT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL;
```

`doctrine:schema:update` would output it once more why???

https://redd.it/1n6l2xm
@r_php
Would like to get some feedback on my first Symfony project!

Hey everyone, I wanted to learn symfony so I started working on a toy project - a self hosted filesystem app (like gdrive). It exposes an API for authentication and CRUD operations on files. I also used twig to build a small admin dashboard UI.

Need to mention, the project is not yet finished, I need to add a file sharing option and possibly some tests, and maybe the fronted (though the frontend is irrelevant for this), but it is a good time to get other's opinion on this.

I would love to get some feedback, especially on API design, security/authentication flow. Also this is the first time I used docker so I would appreciate some pointers for this too (are the containers structured well, is it good for easy self hosting?)

Also what improvements could I make to the project?

Thanks!

The project is available on github. Api docs is here

https://redd.it/1n6rhcb
@r_php
Been seeing more PHP gigs out there.

It seems like PHP gigs are coming out of hiding. This leads me to think of a great marketing slogan PHP:

PHP is like a Volvo or a Honda.... it's not sexy, but it is reliable, affordable, and it delivers what you need when you need it.

https://redd.it/1n6s3bf
@r_php
Would like to get some feedback on my first Symfony project!

Hey everyone, I wanted to learn symfony so I started working on a toy project - a self hosted filesystem app (like gdrive). It exposes an API for authentication and CRUD operations on files. I also used twig to build a small admin dashboard UI.

Need to mention, the project is not yet finished, I need to add a file sharing option and possibly some tests, and maybe the fronted (though the frontend is irrelevant for this), but it is a good time to get other's opinion on this.

I would love to get some feedback, especially on API design, security/authentication flow. Also this is the first time I used docker so I would appreciate some pointers for this too (are the containers structured well, is it good for easy self hosting?)

Also what improvements could I make to the project?

Thanks!

The project is available on [github\](https://github.com/darusc/Fileknight). Api docs is [here\](https://github.com/darusc/Fileknight/blob/main/API.md)

https://redd.it/1n6rhyn
@r_php
What would be the feature of PHP 9.0 that you would like the most?

I did not make a research of PHP 9.0 roadmap. I am just curious.

What feature you would like to have there the most?

https://redd.it/1n78l27
@r_php
Testing API's

Do you run tests against real APIs? If not, how do you usually check that the API is actually working in the tests, do you mock it, recreate the logic, or rely on something else?

Thanks

https://redd.it/1n7kdp9
@r_php
Scramble 0.12.31 – Laravel API documentation generator updated. Response headers documentation, static analysis for improved requests parameters documentation, OpenAPI compliant responses, and type inference improvements.
https://scramble.dedoc.co/blog/scrambledrop-scramble-01231

https://redd.it/1n81u0i
@r_php
🚀 Built a Free AI Headshot Generator with the TALL stack

Hey folks 👋

I just launched a side project that I built entirely with the **TALL stack (Tailwind, Alpine.js, Laravel, Livewire)** – it’s a **Free AI Headshot Generator**.

👉 Try it here: [https://gemsofai.com/tools/free-ai-headshot-generator](https://gemsofai.com/tools/free-ai-headshot-generator)

**What it does:**

* Upload a regular photo (or capture with camera)
* Generates a professional AI-enhanced headshot in seconds
* Free to use (with optional premium to buy more credits)

Your feedback is much appreciated.

Thanks a lot for checking it out 🙏

https://redd.it/1n8395t
@r_php
[Show & Tell] Larabuild – AI-powered Blade + Tailwind playground for Laravel developers

I’ve relaunched [Larabuild](https://larabuild.com), a side project I originally built as a “v0.dev-style” tool, but focused on Laravel + Livewire.

The idea is to save time when you’re an engineer who isn’t a designer: you describe what you want to build, and Larabuild generates **clean Blade + Tailwind v4 components** you can drop straight into your app.

What makes it different from generic AI UI tools:

* **Blade logic, not just HTML** – it generates loops, conditionals, and `@php $sample_data` blocks so you can see how your components will behave.
* **Two outputs** – • `generated_code`: the real Blade + Tailwind you can copy into your project. • `preview_code`: a safe, static HTML preview with sample data (no PHP execution).
* **Security first** – previews are sandboxed with a strict CSP and sanitisation (no noscripts, env/config/db calls, or other server-side access).
* **Project organisation** – give the AI context and keep generations grouped together.
* **Coming soon** – set brand colours/typography once and get consistent designs across components.
* **Learning Resource** \- It will eventually have a learning mode, teaching you best practices, rather than just throwing code at you.

Access:

* No signup required: 10 free prompts to try it immediately.
* Free account: 100 prompts each month.
* No paywall right now — just exploring whether this is something the community finds useful.

Would love to hear your feedback and impressions.

[https://larabuild.com](https://larabuild.com)

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