🚀 Deploy Your Laravel App on a DigitalOcean Ubuntu Server
https://youtu.be/LOwRfN_wCb4?si=63nWCZ3nHiYGNqaH
https://redd.it/1lcqb4p
@r_php
https://youtu.be/LOwRfN_wCb4?si=63nWCZ3nHiYGNqaH
https://redd.it/1lcqb4p
@r_php
YouTube
🚀 Deploy Laravel App on Ubuntu Server
Learn how to deploy your Laravel application on an Ubuntu 24.04 server using Apache on DigitalOcean! 🌐
This step-by-step guide covers everything from server setup, Laravel configuration, virtual hosts, permissions, to launching your app online. 💻
👉 Perfect…
This step-by-step guide covers everything from server setup, Laravel configuration, virtual hosts, permissions, to launching your app online. 💻
👉 Perfect…
MCP Server Bundle for Symfony
Hello everyone,
I released a Symfony bundle aiming to ease the development of Model Context Protocol (MCP) servers using Symfony.
If you've never heard of MCP before, it is the new big thing in the AI revolution.
To make it simple, Large Language Models (LLMs) are powerful, but they do not have access to the outside world: they cannot navigate on the Internet, browse their host machine’s file system, access an external database…
However, these LLMs can be enhanced with capacities, which are called tools.
These tools are not built into the LLM. They’re provided by you, the developer.
The way it works is the Agent (An app using an LLM to function) is given, in addition to the prompt, a list of external tools which can be used to fulfill the user’s need.
The LLM then decides if it’s able to fulfill the request on its own (like craft a piece of text) or if it needs to use a tool that matches its needs in the provided list.
The Model Context Protocol defines a way of communicating between what could be called “agents” (Clients) and external apps (Servers).
This bundle allows for easy integration of MCP capabilities into any existing Symfony project.
Read more on the GitHub page : https://github.com/EdouardCourty/mcp-server-bundle
Feel free to comment my work, I'll be happy to discuss with the community 😄
https://redd.it/1lcr77s
@r_php
Hello everyone,
I released a Symfony bundle aiming to ease the development of Model Context Protocol (MCP) servers using Symfony.
If you've never heard of MCP before, it is the new big thing in the AI revolution.
To make it simple, Large Language Models (LLMs) are powerful, but they do not have access to the outside world: they cannot navigate on the Internet, browse their host machine’s file system, access an external database…
However, these LLMs can be enhanced with capacities, which are called tools.
These tools are not built into the LLM. They’re provided by you, the developer.
The way it works is the Agent (An app using an LLM to function) is given, in addition to the prompt, a list of external tools which can be used to fulfill the user’s need.
The LLM then decides if it’s able to fulfill the request on its own (like craft a piece of text) or if it needs to use a tool that matches its needs in the provided list.
The Model Context Protocol defines a way of communicating between what could be called “agents” (Clients) and external apps (Servers).
This bundle allows for easy integration of MCP capabilities into any existing Symfony project.
Read more on the GitHub page : https://github.com/EdouardCourty/mcp-server-bundle
Feel free to comment my work, I'll be happy to discuss with the community 😄
https://redd.it/1lcr77s
@r_php
GitHub
GitHub - EdouardCourty/mcp-server-bundle: A Symfony Bundle to create MCP servers
A Symfony Bundle to create MCP servers. Contribute to EdouardCourty/mcp-server-bundle development by creating an account on GitHub.
Any way to use Swoole as a drop-in replacement for Apache?
I have a SaaS company. I have been working on it for several years now and the issue is - when I started, I used Apache and the LAMP stack. Basically we provide a complete website builder like Shopify - so I require features like complex operations with products and their variations, custom template language parsing, etc. and Apache has served me really well with all the feature-related needs.
However, as we grow, I am really feeling the need to switch the website to a faster alternative like Swoole. The only issue is - I don't have the luxury to spend a few months rewriting.
Currently I have my own custom router. And I am using regular php syntax - sessions, cookies, $_SERVER, die() etc.
Is there any way that, just for the time being, I could create a server.php and set it to:
Redirect everything to router.php
Set all the variables that are needed by regular php
Define some php functions that function differently in Swoole (if any)
Clear all global variables so everything resets on page reload
I know that this is probably going to reduce Swoole's benefits, but I just need a one-time solution so I can quickly switch, then I'll gradually rewrite parts of the website in raw swoole.
https://redd.it/1lcs36y
@r_php
I have a SaaS company. I have been working on it for several years now and the issue is - when I started, I used Apache and the LAMP stack. Basically we provide a complete website builder like Shopify - so I require features like complex operations with products and their variations, custom template language parsing, etc. and Apache has served me really well with all the feature-related needs.
However, as we grow, I am really feeling the need to switch the website to a faster alternative like Swoole. The only issue is - I don't have the luxury to spend a few months rewriting.
Currently I have my own custom router. And I am using regular php syntax - sessions, cookies, $_SERVER, die() etc.
Is there any way that, just for the time being, I could create a server.php and set it to:
Redirect everything to router.php
Set all the variables that are needed by regular php
Define some php functions that function differently in Swoole (if any)
Clear all global variables so everything resets on page reload
I know that this is probably going to reduce Swoole's benefits, but I just need a one-time solution so I can quickly switch, then I'll gradually rewrite parts of the website in raw swoole.
https://redd.it/1lcs36y
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Headless Platform architecture
https://www.dotkernel.com/headless-platform/dotkernel-headless-platform-the-whats-hows-and-whys/
https://redd.it/1lcujmu
@r_php
https://www.dotkernel.com/headless-platform/dotkernel-headless-platform-the-whats-hows-and-whys/
https://redd.it/1lcujmu
@r_php
Dotkernel | A general purpose PHP headless platform
Dotkernel Headless Platform - The Whats, Hows and Whys
The principle of a Headless Platform is to decouple the User Interface (frontend) from the backend services. The responses from the platform are then used by another system, such as a website or mobile app. In this article we will explore the Dotkernel implementation…
Your experience with AI Agents and AI Programming Tools in 2025
Sorry for the long post!
I'm trying to get an idea of which tools are working for people in PHP projects and what doesn't work - and whether my experience is normal or not.
I've worked at the same company for 15 years, and worked on various large and complicated code bases overseeing transitions from PHP4/5 up to 8.4 now. The company adopted an in-house framework in 2006 and there's still a version of it in use today. This approach has meant our code can be bespoke, modular, shared between projects when necessary and throughout this 15 years we've been able to control upgrades and changes and maintain backward compatability. Go look at Symfony v1 compared to what we have today and it's unrecognisable. Laravel wasn't created until 2011 and went through various rewrites in those early years. I expect if we were starting from scratch today we'd probably pick Symfony - but we're not starting from scratch - we have millions of lines of code already.
Anyway - for a little while now myself and other members of my team have tried IDE AI Autocomplete tools like Copilot and the jetbrains PHPStorm AI chat - as well as ocassionally running problems through Chat GPT or Gemini - and those smaller tasks (the amount of code you might fit onto your screen) typically work or at least help us fix issues.
Recently, I've been trying to use some of the AI Agents instead. Junie (PHPStorm), Claude code, Aider - and they just don't work at all for me. They get completely confused by our codebase, the concepts, the structure. They pick and choose the wrong parts to work on (even when I tell them not to). They don't understand our routing, our ORM, our controllers, our caching, our forms - anything.
Presumably an AI is going to be good at solving the sort of problems it's been trained on from the internet - so public Github projects, etc? Probably lots of open source pieces of work. Python, go, nodejs? If we had a Django website maybe it would be fine. I expect it'll be good for Wordpress development and maybe Symfony and Laravel projects too? Although I'm willing to bet few 'enterprise-style' websites have source code in the public domain.
I've realised that our projects, framework, ORM, system, etc is so different from anything else out there (including the way we split our code up into separate repos) that I'm not sure there is going to be much in the training data for an AI to relate it to. I am going to have to explain things in book-level detail to get anywhere and my hunch is that the more understanding that's baked into the model (rather than given in the prompt at runtime) the better.
Am I missing something obvious here? Is everyone else producing incredible work with AI? What are your experiences?
https://redd.it/1ldew5x
@r_php
Sorry for the long post!
I'm trying to get an idea of which tools are working for people in PHP projects and what doesn't work - and whether my experience is normal or not.
I've worked at the same company for 15 years, and worked on various large and complicated code bases overseeing transitions from PHP4/5 up to 8.4 now. The company adopted an in-house framework in 2006 and there's still a version of it in use today. This approach has meant our code can be bespoke, modular, shared between projects when necessary and throughout this 15 years we've been able to control upgrades and changes and maintain backward compatability. Go look at Symfony v1 compared to what we have today and it's unrecognisable. Laravel wasn't created until 2011 and went through various rewrites in those early years. I expect if we were starting from scratch today we'd probably pick Symfony - but we're not starting from scratch - we have millions of lines of code already.
Anyway - for a little while now myself and other members of my team have tried IDE AI Autocomplete tools like Copilot and the jetbrains PHPStorm AI chat - as well as ocassionally running problems through Chat GPT or Gemini - and those smaller tasks (the amount of code you might fit onto your screen) typically work or at least help us fix issues.
Recently, I've been trying to use some of the AI Agents instead. Junie (PHPStorm), Claude code, Aider - and they just don't work at all for me. They get completely confused by our codebase, the concepts, the structure. They pick and choose the wrong parts to work on (even when I tell them not to). They don't understand our routing, our ORM, our controllers, our caching, our forms - anything.
Presumably an AI is going to be good at solving the sort of problems it's been trained on from the internet - so public Github projects, etc? Probably lots of open source pieces of work. Python, go, nodejs? If we had a Django website maybe it would be fine. I expect it'll be good for Wordpress development and maybe Symfony and Laravel projects too? Although I'm willing to bet few 'enterprise-style' websites have source code in the public domain.
I've realised that our projects, framework, ORM, system, etc is so different from anything else out there (including the way we split our code up into separate repos) that I'm not sure there is going to be much in the training data for an AI to relate it to. I am going to have to explain things in book-level detail to get anywhere and my hunch is that the more understanding that's baked into the model (rather than given in the prompt at runtime) the better.
Am I missing something obvious here? Is everyone else producing incredible work with AI? What are your experiences?
https://redd.it/1ldew5x
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
I made an ORM for the legacy projects I work on
I just published a composer package for the ORM "framework" I've developed from modernising some legacy PHP applications over the last 5 years: https://github.com/mattdinthehouse/porm/ 😊
PORM came about because I wanted to work with consistent model classes but these projects were built with raw SQL everywhere (so many injection vulns) and worked with associative arrays which meant no IDE autocomplete and linting...
Installing a comprehensive ORM like Doctrine was gonna be too disruptive and rebuilds were out of the question, so we chose to slowly migrate code over to a lightweight class-based set of "helper" models which has been a great success and now I'm moving the system into this package to share with everyone
Have a look at the example folder for some demo code, and I'd love to get feedback on it! I'm gonna continue using it for work anyway so it doesn't matter if nobody uses it 😅
This v1 release is just the core ORM functionality and there's a handful of other stuff that I'm going to move into this package like schema output for API endpoints, instantiating model objects from arrays/JSON which I can later wrap in form request validation, diffing objects, and writing to the DB
PS - I live in Australia and I'm about to go to bed so I'll read everybody's comments in the morning 🦘
https://redd.it/1ldkigy
@r_php
I just published a composer package for the ORM "framework" I've developed from modernising some legacy PHP applications over the last 5 years: https://github.com/mattdinthehouse/porm/ 😊
PORM came about because I wanted to work with consistent model classes but these projects were built with raw SQL everywhere (so many injection vulns) and worked with associative arrays which meant no IDE autocomplete and linting...
Installing a comprehensive ORM like Doctrine was gonna be too disruptive and rebuilds were out of the question, so we chose to slowly migrate code over to a lightweight class-based set of "helper" models which has been a great success and now I'm moving the system into this package to share with everyone
Have a look at the example folder for some demo code, and I'd love to get feedback on it! I'm gonna continue using it for work anyway so it doesn't matter if nobody uses it 😅
This v1 release is just the core ORM functionality and there's a handful of other stuff that I'm going to move into this package like schema output for API endpoints, instantiating model objects from arrays/JSON which I can later wrap in form request validation, diffing objects, and writing to the DB
PS - I live in Australia and I'm about to go to bed so I'll read everybody's comments in the morning 🦘
https://redd.it/1ldkigy
@r_php
GitHub
GitHub - mattdinthehouse/porm
Contribute to mattdinthehouse/porm development by creating an account on GitHub.
PHPVerse 2025 is happening today - Join Us
https://www.youtube.com/live/3b0ty1iZ8QM
https://redd.it/1ldlzft
@r_php
https://www.youtube.com/live/3b0ty1iZ8QM
https://redd.it/1ldlzft
@r_php
YouTube
JetBrains PHPverse 2025 – Join us to celebrate PHP’s 30th birthday!
PHP turns 30! From humble beginnings to powering the modern web, it’s been quite the journey. Celebrate this milestone with us at a free online event with legends who have shaped PHP’s past, present, and future. For the agenda and details, see https://jb.gg/jb…
Stochastix: a backtesting framework for crypto trading in PHP
Few months ago I discovered the world of crypto trading, which led me to find about algorithmic trading. And in this world, Python is king. Python or MetaTrader's MQL5, which is basically C++. Meh. Interesting and powerful but painful to use, even with vibe coding. Nothing like the great developer experience of Pine Script in TradingView.
So I decided to create Stochastix, a backtesting framework built with PHP 8.4 and Symfony. It was a good opportunity to explore how would work a backtesting framework. Along the way I discovered the PHP extension `ds`. Never heard of it before. I had a x80 performance gain as soon as I implemented its data structures. This lib should be default. The framework also uses `bcmath` for arbitrary precision calculations.
Coming from a web development background, this new way of using PHP was a great experience.
Here's a quick overview of the framework:
* bar-by-bar ("realtime" processing) as opposed to vectorized frameworks
* market, limit, stop orders
* multi-timeframe strategies
* custom indicators
* binary formats to speed up data loading
* automatic data download from lots of exchanges (ccxt lib)
* UI built with nuxt with real-time updates with Mercure
* chart plotting showing indicators and executed trades
* number metrics and visual metrics (equity curve, drawdown, etc.)
* default docker install using frankenphp (one-liner installation)
* background jobs with Symfomy Messenger
It's a work in progress, to be totally honest I'm not totally sure about all the metrics calculations, especially Beta and Alpha. But I think it's a good start, and I know I'll personally use it to build strategies from now on.
If you have a background in algotrading or if you have an sudden interest, I'll be happy to get some feedback.
The website is available at [https://phpquant.github.io/stochastix-docs/](https://phpquant.github.io/stochastix-docs/)
You can have a look at what a strategy code looks like here: [https://github.com/phpquant/stochastix-core/blob/master/recipe/src/Strategy/SampleStrategy.php](https://github.com/phpquant/stochastix-core/blob/master/recipe/src/Strategy/SampleStrategy.php)
https://redd.it/1ldnkrg
@r_php
Few months ago I discovered the world of crypto trading, which led me to find about algorithmic trading. And in this world, Python is king. Python or MetaTrader's MQL5, which is basically C++. Meh. Interesting and powerful but painful to use, even with vibe coding. Nothing like the great developer experience of Pine Script in TradingView.
So I decided to create Stochastix, a backtesting framework built with PHP 8.4 and Symfony. It was a good opportunity to explore how would work a backtesting framework. Along the way I discovered the PHP extension `ds`. Never heard of it before. I had a x80 performance gain as soon as I implemented its data structures. This lib should be default. The framework also uses `bcmath` for arbitrary precision calculations.
Coming from a web development background, this new way of using PHP was a great experience.
Here's a quick overview of the framework:
* bar-by-bar ("realtime" processing) as opposed to vectorized frameworks
* market, limit, stop orders
* multi-timeframe strategies
* custom indicators
* binary formats to speed up data loading
* automatic data download from lots of exchanges (ccxt lib)
* UI built with nuxt with real-time updates with Mercure
* chart plotting showing indicators and executed trades
* number metrics and visual metrics (equity curve, drawdown, etc.)
* default docker install using frankenphp (one-liner installation)
* background jobs with Symfomy Messenger
It's a work in progress, to be totally honest I'm not totally sure about all the metrics calculations, especially Beta and Alpha. But I think it's a good start, and I know I'll personally use it to build strategies from now on.
If you have a background in algotrading or if you have an sudden interest, I'll be happy to get some feedback.
The website is available at [https://phpquant.github.io/stochastix-docs/](https://phpquant.github.io/stochastix-docs/)
You can have a look at what a strategy code looks like here: [https://github.com/phpquant/stochastix-core/blob/master/recipe/src/Strategy/SampleStrategy.php](https://github.com/phpquant/stochastix-core/blob/master/recipe/src/Strategy/SampleStrategy.php)
https://redd.it/1ldnkrg
@r_php
phpquant.github.io
Stochastix
High-Performance Quantitative Backtesting Engine
Simplifying Hosting for 100+ Sites on same Laravel CMS - Multi-Tenant Strategy with Low-Maintenance Infrastructure?
We have around 120 websites that all run on the same simple Laravel-based CMS. Each site is a separate standalone instance with its own database. The websites are basic service business sites, averaging under 1,000 visitors/day each. The websites are essentially just serve up content/data from their databases and without any complicated business logic or resource intensive operations.
# Current Setup:
120 sites are distributed across 3 Leaseweb VPS servers (\~40 each).
Each has its own free SSL certificate, which requires manual renewal.
Sites send occasional notification emails via SendGrid.
Weekly backups go to Amazon S3.
The current websites generate static html copies of all dynamic pages which Akamai serves up in the case of anything other than a 200 response - our last-resort failover layer.
This setup has become difficult to maintain - instability, performance inconsistency and high costs are ongoing issues.
# Goals:
I want to simplify the entire setup while keeping costs reasonable and minimizing DevOps work. I’m a software engineer but relatively new to managing infrastructure at this scale. Here’s my rough plan:
Convert the CMS to support multi-tenancy with dynamic DB switching middleware based on domain.
Run a small number of CMS instances on geographically distributed servers behind a load balancer (or possibly a serverless/cloud environment).
Use a single centralized Redis server for caching/sessions/queue.
Host all tenant databases on a dedicated DB server.
Store media (logos, site specific imagery, etc.) on S3 or similar.
Automate SSL cert renewal
Use something like Cloudflare Always Online or similar CDN as a last-resort failover (Akamai is quite pricey)
# Solutions?:
The big question is how best to implement this in a way that’s low-maintenance and cost-effective.
I’ve looked into solutions like Heroku, Laravel Vapor, AWS Elastic Beanstalk, Kubernetes, etc., but none seem super clear or easy to adopt without a steep DevOps learning curve nor offer all of the needed service management in a single gui.
I’ve used ploi.io with DigitalOcean for personal projects and really like the simplicity. I noticed Ploi offers the ability to create load balancers, standard web servers, Redis, spaces and managed DBs all via DigitalOcean. Is this option worth exploring further?
Is there a plug-and-play platform or combination of tools you’d recommend for this kind of Laravel multi-tenant deployment - ideally with built-in support for load balancing/scaling, redis, databases, SSL, backups and static cache fail over without requiring a full-time DevOps engineer?
Thanks in advance!
https://redd.it/1le4dom
@r_php
We have around 120 websites that all run on the same simple Laravel-based CMS. Each site is a separate standalone instance with its own database. The websites are basic service business sites, averaging under 1,000 visitors/day each. The websites are essentially just serve up content/data from their databases and without any complicated business logic or resource intensive operations.
# Current Setup:
120 sites are distributed across 3 Leaseweb VPS servers (\~40 each).
Each has its own free SSL certificate, which requires manual renewal.
Sites send occasional notification emails via SendGrid.
Weekly backups go to Amazon S3.
The current websites generate static html copies of all dynamic pages which Akamai serves up in the case of anything other than a 200 response - our last-resort failover layer.
This setup has become difficult to maintain - instability, performance inconsistency and high costs are ongoing issues.
# Goals:
I want to simplify the entire setup while keeping costs reasonable and minimizing DevOps work. I’m a software engineer but relatively new to managing infrastructure at this scale. Here’s my rough plan:
Convert the CMS to support multi-tenancy with dynamic DB switching middleware based on domain.
Run a small number of CMS instances on geographically distributed servers behind a load balancer (or possibly a serverless/cloud environment).
Use a single centralized Redis server for caching/sessions/queue.
Host all tenant databases on a dedicated DB server.
Store media (logos, site specific imagery, etc.) on S3 or similar.
Automate SSL cert renewal
Use something like Cloudflare Always Online or similar CDN as a last-resort failover (Akamai is quite pricey)
# Solutions?:
The big question is how best to implement this in a way that’s low-maintenance and cost-effective.
I’ve looked into solutions like Heroku, Laravel Vapor, AWS Elastic Beanstalk, Kubernetes, etc., but none seem super clear or easy to adopt without a steep DevOps learning curve nor offer all of the needed service management in a single gui.
I’ve used ploi.io with DigitalOcean for personal projects and really like the simplicity. I noticed Ploi offers the ability to create load balancers, standard web servers, Redis, spaces and managed DBs all via DigitalOcean. Is this option worth exploring further?
Is there a plug-and-play platform or combination of tools you’d recommend for this kind of Laravel multi-tenant deployment - ideally with built-in support for load balancing/scaling, redis, databases, SSL, backups and static cache fail over without requiring a full-time DevOps engineer?
Thanks in advance!
https://redd.it/1le4dom
@r_php
Ploi
Ploi - Server Management Tool
Use Ploi.io for easy site deployments. We take all the difficult work out of your hands, so you can focus on doing what you love: developing your application.
SymfonyOnline June 2025: Speakers, Stats & Replays!
https://symfony.com/blog/symfonyonline-june-2025-speakers-stats-and-replays?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1lebfv8
@r_php
https://symfony.com/blog/symfonyonline-june-2025-speakers-stats-and-replays?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1lebfv8
@r_php
Symfony
SymfonyOnline June 2025: Speakers, Stats & Replays! (Symfony Blog)
Thank you for being part of #SymfonyOnline June 2025! 🌍300 attendees, 15 talks, and a whole lot of Symfony love 💙 Replays now online! 🎬
Typehinting Laravel validation rules using PHPStan's type aliases
https://ohdear.app/news-and-updates/typehinting-laravel-validation-rules-using-phpstans-type-aliases
https://redd.it/1led0d0
@r_php
https://ohdear.app/news-and-updates/typehinting-laravel-validation-rules-using-phpstans-type-aliases
https://redd.it/1led0d0
@r_php
Oh Dear
Typehinting Laravel validation rules using PHPStan's type aliases
Here's the story of how we use static analysis, and how we use type aliases to make type hints more readable.
Typehinting Laravel validation rules using PHPStan's type aliases
https://ohdear.app/news-and-updates/typehinting-laravel-validation-rules-using-phpstans-type-aliases
https://redd.it/1ledbk4
@r_php
https://ohdear.app/news-and-updates/typehinting-laravel-validation-rules-using-phpstans-type-aliases
https://redd.it/1ledbk4
@r_php
Oh Dear
Typehinting Laravel validation rules using PHPStan's type aliases
Here's the story of how we use static analysis, and how we use type aliases to make type hints more readable.
olvlvl/composer-attribute-collector v2.1.0
composer-attribute-collector is a Composer plugin designed to effectively discover PHP 8 attribute targets, and later retrieve them at near zero cost, without runtime reflection. After the autoloader dump, it collects attributes and generates a static file for fast access. This provides a convenient way to discover attribute-backed classes, methods, or properties—ideal for codebase analysis. (For known targets, traditional reflection remains an option.)
v2.1.0 highlights:
- The attribute collection expands to parameters. Special thanks to Markus Staab and Ondřej Mirtes for the contribution.
- The attribute collection expands to interfaces.
- The collector runs as a system command to avoid clashes between package versions used by Composer and the codebase.
- Use cases for Symfony and Laravel.
https://github.com/olvlvl/composer-attribute-collector
https://redd.it/1leepe1
@r_php
composer-attribute-collector is a Composer plugin designed to effectively discover PHP 8 attribute targets, and later retrieve them at near zero cost, without runtime reflection. After the autoloader dump, it collects attributes and generates a static file for fast access. This provides a convenient way to discover attribute-backed classes, methods, or properties—ideal for codebase analysis. (For known targets, traditional reflection remains an option.)
v2.1.0 highlights:
- The attribute collection expands to parameters. Special thanks to Markus Staab and Ondřej Mirtes for the contribution.
- The attribute collection expands to interfaces.
- The collector runs as a system command to avoid clashes between package versions used by Composer and the codebase.
- Use cases for Symfony and Laravel.
https://github.com/olvlvl/composer-attribute-collector
https://redd.it/1leepe1
@r_php
GitHub
GitHub - olvlvl/composer-attribute-collector: A convenient and near zero-cost way to retrieve targets of PHP 8 attributes
A convenient and near zero-cost way to retrieve targets of PHP 8 attributes - olvlvl/composer-attribute-collector
Advantages of the match function
Hello all.
I'm a PHP teacher at college since 3 years, and a php developper for 7 years.
Recently, I've seen a lot of students using the
What's the point using it instead of simply using an associative array ? Like
It seems to me
The funny thing is also that I only started to see this function the last 3 months while PHP8.0 released 3 years ago. Maybe it's the default with GenAI ?
https://redd.it/1leeqnc
@r_php
Hello all.
I'm a PHP teacher at college since 3 years, and a php developper for 7 years.
Recently, I've seen a lot of students using the
match function that came with PHP8.0. Example :<?php
function translateHand(string $hand): string {
return match($hand) {
'rock' => 'pierre',
'paper' => 'papier',
'scissors' => 'ciseaux'
};
}
?>
What's the point using it instead of simply using an associative array ? Like
return $translations[$hand] ?It seems to me
match is an unnecessary wrapper in this case, hurting performances, readability and reusability.The funny thing is also that I only started to see this function the last 3 months while PHP8.0 released 3 years ago. Maybe it's the default with GenAI ?
https://redd.it/1leeqnc
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Building an OLX-like platform – ReactJS or PHP?
I'm building a marketplace platform similar to OLX with thousands of listings. SEO performance is critical (want to rank on search and AI tools like ChatGPT), and we plan to scale long-term. Torn between using ReactJS (with a Node backend or SSR) or a traditional PHP stack like Laravel.
What would you recommend for performance, SEO, and scalability?
https://redd.it/1legsnj
@r_php
I'm building a marketplace platform similar to OLX with thousands of listings. SEO performance is critical (want to rank on search and AI tools like ChatGPT), and we plan to scale long-term. Torn between using ReactJS (with a Node backend or SSR) or a traditional PHP stack like Laravel.
What would you recommend for performance, SEO, and scalability?
https://redd.it/1legsnj
@r_php
Reddit
From the PHP community on Reddit: Building an OLX-like platform – ReactJS or PHP?
Posted by Independent_You3573 - 0 votes and 5 comments
FluidGraph, a Memgraph OGM (Object Graph Manager)
Hi everyone. I've been working for the past month or so on FluidGraph (https://github.com/primd-cooperative/fluidgraph/) as part of a PWA I'm building for Primd (https://primd.app). With more tests completed and the API having stabilized, I'm throwing the "beta" label on it if anyone is interested in taking it for a spin.
### Why?
Graph databases are really interesting and really useful for the type of data we're looking to work with. While many people are familiar with Neo4J and some libraries exist in the PHP space for it, there are handful of issues that lead us to creating something new:
- There are subtle differences between Neo4J and Memgraph
- Many of the Neo4J projects are no longer maintained
- Many of the projects borrow too many concepts from traditional relational-databases
We needed something that allowed for a lot more power and flexibility as it relates to working with graph models.
### Key Features
- Work directly with the additional information Edges can carry by having common patterns for Edges and Nodes.
- Seemlessly represent nodes as multiple classes, taking full advantage of labeling and the type of horizontal polymorphism that Graphs are capable of. This is achieved by maintaining both Entity references as well as per-property references to their data.
- Relationship "forking" and "merging" provides ways to work with subsets of large relationships without requiring the whole relationship. This is in addition to Eager, Lazy, and Manual relationship loading modes being supported.
Happy to answer any additional questions about how it works or why it works the way it does. The README is a good starting point, but there's a lot of fairly complex concepts and inner workings (like the per-property references) being done here.
https://redd.it/1lejmb6
@r_php
Hi everyone. I've been working for the past month or so on FluidGraph (https://github.com/primd-cooperative/fluidgraph/) as part of a PWA I'm building for Primd (https://primd.app). With more tests completed and the API having stabilized, I'm throwing the "beta" label on it if anyone is interested in taking it for a spin.
### Why?
Graph databases are really interesting and really useful for the type of data we're looking to work with. While many people are familiar with Neo4J and some libraries exist in the PHP space for it, there are handful of issues that lead us to creating something new:
- There are subtle differences between Neo4J and Memgraph
- Many of the Neo4J projects are no longer maintained
- Many of the projects borrow too many concepts from traditional relational-databases
We needed something that allowed for a lot more power and flexibility as it relates to working with graph models.
### Key Features
- Work directly with the additional information Edges can carry by having common patterns for Edges and Nodes.
- Seemlessly represent nodes as multiple classes, taking full advantage of labeling and the type of horizontal polymorphism that Graphs are capable of. This is achieved by maintaining both Entity references as well as per-property references to their data.
- Relationship "forking" and "merging" provides ways to work with subsets of large relationships without requiring the whole relationship. This is in addition to Eager, Lazy, and Manual relationship loading modes being supported.
Happy to answer any additional questions about how it works or why it works the way it does. The README is a good starting point, but there's a lot of fairly complex concepts and inner workings (like the per-property references) being done here.
https://redd.it/1lejmb6
@r_php
GitHub
GitHub - primd-cooperative/fluidgraph: A Doctrine-inspired OGM for Bolt/Cypher Graph Databases
A Doctrine-inspired OGM for Bolt/Cypher Graph Databases - primd-cooperative/fluidgraph
Laminas is ending support for their MVC. How would you handle it?
With Laminas MVC taken out of active development, what is going to happen with existing projects? Do you think it's ok to pull support and promote another architecture or must MVC be supported forever?
https://getlaminas.org/blog/2025-06-06-laminas-mvc-is-retiring.html
https://redd.it/1leona4
@r_php
With Laminas MVC taken out of active development, what is going to happen with existing projects? Do you think it's ok to pull support and promote another architecture or must MVC be supported forever?
https://getlaminas.org/blog/2025-06-06-laminas-mvc-is-retiring.html
https://redd.it/1leona4
@r_php
getlaminas.org
Laminas Project - Laminas MVC Is Retiring
Complete Symfony + Metronic Tailwind Integration Guide
I've created a guide for integrating Keenthemes Metronic v9 Tailwind templates with Symfony.
What's covered:
\- Complete project setup and asset management
\- Converting HTML templates to Twig
\- Both sidebar and header layout demos
The guide includes working code examples. You can see the documentation at: https://keenthemes.com/metronic/tailwind/docs/getting-started/integration/symfony
Get the code: https://github.com/keenthemes/metronic-tailwind-html-integration
https://redd.it/1lf3xac
@r_php
I've created a guide for integrating Keenthemes Metronic v9 Tailwind templates with Symfony.
What's covered:
\- Complete project setup and asset management
\- Converting HTML templates to Twig
\- Both sidebar and header layout demos
The guide includes working code examples. You can see the documentation at: https://keenthemes.com/metronic/tailwind/docs/getting-started/integration/symfony
Get the code: https://github.com/keenthemes/metronic-tailwind-html-integration
https://redd.it/1lf3xac
@r_php
@keenthemes
Metronic - Tailwind CSS Symfony
Integrate Symfony with the Tailwind CSS based toolkit for creating scalable PHP web applications with professional UI components.
Pitch Your Project 🐘
In this monthly thread you can share whatever code or projects you're working on, ask for reviews, get people's input and general thoughts, … anything goes as long as it's PHP related.
Let's make this a place where people are encouraged to share their work, and where we can learn from each other 😁
Link to the previous edition: /u/brendt_gd should provide a link
https://redd.it/1lf573n
@r_php
In this monthly thread you can share whatever code or projects you're working on, ask for reviews, get people's input and general thoughts, … anything goes as long as it's PHP related.
Let's make this a place where people are encouraged to share their work, and where we can learn from each other 😁
Link to the previous edition: /u/brendt_gd should provide a link
https://redd.it/1lf573n
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community