PHP Reddit – Telegram
PHP Reddit
34 subscribers
294 photos
39 videos
25K links
Channel to sync with /r/PHP /r/Laravel /r/Symfony. Powered by awesome @r_channels and @reddit2telegram
Download Telegram
Awesome PHP ML: a curated list of ML resources for PHP

Hey folks,

Every time I searched for machine learning in PHP, I kept finding the same thing:
old blog posts, random repos, LLM generated posts and "PHP isn't for ML" comments.

But there are real libraries, tools, and projects out there - they're just scattered.

So I put them in one place:

👉 https://github.com/apphp/awesome-php-ml

The repo is a curated list of:

PHP machine learning & AI libraries
math, data processing, and stats tools
example projects
articles and learning resources

The goal isn't to turn PHP into ... (you know what I mean, right?), just to make it easier to see what's already possible and save people from hunting across GitHub and outdated posts.

It's early and definitely incomplete – contributions and suggestions are welcome.

If you've ever wondered “is anyone actually doing ML with PHP?” – this is my attempt to answer that.

https://redd.it/1q6rezq
@r_php
Typing in Yii3 is the strictest in PHP universe?

I haven't thought about it before, but it seems Yii3 is the most strictly typed framework in the whole PHP frameworks universe. Psalm level 1 (similar to PhpStan level 10).

It allows you to catch errors while developing and is another layer of automatic checks to watch for what the LLM agent is doing.

What's the static typing level of your favorite framework?

https://redd.it/1q81l9d
@r_php
Neuron AI Laravel SDK

It was asked by many Laravel developers. Not that Neuron needs invasive abstractions. So I kept it deliberately simple to automate some integration points with Laravel, such as the ready-made configuration file, provider facades, artisan commands, and other utilities for a more "Laravel native" experience. Otherwise, you can take advantage of Neuron's native APIs to develop your agent systems seamlessly.

I hope it's what some Laravel developers need to better understand the potential of Neuron framework. Feel free to share any feedback, I'm here to learn from your experience.

https://github.com/neuron-core/neuron-laravel


https://redd.it/1q78zu3
@r_php
Released: Laravel LiveApi, zero-config OpenAPI generation from real API traffic (v0.1.0)

I’ve just released Laravel LiveApi (v0.1.0), a small Laravel package that generates an OpenAPI 3.1 specification by observing real API requests and responses at runtime during development.

The main goal is to avoid documentation drift without adding annotations or maintaining YAML files.

You just use your API (Postman, Swagger UI, automated tests, browser), then run a command to generate an accurate openapi.json.

It also includes a local dashboard (Swagger UI) to visualize the generated specification while developing.

Repo:
https://github.com/medmahmoudhdaya/laravel-liveapi

https://redd.it/1q7dq34
@r_php
Disable Zero Downtime Deployments in Forge?

Hello All!

Is the only way to disable the new Zero Downtime Deployments in forge to delete the site + re-create? That seems like a big pain in the neck.

I want to test Laravel Octane so I need to disable ZDD and it seems like it can only be configured on site creation??

https://redd.it/1q8c1qz
@r_php
How are you handling massive build matrices?

I’ve run into a bit of a scaling wall with php-ext-farm and I’m curious how others manage massive build pipelines.

Currently, the build matrix is exploding. I'm building:

160 Base Images: (5 PHP Versions × 8 OS flavors/versions × 4 Platforms)
33,920 Extension Images: (106 Extensions × 2 Versions × 160 Base Images)

As you can imagine, the time to finish a full run is becoming unbearable.

For those of you managing large-scale build combinations, how do you handle/improve this (without going bankrupt) when you need to support multiple versions across different architectures?

https://redd.it/1q8mwzb
@r_php
Developer Experience: Fluent Builder vs. DTO vs. Method Arguments ?

Hello everyone,

I'm currently building a library that fetches data from an (XML) API.

The API supports routes with up to 20 parameters.
Example: /thing?id=1&type=game&own=1&played=1&rating=5&wishlist=0

Now I'm wondering for the "best" way to represent that in my library.
I'm trying to find the best compromise between testability, intuitivity and developer experience (for people using the library but also for me developing the library).

I came up with the following approaches:

## 1. Fluent Builder:

$client->getThing()
->withId(1)
->withType("game")
->ownedOnly()
->playedOnly()
->withRating(5)
->wishlistedOnly()
->fetch();


## 2. DTO:

With fluent builder:

$thingQuery = (new ThingQuery())
->withId(1)
->withType("game")
->ownedOnly()
->playedOnly()
->withRating(5)
->wishlistedOnly();

$client->getThing($thingQuery)


With constructor arguments:

$thingQuery = new ThingQuery(
id: 1,
type: "game",
ownedOnly: true,
playedOnly: true,
rating: 5,
wishlistedOnly: true
);

$client->getThing($thingQuery)


## 3. Method Arguments

$client->getThing(
id: 1,
type: "game",
ownedOnly: true,
playedOnly: true,
rating: 5,
wishlistedOnly: true
);


Which approach would you choose (and why)?
Or do you have another idea?

View Poll

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