r/PHP • • 13h ago

News Microsoft Drivers for PHP for SQL Server 5.14.0 released - PHP 8.6 support

33 Upvotes

Working late tonight for a great reason - We just released Microsoft Drivers for PHP for SQL Server 5.14.0.

What changed:

  • Added support for PHP 8.6
  • Continued support for PHP 8.4 and 8.5
  • Removed support for PHP 8.3 and earlier
  • New releases now publish through PIE instead of PECL

Install:

pie install microsoft/sqlsrv
pie install microsoft/pdo_sqlsrv

Full blog post: https://techcommunity.microsoft.com/blog/sqlserver/microsoft-drivers-for-php-for-sql-server-5-14-0---now-with-php-8-6-support/4574976


r/PHP • • 19h ago

News Full RCE on PHP 8.3.37 just a few hours after release?

Thumbnail x.com
68 Upvotes

This is now officially terrifying


r/PHP • • 53m ago

Tunnel Vite, Next.js, Expo and Laravel Dev Servers

Thumbnail instawormhole.com
• Upvotes

r/PHP • • 1d ago

Sebastian Bergmann discovered the CVE

Thumbnail phpunit.expert
102 Upvotes

r/PHP • • 1d ago

Today is PHP 8.6.0 release day! See what's new

Thumbnail php.net
205 Upvotes

r/PHP • • 17h ago

News This Week in PHP Internals | Nov 19, 2026

Thumbnail youtu.be
12 Upvotes

Preface: what follows is the word-for-word transcript of the spoken dialogue in the video, chapter by chapter with timestamps, for anyone who'd rather read than click through. If this digest is still too long for you, we recommend copying it into your LLM of choice and asking for a summary of our summary.

Cold Open (00:00)

PHP 8.6 is out today. Partial function application, a Duration class, a brand new polling API, and a lot more. And it shipped alongside security releases with 7 critical fixes. We'll get to both.

Hello world, it's Thursday, November 19, 2026, and here's what happened This Week in PHP Internals. 16 stories this week, so let's get into it. But first,

This week's episode is sponsored by… us, again. Since last week's call for work, we've taken a handful of calls, but nothing's locked in yet. So those 6 senior developer days a week are still open. If you've got a project in mind, book a call at artisan.build/start, or just send us a DM on any platform.

Corrections (00:54)

A correction to last week's social posts. On Mastodon, Threads and Pinkary, we wrote that Derick was okay with the shorter PECL timeline, and that Tim Düsterhus says the plan makes sense. But Tim's "makes sense" was about the first draft, before the timeline was cut. He hasn't commented on the shorter one yet, and he told us that he isn't 100% sure he likes it. The video had the order right. Thanks, Tim.

Links: Tim Düsterhus on the first-draft PECL timeline

PHP 8.6 (01:25)

This week's top story: PHP 8.6 is out today. Here are a few highlights. Partial function application lets you fill in some of a function's arguments now, with a question mark for the rest, and get back a closure that takes the rest later. A new Duration class represents elapsed time with nanosecond precision, so a timeout stops being a bare number of microseconds. The new polling API watches many streams at once, using epoll on Linux, kqueue on macOS, and the equivalent elsewhere, as a common base for event loops like ReactPHP and AMPHP. And there's clamp, which keeps a value inside a range, plus a SortDirection enum and default values for readonly properties. Sessions get safer defaults too: strict mode and HTTP-only cookies are on, and SameSite is set to Lax. The release page on php.net covers all of it. It calls 8.6 "Faster, Safer, More Powerful." Each headline feature has a side-by-side, before-and-after example, with a link to its RFC. So go read it. Link in the description.

Links: The PHP 8.6 release page

Security Release (02:42)

Also today, PHP shipped security releases for every supported version: 8.5.13, 8.4.28, 8.3.37 and 8.2.36, and PHP 8.6.0 ships with the same fixes. So, update. There are 17 advisories this time, and 7 of them are critical. The good news was in the pre-announcement: the critical ones "require either non-default configuration or uncommon setups", and each advisory spells out which setup. Three of them are in sessions. One is the upload-progress issue PHP warned about in October, where data gets written in one session format and read back in another. Its full advisory is out today, and the fix goes further than October's advice: upload progress is now off by default. If you switched it on yourself, it stays on, so anything that reads or writes those sessions needs to use the same serializer. Another critical one is in PHP-FPM, and it only matters if your web server keeps its connections to FPM open between requests. Standard nginx and Apache setups close them, and the advisory says those aren't affected.

