PHP Reddit
31 subscribers
309 photos
40 videos
25.3K links
Channel to sync with /r/PHP /r/Laravel /r/Symfony. Powered by awesome @r_channels and @reddit2telegram
Download Telegram
I just released my first open source project - Spectacular - a functional specification tool built in Laravel

Like most side projects, this was born out of frustration. As a developer, I hated getting vague requirements scattered over Basecamp, Jira, Slack and emails. Oftentimes, it was lazy project managers using agile as an excuse for not planning. So I made a tool for building detailed yet readable functional specifications (not just UML weirdos!).

I've noticed recently that specifications are cool again but for the wrong reasons. People write specs primarily for LLMs rather than for other people. Spectacular is aimed at making specifications accessible to everyone: project managers, developers, stakeholders as well as AI coding agents. It has worked great for my clients over the years and I'm pleased to have had time in the last few months to prepare it for public release.

So here it is: **Specacular - an open source specification tool built in Laravel and Vue**. You can install it locally or just use the hosted version: [https://spec.tacul.ar](https://spec.tacul.ar)

I hope many of you find it a worthy addition to your workflows.

\---

Sales pitch over, let's talk code.

It's pretty standard Laravel and Vue (with a few exceptions). The API uses [Laravel Actions](https://www.laravelactions.com/) instead of controllers so any future extensions like MCP services don't need to duplicate code.

The [SharesRelation](https://github.com/syntheticminds/spectacular/blob/main/app/Rules/SharesRelation.php) rule is a nifty way to check two models are related via a common ancestor (a User and a Feature belong to the same Project via User->Project->Feature).

'user_id' => [new SharesRelation(User::class, 'feature_id', 'project.features')],

Some might be interested in how a "solo" mode disengages authorisation; [Sanctum config](https://github.com/syntheticminds/spectacular/blob/main/config/sanctum.php) takes an array of guards so it will fall back to [a custom guard](https://github.com/syntheticminds/spectacular/blob/main/app/Providers/AppServiceProvider.php) that returns an ephemeral default user and opens the Gate for them.

Sqids (the new version of Hashids) are encoded using an attribute on the trait and [a castable](https://github.com/syntheticminds/spectacular/blob/main/app/Casts/AsSqid.php) is used for foreign keys. The decoding is done in route binding and at the [middleware](https://github.com/syntheticminds/spectacular/blob/main/app/Http/Middleware/DecodeSqids.php) level for input. I found this to be tider than prepareForValidation().

$router->post('requirements/add', static::class) ->middleware('sqids:feature_id,actor_ids.*');

On the Vue side: when I migrated this project from Vue 2 to Vue 3 years ago, Pinia ORM was a bit buggy so I implemented my own lightweight ORM that uses [Collect.js](https://collect.js.org/usage.html). I actually really like it because it works like [a very basic Eloquent](https://github.com/syntheticminds/spectacular/tree/main/resources/js/stores).

This is my first time releasing a project like this so I'm looking forward to hearing your thoughts. It's getting pretty late so I'll check back in the morning.

https://redd.it/1syed4f
@r_php
Aimeos e-commerce framework 2026.04 – PHP 9 ready, Laravel 13, Symfony 8, security hardening and more

We just released Aimeos 2026.04, the PHP e-commerce framework for custom online shops, market places, complex B2B apps and #gigacommerce:

Ready for PHP 9: Minimum raised to PHP 8.1, all deprecations removed across core and 30+ extensions, fully tested on PHP 8.5. PHPStan static analysis added at level 4 with zero errors.
Laravel 13 & Symfony 8: Day-one support for the latest framework versions. The stand-alone shop and headless distributions ship on Laravel 13 out of the box.
Customer CSV import: Full import pipeline with address/property support, regex validation, group filtering and admin UI upload — rounding out CSV import for products, catalogs, suppliers and now customers.
- Product feed extension: New extension for generating Google Merchant and Idealo product feeds. Includes several configuration options to customize the exported products and details.
Security hardening: XSS prevention via HTML sanitization in the CMS, GraphQL query depth/complexity limits, and tighter permission checks in the admin API.
PHPUnit 12: Stricter test isolation and deprecation handling across the entire test suite.

For those who haven't come across Aimeos before — it's an open-source e-commerce framework (LGPLv3) built for PHP developers who want full control over their shop without being locked into a monolithic platform. A few things that set it apart:

Framework-native: Integrates directly into Laravel, Symfony or TYPO3 as a composer package. You use your framework's routing, auth, middleware and tooling — Aimeos plugs into it rather than replacing it.
Headless-first: Full JSON:API and GraphQL APIs out of the box. Use any frontend you want — Vue, React, mobile apps, or the included server-side rendered HTML client.
Multi-tenant / multi-site: Built-in support for running multiple shops from a single installation with separate catalogs, pricing, languages and currencies per site.
Scales from small to large: The same architecture powers single-product shops and marketplaces with millions of products. ElasticSearch and Solr integrations are available for high-volume search.
Extensible, w/o forking: 30+ extensions for payments, shipping, CMS, feeds, caching (Redis), search engines and more. Custom extensions follow the same pattern without touching core code.
No SaaS lock-in: You host it yourself, own your data, and can switch or extend anything.

GitHub: https://github.com/aimeos/aimeos
Docs: [https://aimeos.org/docs](https://aimeos.org/docs)
Demo: https://demo.aimeos.org

If you like Aimeos, give it a star :-)

https://redd.it/1szxlit
@r_php
Aimeos: Laravel e-commerce 2026.04 released – now on Laravel 13 with PHP 9 readiness, security hardening and more
https://redd.it/1szxtvp
@r_php
Microsoft Drivers 5.13.1 for PHP for SQL Server released - security fix for connection pooling

5.13.1 is out with several fixes for the sqlsrv and pdo\_sqlsrv extensions:

* **Access token leak in pooled connections** \- Connections with different access tokens could share the same pool entry, causing identity cross-contamination and use-after-free. Fixed by incorporating the token into the pool key.
* **Silent INSERT failure** \- Prepared INSERTs could silently fail when triggers or `SET NOCOUNT OFF` produce extra result sets, causing implicit rollback with MARS enabled.
* **Fatal error re-executing prepared statements** \- Re-executing a prepared statement returning multiple result sets with different column layouts could crash. Metadata is now properly freed between executions.
* **sqlsrv\_errors() returning null** \- After a failed connection with no ODBC diagnostic records, `sqlsrv_errors()` returned null instead of the actual error.
* **Stream invalidation** \- Binary streams became invalid when the originating statement went out of scope.

Drop-in upgrade from 5.13.0, no API changes. Supports PHP 8.3/8.4/8.5.

Install: `pecl install sqlsrv` / `pecl install pdo_sqlsrv`

Full blog post: [https://techcommunity.microsoft.com/blog/sqlserver/announcing-microsoft-drivers-5-13-1-for-php-for-sql-server/4516258](https://techcommunity.microsoft.com/blog/sqlserver/announcing-microsoft-drivers-5-13-1-for-php-for-sql-server/4516258)

GitHub: [https://github.com/microsoft/msphpsql](https://github.com/microsoft/msphpsql)

Docs: [https://learn.microsoft.com/sql/connect/php/microsoft-php-driver-for-sql-server](https://learn.microsoft.com/sql/connect/php/microsoft-php-driver-for-sql-server)

https://redd.it/1t03vwb
@r_php
Terminal is Super Slow

For some reason my terminal is super slow. e.g. something as simple as composer require laravel/reverb in a new Laravel project can take up to 10 minutes to complete. It seems like it hangs/freezes midway, and sometimes it finishes the job and other times it crashes.

I tried disabling all extensions, clearing cache, and setting "disable-hardware-acceleration": true, but nothing helps.

I'm on a Dell Precision 7670, 64gb ram, i9, Win 11.

Any ideas?

https://redd.it/1t05sng
@r_php
Google Gen AI SDK has no official PHP SDK — Google asked for stars and use cases

Google Gen AI SDK currently supports Python, Node.js, Go, Java, and .NET/C#, but there is no official PHP SDK.



I opened a public Google Issue Tracker request for official PHP support:



https://issuetracker.google.com/issues/507647520



Google Cloud replied that, according to their Public Issue Tracker process, feature requests usually need a handful of stars and comments from several users before the engineering team works on them.



So if official PHP support for Gemini / Vertex AI GenAI SDK matters to you, please consider starring the issue or commenting there with your real use case.



Existing PHP options such as `google/apiclient`, `google-cloud-php`, and GAPIC-generated clients do not provide the same unified GenAI SDK developer experience as the official SDKs for other languages.



Useful comments would probably include things like:



\- whether you need Gemini Developer API,

\- whether you need Gemini API on Vertex AI,

\- whether you need both through one unified SDK,

\- whether you use Symfony, Laravel, or another PHP stack,

\- whether streaming, tool calling, multimodal input, structured output, or file upload support matters to you.



This is not about asking for a framework wrapper. The missing piece is an official PHP SDK equivalent to `python-genai`, `js-genai`, `go-genai`, `java-genai`, and `dotnet-genai`.

https://redd.it/1t05rx8
@r_php
Handling Excel Files

Does anyone have any package recommendations for processing Excel files that isn't maatwebsite/excel? It's dependencies are stuck on a PHP version < 8.5, which blocks the current 8.5.5.

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