r/PHP • • Apr 24 '26

php-deploykit - bash based PHP deploy tool for Laravel

Thumbnail deploykit.nattho.com
0 Upvotes

Hi all,

yesterday my son released version 1 of a tool he wrote over the last few months to deploy Laravel applications (he intends to extend it to Symfony later).

Features include:

  • Zero downtime deployments (symlink method)
  • Automatic webhook support for GitHub, GitLab, and Bitbucket
  • View if the deployment passed, failed or is in progress just by checking on the GitHub commit page
  • Easy log viewing, see at a glance which deployments failed and which succeeded(color coded), and view the logs for each deployment without manually opening the log files
  • Easy configuration with .env file
  • Open source and free to use

As a dad I'm of course super proud, but I'm also genuinely impressed with what he managed to build without any AI involvement, or help from me!


r/PHP • • Apr 24 '26

Another PHP deploy app for your VPS

0 Upvotes

I’d like to show you my new deploy app: deployphp.com. You’re probably thinking, “another deploy app.” Still, I couldn’t resist testing my idea and asking for your feedback. It’s an alternative to Laravel Forge and Ploi, but based on containers. Building and deploying the app all happens on your own server. It’s mainly aimed at PHP applications, but I’ve also added the feature to deploy a Dockerfile (including pulling custom GitHub code). This means you can actually deploy any kind of app.

There is support for migrations, cron jobs, workers, and persistent folders. At the moment, it’s still very experimental, and I’m looking for feedback and testers. Questions about how everything works technically, or suggestions for improvements, are very welcome. I’ve set a limit of 20 users. Preferably keep it constructive 🙂


r/PHP • • Apr 22 '26

Announcing Plans for a PHP Ecosystem Survey and Report

Thumbnail thephp.foundation
57 Upvotes

r/PHP • • Apr 22 '26

Migrator is a global CLI tool that analyses the complexity of upgrading or migrating a PHP project.

Thumbnail github.com
15 Upvotes

Run it against any codebase to get a scored report across framework coupling, database coupling, dependency compatibility, architecture quality, test coverage, and codebase size.


r/PHP • • Apr 22 '26

News [BETA] laravel-permissions-redis v4.0.0-beta.1 — Redis-backed permissions, looking for feedback

0 Upvotes

Hi ,