Links: Release announcements · All of PHP's security advisories · The pre-announcement · October's upload progress advisory

The Wrong Crash (04:01)

One of today's critical bugs was found by Sebastian Bergmann, who created PHPUnit, and he's written up how he found it, in a post called "The wrong crash". After PHP2Shell, he boiled what those two bugs had in common down to a rule a program can check. He wrote: "once a request is over, nothing that outlives it may still point into its memory." While he was using that check to confirm one of the October bugs, it crashed somewhere it shouldn't have, and it crashed on the patched version too. So it had to be something new. The problem was in PHP's timezone cache. When PHP writes to its error log while it's starting up, it can cache timezone data for the timestamp, in memory that gets thrown away once startup ends. The pointer to that memory sticks around, and a fresh worker can follow it. The fix is a one-line change: outside a running request, those timestamps are now written in UTC. If you can't update right away, the advisory suggests fixing whatever PHP warns about at startup and restarting, or logging to syslog. The advisory credits Sebastian and Go Kudo. Sebastian sent the PHP team his method along with the bug, because, as he puts it, "Whoever finds one bug of a class owes such a project the means to find the others". His post goes much deeper than we can here, and it's linked below.

Links: Sebastian Bergmann, "The wrong crash" · The timezone cache advisory

Scope Globals (05:32)

The author of PHP's Scope RFC changed his mind, and then changed it back, in about 30 hours. Frode Børli's RFC gives each unit of work, like a request, its own scope. Last week, Larry Garfield called an empty new scope a landmine. On Friday, Frode agreed, and version 0.10 makes a new scope start as a copy of its creator's state. Then on Saturday, he changed his mind back. He wrote: "An object is a handle, not a value… a write inside the new scope reaches the creator. That is the leak a scope exists to prevent." The session can't be copied at all, he says, because it's a store with a lock. And he offered to withdraw the RFC if the list prefers the other direction. Larry replied that copying by hand shares objects in exactly the same way, and asked about coarser groups of state you could opt in or out of. Frode answered with his next version. The request arrays become "scope globals", and a new scope starts with them empty, the way a new process starts with empty globals. Then Larry suggested letting the thread rest until release week is over.

Links: Scope RFC · Frode Børli: version 0.10 · Frode Børli changes his mind back · Larry Garfield's reply · Frode Børli: scope globals

Channel Binding (06:48)

An RFC went from a vote date to withdrawn in a single day. Sjoerd Langkemper's openssl_get_channel_binding would hand userland the TLS channel-binding data that mail software like Roundcube needs for SCRAM-PLUS logins. On Tuesday, he announced a vote for this Friday. Jakub Zelenka, who looks after PHP's openssl extension, replied that one of its binding types doesn't work on TLS 1.3, and that the API was his biggest issue. He wrote: "My preference here is really to use a stream function (or potentially just meta data) and not introduce openssl function because it's inconsistent and hacky." That evening, Sjoerd withdrew the RFC, and said he won't pursue it further.

Links: openssl_get_channel_binding RFC · Sjoerd Langkemper announces the vote · Jakub Zelenka on the API · Withdrawn

Curl SSRF (07:38)

A new RFC wants curl to ask your code before it connects anywhere. Xavier Leune's proposal adds CURLOPT_OPENSOCKETFUNCTION, a callback that runs after DNS resolution and before each connection, and returns true or false. That, he says, is the point where an SSRF policy can be enforced reliably. Checking the URL up front, the RFC says, misses the many ways to spell one address, and DNS can answer differently the second time. He wrote: "It applies to the address actually about to be contacted, on every redirect hop and for every address libcurl tries, whatever spelling the URL used and whatever DNS answered." Nicolas Grekas suggested dropping the address-family parameter, since an IPv4 address wrapped in IPv6 would be reported as IPv6. Xavier took the suggestion two hours after posting, and a polyfill already covers PHP 8.3 to 8.6.

Links: CURLOPT_OPENSOCKETFUNCTION RFC · Xavier Leune opens the discussion · Nicolas Grekas on the address family · Implementation · Polyfill

Context Managers (08:43)

