r/PHP • • 16h ago

GitHub - hazyhaar/php127: Standalone, zero-alloc PHP 8.4 runtime with in-process HTTP, PDO & Fiber support (Pure Go, Zero CGO)

Thumbnail github.com
0 Upvotes

r/PHP • • 11h ago

Ark: PHP versions and databases per project, natively and without Docker (pre-1.0)

0 Upvotes

Hi r/PHP, I made Ark, a local development environment that runs projects natively, with no Docker, containers or VMs. It is pre-1.0 (v0.10.0) and I'd like feedback from PHP developers.

Each project declares what it needs in an ark.yml: the PHP version, the services (Postgres, MySQL, MongoDB, Valkey, Memcached, Meilisearch, Typesense, ClickHouse, MinIO, Mailpit) and any processes. Park a folder and every project in it is served at https://<name>.test with a trusted certificate. Without an ark.yml, Ark reads the version files already in the repo, composer.json included, and serves a Laravel or Symfony tree with PHP-FPM.

The short demo is a small plain-PHP page reading from Postgres. With the folder parked it is:

ark up ark open

Ark runs other languages too (Node, Python, Go, Java, Ruby and .NET), which is handy if a project has a front-end build next to the PHP.

New in v0.10.0: ark mcp install connects Ark to Claude Code, Cursor, VS Code or Claude Desktop, so your AI assistant can link a project, add Postgres, create the database and run the migrations for you. Anything destructive, like migrate:fresh, asks you first.

The Mac build is Apple silicon only. Linux packages exist, with rough edges in first-run setup.

The Windows installer is signed and on the same download page; it is new and not widely tested, so expect rough edges, and SmartScreen may still ask before it runs.

Ark is closed source with a free tier. Pro is £79 a year for 2 devices and starts with a 14-day evaluation. Downloads for Mac, Windows and Linux: https://ark.cloudbluedigital.co.uk With Homebrew: brew install --cask cloudblue-digital/tap/ark

Let me know how you get on if its good or bad. Either message me or share feedback here.


r/PHP • • 13h ago

One PHP config now compiles to GitHub Actions, GitLab CI, Bitbucket Pipelines and CircleCI

2 Upvotes

I kept maintaining almost-identical pipelines on two providers and watching them drift.

Slipway compiles config/slipway.php to the YAML for every driver you enable. A slipway-guard job fails CI if the committed YAML no longer matches the config.

Tiny example:

'drivers' => ['github' => true, 'circleci' => true],
'php' => ['8.4', '8.5'],
'stages' => [
'quality' => ['pint', 'larastan', 'composer-audit'],
'test' => ['matrix' => true, 'steps' => ['pest' => ['services' => ['mysql']]]],
],

https://github.com/usamamuneerchaudhary/laravel-slipway

If you actually run CircleCI for Laravel, I'd like to know what the generated config.yml gets wrong.


r/PHP • • 5h ago

I built a desktop app in PHP: Stargazer 0.10

10 Upvotes

For the last year or so, in my spare time I've been researching how to use PHP differently. Laravel as a stack has been pretty good to me, and I've wished there was a Laravel-like way to build desktop apps, apps that spoke to integrated circuits, and even games. I kept structuring my Godot experiments like they were Laravel apps. After all that tinkering, I realized what I really wanted was a unified, yet decoupled stack, that could (or atleast attempt to) build all the apps I wanted beyond the ones meant for a web server, in a syntax I could actually read.

So Ive been building that stack. I've called it the VenusianPHP Framework: a Laravel-like framework for building apps that don't deploy to a web server (unless you want to build a web server!). I plan to break that down in another post, but it's been going very well. To the point that I can pretty easily spin up native toolkit windows with AppKit, GTK and Qt on macOS, Debian and Ubuntu with just a few lines of code and a a couple of config keys..

To keep track of what I know this stack can do, I started building an app as a showcase of what PHP can do, at a minimum, when it comes to these kinds of apps. I call it Stargazer. Under the hood it uses a package I wrote for the framework that talks to NASA public APIs and visualizes the data. It's now on Github: https://github.com/venusian-scrapyard-presents/stargazer .

You can read the source, install it via Composer (you'll need a few extensions, all installable with PIE), or grab the compiled builds from the release: a .dmg for Apple Silicon Macs and .deb packages for arm64 and x86_64 Linux. I've run them on my Raspberry Pi 5s, my Jetson Orin and a gaming PC that dual-boots Linux. No PHP runtime required.

I plan to keep shipping new versions to show off more of the stack as I build it, as far as Windowed applications go. I found this one pretty satisfying to write (I did use AI assistance, but a good chunk of the source is code I wrote by hand). I'd love UX feedback, bug reports from anyone who tries it, or any questions in general. Or just give it a star if you thought it was interesting!


r/PHP • • 15h ago

Warning: Latest PEST is bugged. Silently skips PHPUnit tests

20 Upvotes

We'd been having some weird issues with our tests in CI. Just saw this:

https://github.com/pestphp/pest/issues/1965

v5.3.2

The new time-balanced sharding with parallelization silently skips all PHPUnit tests

eg. `vendor/bin/pest --parallel --processes=2 --shard=1/2`


r/PHP • • 4h ago

Upgrading a site from PHP 5.5 to 8.x

15 Upvotes

Hey all,

I have a personal website the I built nearly 20 years ago and I would like to update it to the latest version of PHP. It's a simple website that I use to run tournaments where I basically just enter tournament parameters (dates, time locations etc,) and tournament results and it displays all of the data that people care about like schedule, results, leaderboards, historical stats etc. All the data is stored in a MySQL database.

I basically built it from scratch without an IDE.

Searching on this sub, it seems like rector may be the way to go. I do actually have PhpStorm and have configured it with composer and rector.

I guess my big question is how would you go about the update? My site is on a paid hosting platform.

I'm thinking that the best way would be to have a local host on my development PC and duplicate my website there to make updates before testing on the external host.

Thoughts?