Pre-RFC Associated Types
Posting this on Reddit, because why not.
A few weeks ago, motivated by the RFC about allowing
Internals email post is: https://externals.io/message/127165
PoC on GitHub is: https://github.com/php/php-src/pull/18260
https://redd.it/1k571ns
@r_php
Posting this on Reddit, because why not.
A few weeks ago, motivated by the RFC about allowing
never as a parameter type, I started writing a proof of concept for "Associated Types" which are "generics"/"template" types limited to interfaces as they do not have a lot of the complexity relating to generic types on concrete classes, as the bound type can be determined at compile time rather than run-time.Internals email post is: https://externals.io/message/127165
PoC on GitHub is: https://github.com/php/php-src/pull/18260
https://redd.it/1k571ns
@r_php
externals.io
[Pre-RFC] Associated Types - Externals
#externals - Opening PHP's #internals to the outside
SymfonyOnline June 2025: Inside a Financial App Breach: Debugging a Million-Dollar Bug
https://symfony.com/blog/symfonyonline-june-2025-inside-a-financial-app-breach-debugging-a-million-dollar-bug?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1k570ir
@r_php
https://symfony.com/blog/symfonyonline-june-2025-inside-a-financial-app-breach-debugging-a-million-dollar-bug?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1k570ir
@r_php
Symfony
SymfonyOnline June 2025: Inside a Financial App Breach: Debugging a Million-Dollar Bug (Symfony Blog)
Ever debugged a million-dollar bug? At SymfonyOnline June 2025, Paul Edward shares how a race condition led to a $70M breach and how Symfony devs can protect their apps from similar flaws
Think of an Elephpant - Championing PHP as a Community
https://liamhammett.com/think-of-an-elephpant
https://redd.it/1k59s03
@r_php
https://liamhammett.com/think-of-an-elephpant
https://redd.it/1k59s03
@r_php
Liamhammett
Think of an Elephpant
New in Symfony 7.3: Assets Pre-Compression
https://symfony.com/blog/new-in-symfony-7-3-assets-pre-compression?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1k5tpcy
@r_php
https://symfony.com/blog/new-in-symfony-7-3-assets-pre-compression?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1k5tpcy
@r_php
Symfony
New in Symfony 7.3: Assets Pre-Compression (Symfony Blog)
Symfony 7.3 allows to pre-compress web assets like CSS and JavaScript files to save CPU by avoiding dynamic compression on each request.
Large/enterprise inertia examples
Looking for some large-enterprise level inertia projects as I’m interested in seeing what different design patterns others are using in their projects. I lead a very small development team so don’t get a lot of exposure to well written large scale Laravel code.
I’m assuming most of the good stuff will be private, so if anyone is open, I’d be happy to pay consulting cost/sign whatever to run me through it.
Otherwise if anyone knows any good public gh repos?
https://redd.it/1k5u80p
@r_php
Looking for some large-enterprise level inertia projects as I’m interested in seeing what different design patterns others are using in their projects. I lead a very small development team so don’t get a lot of exposure to well written large scale Laravel code.
I’m assuming most of the good stuff will be private, so if anyone is open, I’d be happy to pay consulting cost/sign whatever to run me through it.
Otherwise if anyone knows any good public gh repos?
https://redd.it/1k5u80p
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
fromJson(), Force Create Many & Automatic Eager Loading in Laravel 12.8
https://youtu.be/3ktZMAv1Fi8
https://redd.it/1k5xr23
@r_php
https://youtu.be/3ktZMAv1Fi8
https://redd.it/1k5xr23
@r_php
YouTube
fromJson(), Force Create Many & Automatic Eager Loading in Laravel 12.8
What's new in Laravel is back! We share new features of the Laravel framework every week 🙌 (v12.8)
1️⃣ Adds fromJson() to Collection
https://github.com/laravel/framework/pull/55310
2️⃣ Add createMany mass-assignment variants to HasOneOrMany relation…
1️⃣ Adds fromJson() to Collection
https://github.com/laravel/framework/pull/55310
2️⃣ Add createMany mass-assignment variants to HasOneOrMany relation…
NativePHP for mobile - Android support drops next week
https://laravel-news.com/nativephp-mobile-v1
https://redd.it/1k5yvzw
@r_php
https://laravel-news.com/nativephp-mobile-v1
https://redd.it/1k5yvzw
@r_php
Laravel News
NativePHP for Mobile v1 — Launching May 2 - Laravel News
Build native iOS & Android apps using just Laravel. NativePHP for Mobile v1 release announcement— the same Laravel you've always used, now supercharged!
How we Maintain Dozens of Symfony Workflows with Peace
https://tomasvotruba.com/blog/how-we-maintain-dozens-of-symfony-workflows-with-peace
https://redd.it/1k5zgzu
@r_php
https://tomasvotruba.com/blog/how-we-maintain-dozens-of-symfony-workflows-with-peace
https://redd.it/1k5zgzu
@r_php
Tomasvotruba
How we Maintain Dozens of Symfony Workflows with Peace
There are dozens of posts and talks about how Symfony Workflows work and what they are for. To give you the simplest example, if you have a post - it can be drafted, reviewed, or published. The workflow component makes sure the transitions between these states…
I've never extended a class or used the protected function.
Hi all,
Edit: I program in OOP. At least I think I do? Every new tool has a class, view and controller. I include classes I reuse over and over again such as database class.
I've been trying to diversify my knowledge and fill in gaps as I've been at my current company 5 years and have self taught a lot of the knowledge I have regarding PHP and full stack dev work. I've never really found a use case for extending classes or sub classes but I generally follow an MVC structure.
Could someone link me a case study for using these techniques as when I look it up and see the explanation I still struggle to apply it to my daily work. I also have an innate feeling that being self taught I'm lacking a lot of knowledge that might come in useful later down the line.
Or perhaps something thats like a codex of whats industry standard coding in php backend these days?
https://redd.it/1k61910
@r_php
Hi all,
Edit: I program in OOP. At least I think I do? Every new tool has a class, view and controller. I include classes I reuse over and over again such as database class.
I've been trying to diversify my knowledge and fill in gaps as I've been at my current company 5 years and have self taught a lot of the knowledge I have regarding PHP and full stack dev work. I've never really found a use case for extending classes or sub classes but I generally follow an MVC structure.
Could someone link me a case study for using these techniques as when I look it up and see the explanation I still struggle to apply it to my daily work. I also have an innate feeling that being self taught I'm lacking a lot of knowledge that might come in useful later down the line.
Or perhaps something thats like a codex of whats industry standard coding in php backend these days?
https://redd.it/1k61910
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
SymfonyOnline June 2025: FormFlow: Build Stunning Multistep Forms
https://symfony.com/blog/symfonyonline-june-2025-formflow-build-stunning-multistep-forms?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1k62t1b
@r_php
https://symfony.com/blog/symfonyonline-june-2025-formflow-build-stunning-multistep-forms?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1k62t1b
@r_php
Symfony
SymfonyOnline June 2025: FormFlow: Build Stunning Multistep Forms (Symfony Blog)
Join Yonel Ceruto from Cuba at SymfonyOnline June 2025 for 🎤 FormFlow: Build Stunning Multistep Forms — no JavaScript needed
Livewire Starter Kit
I know this sounds petty but it’s kinda sucks that if you want the rest of the UI elements, you need to pay for it. I know folks worked hard on it but at this point, I thought Laravel would bring out their own at least.
Anyone sign up for Flux UI? I think I might bite the bullet.
https://redd.it/1k6ixrg
@r_php
I know this sounds petty but it’s kinda sucks that if you want the rest of the UI elements, you need to pay for it. I know folks worked hard on it but at this point, I thought Laravel would bring out their own at least.
Anyone sign up for Flux UI? I think I might bite the bullet.
https://redd.it/1k6ixrg
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
Laravel 12 + Spatie Roles & Permissions + Starter Kit 🔥
https://youtu.be/vUSBqp5pUtk?si=q5JoFh3VN69MN2eY
https://redd.it/1k6l664
@r_php
https://youtu.be/vUSBqp5pUtk?si=q5JoFh3VN69MN2eY
https://redd.it/1k6l664
@r_php
YouTube
Laravel 12 Spatie Roles and Permissions with Starter Kit 🔥
In this video, I will show you how to implement roles and permissions using spatie composer package with laravel 12.
Check out my custom VS Code snippets (like twtable, bhtml, and more) here:
https://github.com/savanihd/custom-vs-code-snippets/blob/main/global…
Check out my custom VS Code snippets (like twtable, bhtml, and more) here:
https://github.com/savanihd/custom-vs-code-snippets/blob/main/global…
New in Symfony 7.3: Global Translation Parameters
https://symfony.com/blog/new-in-symfony-7-3-global-translation-parameters?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1k6ms11
@r_php
https://symfony.com/blog/new-in-symfony-7-3-global-translation-parameters?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1k6ms11
@r_php
Symfony
New in Symfony 7.3: Global Translation Parameters (Symfony Blog)
Symfony 7.3 introduces global translation parameters you can reuse across messages without passing them explicitly.
What does "Core PHP" means ?
I got call for the job opening of PHP Developer. HR manager asked my if know core php. I don't what that's mean. Please elaborate from a development perspective.
https://redd.it/1k6pc9k
@r_php
I got call for the job opening of PHP Developer. HR manager asked my if know core php. I don't what that's mean. Please elaborate from a development perspective.
https://redd.it/1k6pc9k
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Frozen Time Testing, Transaction Callbacks & Memoized Cache in Laravel 12.9
https://youtu.be/9PeNUFdlRs8
https://redd.it/1k6qlz9
@r_php
https://youtu.be/9PeNUFdlRs8
https://redd.it/1k6qlz9
@r_php
YouTube
Frozen Time Testing, Transaction Callbacks & Memoized Cache in Laravel 12.9
What's new in Laravel is back! We share new features of the Laravel framework every week 🙌 (v12.9)
1️⃣ Return frozen time for easier testing
https://github.com/laravel/framework/pull/55323
2️⃣ Add callback on transaction failure
https://github.com/…
1️⃣ Return frozen time for easier testing
https://github.com/laravel/framework/pull/55323
2️⃣ Add callback on transaction failure
https://github.com/…
PHPverse: a free, online event on June 17th to celebrate PHP's 30th birthday
https://lp.jetbrains.com/phpverse-2025/?utm_source=reddit.com&utm_medium=social&utm_campaign=phpverse2025&utm_content=laravel
https://redd.it/1k6qxak
@r_php
https://lp.jetbrains.com/phpverse-2025/?utm_source=reddit.com&utm_medium=social&utm_campaign=phpverse2025&utm_content=laravel
https://redd.it/1k6qxak
@r_php
JetBrains: Developer Tools for Professionals and Teams
JetBrains PHPverse 2025 – Online Event Celebrating 30 Years of PHP
Join us for a free virtual event as we celebrate PHP’s 30th anniversary with top experts and thought leaders. Enjoy insightful talks, exciting announcements, and a look at the future of PHP development.
I am a PHP developer, not a Vue Developer
Sick of seeing jobs for “PHP Laravel Developer” then in the requirements they also want Vue and Inertia experience.
I purposely don’t do frontend, I work really hard and keep up to the date with the latest in the PHP world.
Some jobs even want Kubernetes / Terraform in top of PHP and Vue. So you want me to manage the servers and infrastructure, write the code, maintain the database and also build the frontend?
From experience people who try to do everything in a role aren’t the best developers.
I made my developers choose between frontend and backend and sent them on their way to be the best they could in that area. It made a huge different to quality and output.
In my opinion trying to build teams with full stacks in every area of the codebase is a recipe for disaster.
https://redd.it/1k6rcgt
@r_php
Sick of seeing jobs for “PHP Laravel Developer” then in the requirements they also want Vue and Inertia experience.
I purposely don’t do frontend, I work really hard and keep up to the date with the latest in the PHP world.
Some jobs even want Kubernetes / Terraform in top of PHP and Vue. So you want me to manage the servers and infrastructure, write the code, maintain the database and also build the frontend?
From experience people who try to do everything in a role aren’t the best developers.
I made my developers choose between frontend and backend and sent them on their way to be the best they could in that area. It made a huge different to quality and output.
In my opinion trying to build teams with full stacks in every area of the codebase is a recipe for disaster.
https://redd.it/1k6rcgt
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
SymfonyLive Berlin 2025: Recap and Replay !
https://symfony.com/blog/symfonylive-berlin-2025-recap-and-replay?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1k6rlhe
@r_php
https://symfony.com/blog/symfonylive-berlin-2025-recap-and-replay?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1k6rlhe
@r_php
Symfony
SymfonyLive Berlin 2025: Recap and Replay ! (Symfony Blog)
SymfonyLive Berlin 2025 brought together the local community for two inspiring days of talks, workshops, and connection. Couldn’t make it or want to rewatch your favorite sessions? All replays are…
Monitor Slow Queries using Laravel Build in Features
Did you know that you can monitor slow queries without using any packages or tools?
//AppServiceProvider
public function boot(): void
{
$maxTimeLimit = 500;
// in milliseconds
if (!$this->app->isProduction()) {
DB::
listen
(static function (QueryExecuted $event) use ($maxTimeLimit): void {
if ($event->time > $maxTimeLimit) {
throw new QueryException(
$event->connectionName,
$event->sql,
$event->bindings,
new Exception(message: "Individual database query exceeded {$maxTimeLimit}ms.")
);
}
});
}
}
With this method, you don’t need to look away. An exception is thrown every time a request exceeds the threshold. You can make it to log queries instead of throwing an exception which is useful in production.
public function boot(): void
{
$maxTimeLimit = 500;
// in milliseconds
if ($this->app->isProduction()) {
DB::
listen
(static function (QueryExecuted $event) use ($maxTimeLimit): void {
if ($event->time > $maxTimeLimit) {
Log::warning(
'Query exceeded time limit',
'sql' => $event->sql,
'bindings' => $event->bindings,
'time' => $event->time,
'connection' => $event->connectionName,
);
}
});
}
}
https://redd.it/1k6tewm
@r_php
Did you know that you can monitor slow queries without using any packages or tools?
//AppServiceProvider
public function boot(): void
{
$maxTimeLimit = 500;
// in milliseconds
if (!$this->app->isProduction()) {
DB::
listen
(static function (QueryExecuted $event) use ($maxTimeLimit): void {
if ($event->time > $maxTimeLimit) {
throw new QueryException(
$event->connectionName,
$event->sql,
$event->bindings,
new Exception(message: "Individual database query exceeded {$maxTimeLimit}ms.")
);
}
});
}
}
With this method, you don’t need to look away. An exception is thrown every time a request exceeds the threshold. You can make it to log queries instead of throwing an exception which is useful in production.
public function boot(): void
{
$maxTimeLimit = 500;
// in milliseconds
if ($this->app->isProduction()) {
DB::
listen
(static function (QueryExecuted $event) use ($maxTimeLimit): void {
if ($event->time > $maxTimeLimit) {
Log::warning(
'Query exceeded time limit',
'sql' => $event->sql,
'bindings' => $event->bindings,
'time' => $event->time,
'connection' => $event->connectionName,
);
}
});
}
}
https://redd.it/1k6tewm
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
Show & Tell Relaticle - An Open Source Laravel-based CRM I've Been Building (+ Questions About Plugin Licensing)
# Hey r/laravel!
I've been working on Relaticle, an open-source CRM built entirely with Laravel 12 and Filament 3. After months of development, I'm excited to share it with the community that has taught me so much over the years.
# What is Relaticle?
Relaticle is a comprehensive CRM platform focusing on simplicity and customization. Built for teams managing client relationships, sales pipelines, and collaboration workflows, it includes:
People/company management with custom fields
Kanban-style sales pipeline for opportunities
Task management with assignments and due dates
Team workspace organization
# Technical Stack
Laravel 12
PHP 8.3 (with strict typing throughout)
Filament 3 for the admin panel and UI components
Livewire 3 for reactivity
Alpine.js for frontend interactions
PostgreSQL (though configurable)
Comprehensive test suite with Pest
Architecture that enforces single responsibility, readonly classes, and clear abstractions
I've focused heavily on developer experience, with comprehensive documentation, thorough type hints, and consistent patterns.
# The Custom Fields Challenge
Here's where I'd love the community's input. The core of Relaticle's flexibility comes from a Custom Fields package I developed. It's robust enough to be used independently, allowing any model to have completely customizable fields and sections (similar to how Notion allows custom properties).
Initially, I planned to sell this package separately (it's listed in composer.json as a premium component from a private Composer repository). However, I'm questioning this approach since:
1. It feels against the spirit of open source to have a core functionality behind a paywall
2. Yet it represents hundreds of hours of development and testing
My question: What do you think is the right approach here? Some options I'm considering:
Open source it entirely
Dual license (OSS for Relaticle, commercial license for standalone use)
Keep it as a premium component with a free tier
Provide it fully free but offer paid support/implementation
# Why I Built This
I was dissatisfied with existing CRMs - either too complex, too expensive, or not customizable enough. Laravel and Filament make it possible to build something that's both powerful and elegant.
The repo is available at https://github.com/Relaticle/relaticle . I'd love your thoughts on the approach, code quality, and especially the Custom Fields licensing question.
Thanks for being such a supportive community!
https://redd.it/1k6x0t2
@r_php
# Hey r/laravel!
I've been working on Relaticle, an open-source CRM built entirely with Laravel 12 and Filament 3. After months of development, I'm excited to share it with the community that has taught me so much over the years.
# What is Relaticle?
Relaticle is a comprehensive CRM platform focusing on simplicity and customization. Built for teams managing client relationships, sales pipelines, and collaboration workflows, it includes:
People/company management with custom fields
Kanban-style sales pipeline for opportunities
Task management with assignments and due dates
Team workspace organization
# Technical Stack
Laravel 12
PHP 8.3 (with strict typing throughout)
Filament 3 for the admin panel and UI components
Livewire 3 for reactivity
Alpine.js for frontend interactions
PostgreSQL (though configurable)
Comprehensive test suite with Pest
Architecture that enforces single responsibility, readonly classes, and clear abstractions
I've focused heavily on developer experience, with comprehensive documentation, thorough type hints, and consistent patterns.
# The Custom Fields Challenge
Here's where I'd love the community's input. The core of Relaticle's flexibility comes from a Custom Fields package I developed. It's robust enough to be used independently, allowing any model to have completely customizable fields and sections (similar to how Notion allows custom properties).
Initially, I planned to sell this package separately (it's listed in composer.json as a premium component from a private Composer repository). However, I'm questioning this approach since:
1. It feels against the spirit of open source to have a core functionality behind a paywall
2. Yet it represents hundreds of hours of development and testing
My question: What do you think is the right approach here? Some options I'm considering:
Open source it entirely
Dual license (OSS for Relaticle, commercial license for standalone use)
Keep it as a premium component with a free tier
Provide it fully free but offer paid support/implementation
# Why I Built This
I was dissatisfied with existing CRMs - either too complex, too expensive, or not customizable enough. Laravel and Filament make it possible to build something that's both powerful and elegant.
The repo is available at https://github.com/Relaticle/relaticle . I'd love your thoughts on the approach, code quality, and especially the Custom Fields licensing question.
Thanks for being such a supportive community!
https://redd.it/1k6x0t2
@r_php
GitHub
GitHub - Relaticle/relaticle: The Next-Generation Open-Source CRM Platform written with Laravel and Filament
The Next-Generation Open-Source CRM Platform written with Laravel and Filament - Relaticle/relaticle
Why is latestOfMany() orders of magnitude slower than using a manual subquery?
For context, a
In some cases it performs a full table scan (millions of rows) even though the "outer/parent" query is constrained to only a few rows.
With this manual "hack", calling
return $this->hasOne(ModelName::class)->where('id', function ($query) {
$query->selectRaw('MAX(sub.id)')
->from('tablename AS sub')
->whereColumn('sub.leadid', 'tablename.leadid');
});
Which is nice I guess, but it annoys me that I don't understand why. Can any of you explain it?
https://redd.it/1k6r70y
@r_php
For context, a
hasOne(ModelName::class)->latestOfMany() relationship creates a complex aggregate WHERE EXISTS() subquery with another nested (grouped) subquery, and in some cases it can be extremely slow, even if you've added every conceivable index to the table.In some cases it performs a full table scan (millions of rows) even though the "outer/parent" query is constrained to only a few rows.
With this manual "hack", calling
count() on this relationship went from 10 seconds to 7 millisecondsreturn $this->hasOne(ModelName::class)->where('id', function ($query) {
$query->selectRaw('MAX(sub.id)')
->from('tablename AS sub')
->whereColumn('sub.leadid', 'tablename.leadid');
});
Which is nice I guess, but it annoys me that I don't understand why. Can any of you explain it?
https://redd.it/1k6r70y
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community