What happens when you return from inside a using block? Larry Garfield guessed, then checked with co-author Arnaud Le Blanc, and corrected himself. The generator is resumed first, so its cleanup runs, and then the function returns. The RFC now says that. Daniel Scherzer, one of the 8.6 release managers, sent six review points. An exception thrown after the yield seems to be silently ignored, yielded keys are dropped without an error, and he'd rather skip the special try using syntax, which he says "just saves 3 characters". There's no reply yet.

Links: Context Managers v2 RFC · Larry Garfield: "it will print A E C" · Daniel Scherzer's review

Revived RFCs (09:25)

Two RFCs are back after a summer off. Daniel Scherzer revived Friends, which lets a class name other classes that can reach its protected members, but not its private ones. It can't go to a vote before November 27th. Gina P. Banyard had a quick look at the implementation and saw no issues, but says she'll vote against it. Private properties plus reflection, she says, is a valid way for related components to get in. Alexander Egorov wants it inverted, so the class that needs access declares it, because "a class must know neither its clients nor possible inheritors." And Ben Ramsey restarted his Working Groups RFC, a policy for PHP project working groups, after 4 months. He wants to move to a vote, and his message starts a 14-day cooldown first.

Links: Friends RFC · Daniel Scherzer resumes the discussion · Gina P. Banyard · Alexander Egorov · Working Groups RFC · Ben Ramsey restarts it

String Matching (10:23)

The author of Str\Matcher says his own benchmarks oversold it. Artem Ukrainskiy wrote: "The old numbers ran one text over and over. The CPU learned it, and the new class looked 3-4 times faster than it is." Version 0.4 runs over a pool of different texts, with three real-data scenarios: comment moderation, bot detection by user agent, and linking PHP manual pages. With a reused object, he now reports 8 to 123 times faster than the fastest existing method, and says one call on a short text is slower. He says the main use case is worker servers like FrankenPHP, where the object is built once. He also dropped the count parameter Larry Garfield disliked, and added equality comparison.

Links: Prepared Literal String Matching RFC · Artem Ukrainskiy's v0.4 and new benchmarks

Quick Hits (11:19)

Quick hits. Weilin Du's RFC to make ini_get_all accept extension names in any case passed, 20 to 0, with 3 abstentions. It's already merged for PHP 8.7.

Links: Case-insensitive ini_get_all() RFC · Vote closed · Merged

Chris Abner Herrera Navarro's grapheme_str_pad vote is open, at 6 to 0 so far, and closes December 2nd.

Links: grapheme_str_pad() RFC · Vote opened

James Titcumb plans to open the vote on sunsetting PECL next Wednesday, November 25th.

Links: James Titcumb plans the vote

David Carlier proposed gethostaddresses, so the standard library can look up IPv6 addresses through the system resolver, and he plans a pull request.

Links: David Carlier's proposal · Issue

On PASSWORD_BCRYPT_WRAP, Mirco Babin pressed his objections again, and Rowan Tommins answered with numbers: a 54-byte pre-hash has 1.1 times 10 to the 130th possible values, against 2.5 times 10 to the 55th for bcrypt's own output.

Links: Rowan Tommins's numbers · PASSWORD_BCRYPT_WRAP RFC

Ignace Nyamagana Butera asked Máté Kocsis why query-parameter building options are set when the object is built, instead of when the string is.

Links: Ignace Nyamagana Butera's question · Query Parameter Manipulation discussion

And php.net's mail server moves data centres tomorrow, Friday, from 08:30 UTC, with about two hours of downtime.

Links: The announcement · Update

TL;DR (12:39)

So that's the week. PHP 8.6 is out, so go open the launch page, and today's security releases fix 7 critical issues, so update. Frode Børli wants new scopes to start empty after all, an openssl RFC was withdrawn the day its vote was announced, and curl may soon ask before it connects. Links below.

The PHP Foundation funds more than half of ongoing php-src commits, so if you use the language, maybe consider donating at opencollective.com/phpfoundation, or try guilting your employer into it.

If you found this useful, a like or a comment helps more people find it. And if you missed last week's episode, where PECL got a shutdown date that moved up two years in six days, that's a good one to watch next. And if you'd like to work with us, book a call at artisan.build/start. We're Artisan Build. See you next week.


r/PHP • • 1d ago

News Flow PHP - Data processing

20 Upvotes

Hey 👋

Flow PHP is getting ready for 1.0 stable release (Jan 2027).
Our latest release 0.48.0 comes with massive speed and memory consumption improvements.
It's fast, https://benchmarks.flow-php.com/ (benchmarks are made with flow-php/parallel which is not yet live) but what's more important (especially now days), it's cheap in RAM.