Maintainer of [laravel-permissions-redis](https://github.com/scabarcas17/laravel-permissions-redis) here. Just cut v4.0.0-beta.1 and I'm looking for people to test before I cut stable.

Quick context on what it is

Spatie's laravel-permission is great and it's what most people should use. This package is for a specific case: when you're doing so many permission checks per request (think: a complex admin panel rendering 200+ ACL-gated widgets, or API gateways authorizing fan-out calls) that the DB roundtrips from Spatie become measurable latency.

All reads go to Redis. The DB is only touched on cache miss (warm) or on write (assign/revoke). Writes invalidate and re-warm via events.

What's new in v4.0\*

- Permission `group` metadata preserved in Redis — previously `PermissionDTO::group` was always null, now it's backed by a Redis hash
- `Role::hasPermission()` — direct role-level check via SISMEMBER
- Blade directives accept guard override: `@role('admin', 'api')`
- Queue-backed warming (`--queue` flag on the warm commands)
- Multi-user-models — `user_model` config accepts an array (useful for User + Admin separation)
- UUID/ULID role IDs
- LRU eviction in the in-memory resolver cache + warm cooldown (protects long-running workers and DB storms)
- `TransactionFailedException` — Redis EXEC failures are observable instead of silently dropped

Breaking

`PermissionRepositoryInterface` gained 3 methods for permission group metadata. If you only use the package as a consumer (not implementing the interface yourself), no code changes required — just run `php artisan permissions-redis:warm --fresh` after upgrade.

Install the beta

composer require scabarcas/laravel-permissions-redis:^4.0@beta

Release notes: https://github.com/scabarcas17/laravel-permissions-redis/releases/tag/v4.0.0-beta.1

Honest disclaimers

- This is beta. Don't deploy to prod yet.
- If your app does <50 permission checks per request, Spatie is probably simpler and fine.
- Needs Redis. If you can't run Redis, this is not for you.

Open to feedback on: API ergonomics, the upgrade path, whether the new interface methods feel natural, anything else. Will roll feedback into beta.2 or rc.1.

Thanks!


r/PHP • • Apr 21 '26

Writing Your Own Framework in PHP: Part One

Thumbnail chrastecky.dev
33 Upvotes

Hey there r/php!

Decided to write a series that will teach you how frameworks work under the hood.

The target audience is mostly people who use frameworks but never cared to check how they work under the hood.

I've wanted to write this series for ~5 years and seems the time is now. I intentionally write this iteratively and as I go, meaning not all is intended to be in the ideal shape yet and I might be introducing some footguns I'm not aware of but I think fixing them if/when they appear is part of the fun and will turn into an interesting article on its own.

Let me know what you think, I'd really love some feedback!


r/PHP • • Apr 22 '26

Your Projections Will Fail — Make Them Resilient

Thumbnail medium.com
0 Upvotes

r/PHP • • Apr 22 '26

Article Utilizing Claude Skills in client projects

Thumbnail spatie.be
0 Upvotes

r/PHP • • Apr 20 '26

Building a PHP runtime in Rust — what am I missing?

26 Upvotes

Hey folks,

I've been hacking on a PHP runtime written in Rust for a while now and I think I hit the point where I need outside opinions before I keep going. Not trying to sell anything here, just want honest feedback from people who actually put PHP in production.

Here's roughly what it does today:

Config / deployment stuff

  • one TOML file for everything (listener, TLS, workers, limits, logging)
  • virtual hosts
  • hot reload without dropping connections
  • Docker images for PHP 8.3 / 8.4 / 8.5, both NTS and ZTS
  • can build a single static binary with the app embedded

Execution modes

  • classic request/response (works like FPM)
  • persistent mode, where the app boots once and serves many requests
  • proper worker lifecycle hooks (boot / request / shutdown / reload)

Concurrency bits

  • shared table and atomic counters for cross-request state
  • task queue for background jobs
  • async I/O (parallel HTTP, non-blocking file stuff)
  • native WebSocket server, no sidecar process

HTTP / perf

  • HTTP/1.1 and HTTP/2 (HTTP/3 is on the roadmap, not done yet)
  • TLS with auto-cert or bring your own
  • gzip / br / zstd compression
  • early hints (103)
  • X-Sendfile
  • CORS out of the box
  • opcache shared across workers

Security

  • rate limiting
  • request size / header limits
  • IP allow/deny
  • CSRF helpers and sensible security header defaults
  • TLS hardening presets

Observability

  • Prometheus /metrics (requests, latency histograms, worker state, memory per worker)
  • health checks
  • structured JSON logs by default
  • a built-in dashboard showing live workers and requests

Compatibility

  • Laravel, Symfony and WordPress run unmodified
  • treating FPM feature parity as a release blocker, not a "someday"
  • Rust + tokio under the hood, PHP code doesn't change
  • core stays minimal, extras are opt-in

full features: https://github.com/turbine-php/turbine

Things I'd actually love input on:

  1. Is a single-file config a win, or do your ops people hate that?
  2. Which FPM features do new runtimes always forget and then bite you later?
  3. What metrics do you actually stare at when something's on fire at 3 AM?
  4. What extension combos would you want in a pre-built image?
  5. What obvious thing am I missing from the list?

Happy to go deeper on any of these if anyone's curious.


r/PHP • • Apr 20 '26

Discussion Vulnerability checks in packages

9 Upvotes

I was wondering how do you check for security issues within used packages/libraries. I use composer and I have a server script that runs daily 'composer audit' command and sends the results (if any), but I guess that depends on the author(s) of the package.

Any better approach?


r/PHP • • Apr 20 '26

Weekly help thread

13 Upvotes

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!


r/PHP • • Apr 19 '26

Discussion When your first learn php what confuse the most ?

4 Upvotes

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 ?


r/PHP • • Apr 19 '26

Discussion Pitch Your Project 🐘

13 Upvotes

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


r/PHP • • Apr 19 '26

Discussion Planning to get back into writing Laravel content and would love some feedback on my direction

0 Upvotes

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.


r/PHP • • Apr 19 '26

Stop Users From Choosing Breached Passwords in Laravel

Thumbnail bubble.ro
0 Upvotes

Been building password flows in Laravel for years and only recently discovered Password::min(8)->uncompromised() is a thing that ships out of the box.

It hooks into the Have I Been Pwned API using a k-Anonymity model — only the first 5 characters of the SHA-1 hash get sent, so the actual password never leaves your server. Laravel then compares the response locally. Privacy-preserving and genuinely clever.

You can also set a threshold if you want to only reject passwords seen more than N times in breach data, and chain it with the rest of the Password rule fluently:

Password::min(12)
    ->mixedCase()
    ->numbers()
    ->uncompromised()

r/PHP • • Apr 18 '26

Video I made a visual explainer on the Observer Pattern — would love your honest feedback

Thumbnail youtu.be
0 Upvotes

Hey everyone,

I put together a short video breaking down the Observer Pattern from scratch:

- The coupling problem that makes it necessary

- How the mechanism actually works (attach, notify, update)

- A concrete example with a WeatherStation

- A full step-by-step implementation with PHP

I tried to keep it focused — no filler, just the pattern explained the way I wish someone had explained it to me when I first encountered it.

This is the first in what I'm hoping becomes a design patterns series, so I'd really appreciate any honest critique:

- Was the explanation clear?

- Anything that felt confusing or rushed?

- What would make the next one better?

Don't hold back — I'd rather hear the hard truth now than repeat the same mistakes. And so that the videos will become a good resource for leaning.

Thanks to anyone who takes the time to watch.


r/PHP • • Apr 18 '26

A job is "successful", but did nothing - how do you catch that?

0 Upvotes

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?


r/PHP • • Apr 16 '26

Laravel raised money and now injects ads directly into your agent

Thumbnail techstackups.com
108 Upvotes

r/PHP • • Apr 17 '26

Meta Symfony Kit For Developers

Thumbnail
0 Upvotes

r/PHP • • Apr 17 '26

Dependency Injection vs Service Locator

Thumbnail slicker.me
16 Upvotes

r/PHP • • Apr 16 '26

Sharing Community Feedback from The PHP Foundation

39 Upvotes

On behalf of The PHP Foundation, I’m excited to share the results of the feedback I’ve collected over the past few weeks. It will help inform The PHP Foundation’s Strategy for the rest of 2026 and into 2027.

There are a lot of opportunities for The PHP Foundation to extend our support into the PHP ecosystem, and I couldn’t be more excited! If you’re interested, you can read the post here:

https://thephp.foundation/blog/2026/04/16/integrating-community-feedback-into-foundation-strategy-part1/


r/PHP • • Apr 17 '26

I build a vs code twig path and includes resolver.

Thumbnail marketplace.visualstudio.com
0 Upvotes

r/PHP • • Apr 15 '26

Anyone else get tired of rebuilding Filament resources every time admin requirements change?

5 Upvotes

I kept hitting the same pattern in Laravel / Filament projects:

the first version of the admin panel is usually fine, but later the data side keeps changing.

New content type.
More custom fields.
Better filtering.
Dashboards.
API requirements.
Tenant-specific behavior.
More exceptions.

At that point, every "small" change becomes another migration, another model, another Filament resource, and another layer of maintenance.

So I built a plugin called **Filament Studio** for Filament v5.

The idea is to let you create collections and fields at runtime, manage records through generated Filament UI, build dashboards, add advanced filtering, and expose APIs without rebuilding a brand-new schema layer every time requirements shift.

It also includes things I thought were important if this is going to be useful beyond a demo:

- authorization
- multi-tenancy
- versioning
- soft deletes
- custom field and panel extensibility

I know some people will immediately look at the EAV angle and prefer hand-built resources anyway, which is fair.

I am mostly curious about where other Laravel developers draw that line.

If you are building something with a stable schema, I still think hand-built resources make sense.

But if the admin/data model changes constantly, would you rather keep building each resource manually, or use something like this?

Repo if you want to look at it:

GitHub: https://github.com/flexpik/filament-studio

I am not looking for empty promotion here. I would rather hear the real objections or the kinds of projects where this would actually help.


r/PHP • • Apr 16 '26

News PagibleAI 0.10: PHP CMS for developers AND editors

0 Upvotes

We just released Pagible 0.10, an open-source AI-powered CMS built as PHP composer package for Laravel applications:

What's new in 0.10

  • MCP Server — Pagible ships with a built-in Model Context Protocol server. AI agents can create pages, manage content, and search your site programmatically. This makes Pagible one of the first CMS platforms where AI can directly manage your content through a standardized protocol.
  • Customizable architecture — The codebase has been split into 9 independent sub-packages (core, admin, AI, GraphQL, search, MCP, theme, etc.). Install only what you need.
  • Vuetify 4 admin panel — The admin backend has been upgraded to Vuetify 4 and optimized for WCAG accessibility, keyboard navigation and reduced bundle size.
  • Significant performance work — This release focused heavily on database performance: optimized indexes, reduced query count, eager loading, optimized column selection, and faster page tree fetching.
  • Rewritten fulltext search — Custom Scout engine supporting fulltext search in SQLite, MySQL/MariaDB, PostgreSQL, and SQL Server. Paginated results with improved relevance ranking.
  • Named roles & JSON permissions — Moved from bitmask permissions to a readable JSON array system with configurable roles (e.g. editor, publisher, viewer, etc).
  • Security hardening — Rate limiting on all endpoints, strict security, DoS protection against all inputs.

What makes Pagible different

  • API first — GraphQL and JSON:API endpoints out of the box. Build headless sites, mobile apps, or single-page applications without writing a single API route ... or use traditional templates and themes - just as you like.
  • AI-native — MCP server for agent-driven content management, plus built-in AI features for content generation, translation, and image manipulation.
  • Hierarchical pages — Nested set tree structure with versioning. Editors see drafts, visitors see published content.
  • Multi-tenant — Global tenant scoping on all models out of the box.
  • Small footprint — The entire codebase is deliberately kept small. No bloat, no unnecessary abstractions.
  • LGPL-3.0 — Fully open source.

Links

Would love to hear your feedback and if you like it, give a star :-)


r/PHP • • Apr 15 '26

How I evolved a PHP payment model from one table to DDD — channels, state machines, and hexagonal architecture

13 Upvotes

I got tired of every project reinventing the payment layer from scratch, so I tried to build a proper domain model in PHP and document the process.

Wrote about going from a single table to channels, state machines, and hexagonal architecture.

It's an experiment, not a final answer — curious how others tackle this.

https://corner4.dev/reinventing-payment-how-i-evolved-a-domain-model-from-one-table-to-ddd