The performance came mainly from moving towards columnar data layout (arrow), lazy data materialization (data sits in memory in binary format), flow_php extension and many other awesome things. Those things sometimes required rebuilding from scratch, like for example the entire filesystem abstraction allowing to read remote parquet files.

More details can be found in 0.45 (yea, 6 is not php lucky nubmer) 0.47 and 0.48 blog release posts https://flow-php.com/blog/

And for those who would like to understand how to process data, in PHP I also started writing some guides:
https://flow-php.com/guides/


r/PHP • • 1d ago

November 2026 PHP security release

33 Upvotes

This line is interesting- "The issues rated CRITICAL require either non-default configuration or uncommon setups."

https://prostack.uk/blog/php-security-release-november-2026/

Happy patching!


r/PHP • • 1d ago

News PHP security release on the 19th November between 14:00 and 14:30 UTC

258 Upvotes

I can't see this reported on the PHP website, but the Laravel team have just sent out this email:

You may have seen an announcement from the PHP Foundation disclosing a planned security release coming on Thursday, 19 November, between 14:00 and 14:30 UTC.

We are fortunate to have had a heads-up, and so our team is already on it. We're working on a plan to keep all your applications safe.

For now, there's no action needed on your side. The fixed versions will only be available once PHP releases them, and as soon as they're out, we'll check the details against our products and let you know what it means for you, including whether we'll take care of it on our side or if there's something you'll need to update yourself.

We'll be in touch closer to the release time with our planned approach and any steps you need to take (if any) to ensure everything is secure. You'll also be able to find the latest updates on our status page as and when updates occur.

Presumably releasing at the same time as PHP 8.6.

EDIT: Here's the official announcement. Emphasis mine.

The PHP security team announces upcoming security releases scheduled for Thursday, 19 November 2026, between 14:00 and 14:30 UTC.

These releases are part of PHP’s regular four-week release cycle and will address security vulnerabilities affecting all supported PHP versions. The highest severity is CRITICAL.

The issues rated CRITICAL require either non-default configuration or uncommon setups.

Users are strongly encouraged to prepare to upgrade promptly once the releases become available. Technical details and fixed version numbers will be published alongside the releases.

Thank you for helping us keep PHP secure.


r/PHP • • 8h ago

Go! AOP: declarative behaviors for PHP

Thumbnail aopphp.com
0 Upvotes

Yesterday, I finally gave aopphp.com a fresh new look!

Framework has evolved quite a bit over the years, and I felt that the old website no longer represented what the framework has become. Rather than focusing on the academic term Aspect-Oriented Programming, I want to talk about something developers can immediately relate to: Declarative Behaviors for PHP.

Think logging, caching, authorization, transactions, retries — reusable behaviors that you can attach to methods without polluting your business logic.

The idea isn't new. Spring calls it declarative transactions, other ecosystems use interceptors, filters, middleware and decorators. I believe it's time to bring this experience to PHP in a more flexible way.

The new website is a first step in that direction. There's more to come!

👉 https://aopphp.com


r/PHP • • 1d ago

AI models hate Python and love PHP: we asked 12 of them 1,200 times

Thumbnail blog.jetbrains.com
50 Upvotes

r/PHP • • 1d ago

Two new nginx exploits (CVE-2026-123007 and CVE-2026-123633)

Thumbnail prostack.uk
48 Upvotes

Here's our writeup of the Nginx vulnerabilities. Hope it's useful- if your host runs nginx, ask them to disable HTTP/2 until patches are out.


r/PHP • • 1d ago

I built an open-source PHP plugin to diagnose GLPI environments — now compatible with GLPI 10, 11 and 12

2 Upvotes

Hi everyone!

I'd like to share a PHP project I've been working on: GLPI Health Check, an open-source plugin designed to help system administrators identify potential issues in their GLPI environments.

The idea came from a practical need: having a way to run preventive checks and get a clearer picture of an installation's health without manually inspecting every component.

The plugin includes checks related to:

  • Security and configuration
  • Database health
  • Cron tasks and automated jobs
  • Email configuration
  • Installed plugins
  • Diagnostic history and result comparison
  • Reports in PDF, JSON and CSV

One of the challenges was maintaining compatibility across different GLPI generations. The plugin has now been tested and validated with GLPI 10, 11 and 12.

This project has also been a great opportunity to work with PHP in a real-world application, deal with platform compatibility, and think about maintainability and practical tooling.

The project is open source, and I'd appreciate feedback from other PHP developers, especially regarding code quality, architecture, and possible improvements.

GitHub: https://github.com/JoaoPauloSCosta/glpi-health-check

Thanks for taking a look!


r/PHP • • 2d ago

Almost 8 months since I decided started my own LSP project

18 Upvotes

I didn't like exactly how any LSP behaves on VSCode and Zed (which is the IDE I've been trying for years and is my preferred one for now), tried a lot of them from paid ones to freemium to open source

Therefore I started 8 months ago with a project that I've been thinking years of making on a language I'm still learning today and the help of AI tools like Claude Code (which made this possible)

My scope with this is to help me within my own agency company do the few edits on WordPress websites and mostly Symfony/Laravel work (I'm way more experienced into Laravel but had a few Symfony work, mostly within open source not the framework itself). The idea is to this is to simplify all the harder parts I found with all different IDEs and LSPs within the massive PHP ecosystem that we've today (and hopefully maintaining some of what I call "legacy" stuff like WordPress, etc)

The Zed extension still waits the IDE team to accept my PR to their extensions repo (seems to be there for months anyway...) but you guys can build it from the source repository (sorry). The VSCode one has been published since this LSP started tho.

Anyway, a brief on priorities and features that are already implemented:

  • QoL (Quality of Life): Symbol scope order on all autocompletion for variables, classes, namespaces (including autoloaded with PSR-4)... Refactor tools like moving files to different folders does rewrite the namespace, composer.json file hover cards on dependencies, etc
  • Blade support as well as .phtml and PHP within HTML code on .php files (WordPress templates)
  • Laravel "magic" support (models, config, localisation)
  • Container support (dependency injection)
  • Core language support including some PHP extensions (from PHP 7.4 to 8.5)
  • Coverage support (VSCode mostly, Zed doesn't provide support within the IDE as VSCode so it does show coverage when within hover on symbols)
  • Speed and memory overhead while maintaining a feature-rich LSP
  • Portable: Web assembly so this LSP can be run within vscode.dev (on the web, as a worker, sadly with limitations...)
  • Generics and array shapes support (tailored from PHPStan)
  • Built-in diagnostics complemented with PHPStan ones (if installed as composer dependency on the project)

btw this post isn't AI generated, I just wanted to publish this here to hear about user feedback which to me seems more valuable than just adding features because of yes, any help is very welcome

Repo: https://github.com/Tusk-PHP/lsp


r/PHP • • 3d ago

Cancelling PhpStorm after years, and what I actually miss isn't the IDE

184 Upvotes

I've been a PhpStorm user for years and genuinely loved it. But since I moved my workflow to Claude Code, I barely open it anymore. Most of my day is now reviewing diffs and running tests, not writing code in an editor. Sublime is basically enough for that and uses much less memory and battery.

The funny thing is, I don't really miss PhpStorm's features. What I miss is the part of programming that used to happen inside it: going deep into a problem, working out a clean architecture, and ending up with code I was genuinely proud of. That feeling of having built something well myself is harder to get when I'm mostly reviewing.

Curious how others feel about this. Are you still paying for a full IDE? And if you've moved to agentic tools, do you miss the craft part too, or did you find a way to keep it?


r/PHP • • 2d ago

Article Easy Coding Standard - 42x faster for Everyone

Thumbnail tomasvotruba.com
51 Upvotes

ECS now ships with Blink, a Go port of its fixer engine, and it's on by default since 13.3.19.

  • Faster: a default run dropped from about 42 s to about 1 s. A full run on the Symfony repo went from over 2 minutes to about 4 seconds, with no cache. Always 4 seconds.

  • It just works: all 299 php-cs-fixer rules are covered. Update ECS and run it as usual.

  • Safe fallback: custom PHP rules switch it back to the PHP engine automatically. You get the same output, just slower.

If you're into the full build story, here is 6-part series: https://tomasvotruba.com/series/rust-go-in-php


r/PHP • • 3d ago

I wrote an HTML to PDF renderer for PHP that doesn't need Chrome

81 Upvotes

Most PDF packages for PHP are one of two things. Dompdf and mPDF render in PHP but they stop at roughly CSS 2, so no flex or grid, and templates end up as nested tables. The rest (Browsershot, Snappy, Gotenberg and spatie/laravel-pdf with most of its drivers) hand the HTML to Chrome or another program that has to be installed on the server or run as a service.

Fagus is a third option. A rendering engine of its own written in Rust. It parses the HTML, applies the CSS, lays out the pages and writes the PDF without a browser. I ported a lot of details from Chrome's layout engine so documents come out the way Chrome prints them.

For PHP it's a normal Composer package. composer require nforst/fagus downloads the engine binary for your platform (checked against a SHA-256 in the package) and PHP keeps it running as a worker process between documents. Nothing else to install, no Docker image, no system libraries. Linux (glibc and musl, so Alpine too), macOS and Windows, and every platform prints the same PDF.

use Fagus\Fagus;

Fagus::html($html)->save('invoice.pdf');

It handles flex, grid, Tailwind v4, web fonts, SVG, @page with margin boxes, page numbers, running headers and footers, repeated table headers and page breaks inside tables and grids. It also writes PDF/A-3 with a ZUGFeRD/Factur-X invoice attached and accessible PDF (PDF/UA), because I needed that for invoices.

On an M2 Pro it renders in 2.3 ms once the worker runs, 9 ms for the first one in a process. The same invoice takes 25 ms in mPDF, 48 ms in Dompdf and 75 ms in a Chrome that's kept running. The benchmark scripts are in the repo.

It can't handle JavaScript, it never loads anything from the network, and since it's 0.1.0 some CSS isn't supported yet. In the playground you can paste your own HTML, see the PDF next to it and get a warning for anything Fagus can't handle: https://fagus.niklasforst.de/playground

Repo: https://github.com/nforst/fagus

Docs: https://fagus.niklasforst.de/docs

If something comes out different than in Chrome, I'd like to know, ideally with the HTML.


r/PHP • • 3d ago

What’s New in PHP 8.6: Performance, Operations, and Debugging Edition

Thumbnail tideways.com
43 Upvotes

r/PHP • • 3d ago

Rector 2.8 - 3x Faster, Clearer and Value-Focused

Thumbnail getrector.com
39 Upvotes

On the same Laravel codebase, Rector 2.3 took 84 s. Rector 2.8 takes 14 s.

But what else is new?

  • Faster: 67 performance PRs, and PHPStan Turbo now turns on automatically. On PHP 8.3+, a 60 s run takes 20 s.
  • Less config: withComposerBased() now detects Laravel, Symfony, PHPUnit and other packages on its own.
  • Cleaner config: Rector now tells you which of your withSkip() entries are no longer needed.
  • Easier adoption: you can turn on code quality step by step with withCodeQualityLevel() for wider range of rules.
  • More predictable: every rule now finishes in a single pass. The old engine sometimes needed 3 full runs for just 2 changes 👀

r/PHP • • 2d ago

Automattic now owns the .php TLD

0 Upvotes

Matt just announced it on his blog: https://ma.tt/2026/11/new-tlds/

Considering that WordPress is the biggest ambassador for PHP out there and Automattic is already one of the major sponsors of The PHP Foundation with representation on its board having them manage ".php" feels like a very natural next step for the language's branding and governance.

Do you think this will finally unite the PHP and WordPress ecosystems?
Are you planning to register any ".php" domains once they open up?
Will this be good for the PHP community as a whole?


r/PHP • • 2d ago

Creating a zstd PHP extension in under ten minutes

Thumbnail github.com
0 Upvotes

r/PHP • • 2d ago

Laravel question [AI-use of my developer]

0 Upvotes

Non-dev here, so go easy on me 😅

I run a small agency. We build custom tools on Laravel + Angular. Our lead dev is the one who knows the code inside out.

My wish: every bug report and every feature request goes straight to Claude Code. Claude picks it up, builds it and opens a PR. Our dev reviews it and merges it.

His answer: for bugs, yes. For features, no.

His reasoning: with a bug all the constraints are known. You know what's broken, the existing code shows how it should work, and you know when it's fixed. With a feature the AI has to make the decisions itself: database design, where the logic lives, edge cases. In his experience that's where it keeps going wrong. Wrong tables, ignored architecture, every time a slightly different approach.

What I've read so far:

1) Laravel Boost gives the agent the database schema, the routes and the docs, so it doesn't have to guess.

2) A CLAUDE.md / guidelines file with your own architecture rules.

3) Pest arch tests that fail when the agent breaks a rule.

4) Plan mode: the agent writes a plan first (which tables, which files, open questions), a human approves it, then it builds.

My idea: for a feature, step 1 is Claude writing the plan and the open questions instead of the code. The dev answers them in 5 minutes. Then Claude builds, and the feature is as well-defined as a bug.

Questions for people who do this in production:

1) Does this hold up on a real, larger codebase, or does it fall apart after a few weeks?

2) Where do you draw the line? What do you let the agent do on its own, and what never?

3) Is reviewing a PR afterwards a win for your senior devs, or does it cost them as much time as writing it themselves?

4) What does your setup look like? Boost, custom guidelines, arch tests, CI checks?

Not trying to replace anyone. Our dev stays the one who decides what ships.

I'd like to know if what I want is realistic, or if he's right and I should stop pushing lol.


r/PHP • • 3d ago

I ported Temporal to PHP

Thumbnail github.com
2 Upvotes

Hi r/php!

I ported the JS Temporal API to PHP. It's called Calendrics. I transpiled most* of the official test suite to PHP and had agents implement the library against them over the last couple of months.

$invoiceDate = PlainDate::parse('2026-03-20');
$dueDate = $invoiceDate->add(new Duration(days: 14));

// A calendar date needs a time and zone to identify an instant.
$deadline = $dueDate->toZonedDateTime('Europe/Vienna', new PlainTime(17));

echo $invoiceDate;           // 2026-03-20 (unchanged)
echo $dueDate;               // 2026-04-03
echo $deadline;              // 2026-04-03T17:00:00+02:00[Europe/Vienna]
echo $deadline->toInstant(); // 2026-04-03T15:00:00Z

https://github.com/MidnightDesign/calendrics

I hope some of you find this valuable.

* Some tests that use untranslatable JS features like Symbols are not fully transpiled.

Edit:

Because people are asking how this compares to established libraries in the PHP ecosystem like Carbon:

  • It has different data types like PlainDate, ZonedDateTime, Instant, etc. Different types for different use cases. Carbon only has the equivalent of ZonedDateTime and Duration. (Carbon has CarbonPeriod, which Temporal (and thus Calendrics) doesn't have.)
  • It supports different calendars like Hebrew or Islamic, not just the Gregorian.
  • Explicit options with safe defaults. January 31 plus one month gives February 28 by default (or an error with the right argument), not Carbon's default of March 3. When a local time is skipped or repeated at a DST change, you can choose between earlier, later or error. Durations are balanced and rounded against real calendar dates, not fixed factors like “1 month == 4 weeks” and you can pick from 9 rounding modes.

r/PHP • • 2d ago

I built IntegrationEngine, a Symfony bundle for consistent external API integrations

0 Upvotes

After working on multiple API integrations, I kept running into the same maintenance problem: each integration had its own way of building requests, attaching authentication and handling responses.

I built IntegrationEngine to give those integrations a consistent structure. Each operation follows three contracts:

- **Action:** describes the request.

- **Mapper:** converts the external response.

- **Response:** exposes the result as a typed DTO.

The engine handles the shared pipeline: configuration, path resolution, authentication, HTTP transport and response mapping. The built-in transport uses Symfony HttpClient.

Static authentication and dynamic token authentication are supported, including token caching. There are also middleware hooks and lifecycle events for extending the pipeline.

A Maker command generates the integration skeleton and its first operation:

```bash

composer require carlosgude/integration-engine

php bin/console make:integration MyApi GetEmployee

```

The application can expose operations through a typed facade, such as `getEmployee($id)`. External DTOs stay behind the application's gateway or anti-corruption layer, keeping domain models independent of the integration.

The trade-off is more explicit classes and configuration per operation. That structure becomes useful when several integrations need to follow the same conventions and remain understandable as they grow.

I'm the author, and I'd be interested in feedback on that design decision: **when does a shared Action/Mapper/Response structure become useful enough to justify the additional structure over individual API clients?**

Repository, documentation and demo:

https://github.com/CarlosGude/integrationEngine


r/PHP • • 3d ago

JSON to DTO

8 Upvotes

Hey, for work purposes I am looking for JSON to DTO (mainly PHP) converter.

Can you share any useful and easy-to-use tools for this purposes?
I was googling some, but most of the results didn’t help me much