Visibility blocks?
Does anyone know if there's a way to do or if there's any intention on adding visibility blocks, ala Pascal? I'm thinking something along the lines of:
public function construct(
public {
string $id = '',
DateTime $dateCreated = new DateTime(),
Cluster $suggestions = new Cluster(Suggested::class),
?string $firstName = NULL,
?string $lastName = NULL,
}
) {
if (empty($id)) {
$this->id = Uuid::uuid7();
}
}
If not, is this something other people would find nice? Obviously you'd want to make it work in other contexts, not just constructor promotion.
https://redd.it/1kbhte5
@r_php
Does anyone know if there's a way to do or if there's any intention on adding visibility blocks, ala Pascal? I'm thinking something along the lines of:
public function construct(
public {
string $id = '',
DateTime $dateCreated = new DateTime(),
Cluster $suggestions = new Cluster(Suggested::class),
?string $firstName = NULL,
?string $lastName = NULL,
}
) {
if (empty($id)) {
$this->id = Uuid::uuid7();
}
}
If not, is this something other people would find nice? Obviously you'd want to make it work in other contexts, not just constructor promotion.
https://redd.it/1kbhte5
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Is the Internation PHP Conference still a thing ? Is it worth it for a WP dev ?
I work for a company that owns a big Wordpress website, my new manager is very excited with the idea of sending me around to in-site conferences, thing is I'm not used to this, so I'm just looking for worthwhile conferences to increase my knowledge and grow as a dev and at the same time enjoy this opportunity of my manager thinking that he needs to send me around that most likely won't last a long time...
I saw that before the IPC International PHP Conference was a thing, but while trying to look for references to see how worthwhile it was I could not find almost anything, so I come to you PHP folks to see if it is.
https://redd.it/1kbiw3w
@r_php
I work for a company that owns a big Wordpress website, my new manager is very excited with the idea of sending me around to in-site conferences, thing is I'm not used to this, so I'm just looking for worthwhile conferences to increase my knowledge and grow as a dev and at the same time enjoy this opportunity of my manager thinking that he needs to send me around that most likely won't last a long time...
I saw that before the IPC International PHP Conference was a thing, but while trying to look for references to see how worthwhile it was I could not find almost anything, so I come to you PHP folks to see if it is.
https://redd.it/1kbiw3w
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
How I can initialize the db from a Dump before db migration during local db setup for development?
In my work the migrations are generated like this:
```
php bin/console doctrine:migrations:diff
```
And then any generated SQL is run manually upon db instead of `doctrine:migrations:execute` or `doctrine:migrations:migrate`. That results each developer having its own db.
Also same thing happend upon deployment as well therefore I am practically I am without any relable way of setting up db or in case ot a db reset I may lose any changes upon db.
Therefore I want to introduce a db migration procedure upon development use a schema-onlt db dump from a staging/production release and start migrating onwards. Development db would be initialized first from the db dump and then we would generate manually each change as db migration noscript.
How I can use a Db dump as an initial migration in symfony?
https://redd.it/1kbih13
@r_php
In my work the migrations are generated like this:
```
php bin/console doctrine:migrations:diff
```
And then any generated SQL is run manually upon db instead of `doctrine:migrations:execute` or `doctrine:migrations:migrate`. That results each developer having its own db.
Also same thing happend upon deployment as well therefore I am practically I am without any relable way of setting up db or in case ot a db reset I may lose any changes upon db.
Therefore I want to introduce a db migration procedure upon development use a schema-onlt db dump from a staging/production release and start migrating onwards. Development db would be initialized first from the db dump and then we would generate manually each change as db migration noscript.
How I can use a Db dump as an initial migration in symfony?
https://redd.it/1kbih13
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
Your favorite Laravel API tools for quick setup + docs?
Hey r/laravel!
I’m playing around with APIs in Laravel and testing out [API Platform](https://api-platform.com/). It feels powerful, but I’m curious—what have you used in real projects to get an API up and running fast and generate docs automatically?
I’m especially interested in:
* Packages that handle routes, controllers, and docs with minimal setup
* Tools that keep OpenAPI/Swagger or Postman exports in sync as your code evolves
* Any gotchas, tips, or simple noscripts that save you headaches
For a bit of background, I’m building [Relaticle](https://relaticle.com/) (an open-source CRM on Laravel 12 + Filament 3), so good API docs are crucial for us.
**Share your go-to tools or workflows below—I’d love to hear what’s working for you!**
*Looking forward to learning from your experiences!*
https://redd.it/1kbtiu2
@r_php
Hey r/laravel!
I’m playing around with APIs in Laravel and testing out [API Platform](https://api-platform.com/). It feels powerful, but I’m curious—what have you used in real projects to get an API up and running fast and generate docs automatically?
I’m especially interested in:
* Packages that handle routes, controllers, and docs with minimal setup
* Tools that keep OpenAPI/Swagger or Postman exports in sync as your code evolves
* Any gotchas, tips, or simple noscripts that save you headaches
For a bit of background, I’m building [Relaticle](https://relaticle.com/) (an open-source CRM on Laravel 12 + Filament 3), so good API docs are crucial for us.
**Share your go-to tools or workflows below—I’d love to hear what’s working for you!**
*Looking forward to learning from your experiences!*
https://redd.it/1kbtiu2
@r_php
API Platform
Create REST and GraphQL APIs, scaffold Jamstack webapps, stream changes in real-time.
New in Symfony 7.3: Extra Runtime Dot Env Files
https://symfony.com/blog/new-in-symfony-7-3-extra-runtime-dot-env-files?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1kc468u
@r_php
https://symfony.com/blog/new-in-symfony-7-3-extra-runtime-dot-env-files?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1kc468u
@r_php
Symfony
New in Symfony 7.3: Extra Runtime Dot Env Files (Symfony Blog)
Symfony 7.3 adds support for loading multiple runtime .env files, making environment configuration more flexible and dynamic.
Filament with Tailwind CSS v4
As there seems to be a lot of confusion around using Filament with Tailwind CSS v3 in Laravel projects that have Tailwind CSS v4 installed (default since Laravel 12), I decided to write a guide on setting up Vite with both versions of Tailwind CSS side by side.
If there are any questions or issues you encounter, I’m more than happy to assist in the comments. 😊
https://redd.it/1kc54ae
@r_php
As there seems to be a lot of confusion around using Filament with Tailwind CSS v3 in Laravel projects that have Tailwind CSS v4 installed (default since Laravel 12), I decided to write a guide on setting up Vite with both versions of Tailwind CSS side by side.
If there are any questions or issues you encounter, I’m more than happy to assist in the comments. 😊
https://redd.it/1kc54ae
@r_php
Filamentthemes
How to use Filament with Tailwind CSS v4
Laravel 12 ships with version 4 of Tailwind CSS, while Filament v3 only supports version 3. This guide walks you through setting up Tailwind CSS v3 alongside v4.
Perforce reintroduce the Zend PHP Certification
The Zend PHP Certified Engineer exam is officially back.
Invest in your team’s success through this exam, which covers topics across the language and through PHP 8.4. Upon passing, all PHP Certified Engineers will receive a badge and a certificate to showcase their achievement.
Act now to access:
\- Team Discounts – Purchase two exams, get one free.
\- In-Depth Preparation – Sign up for our three Zend PHP Certified Engineer prep courses before June 30, 2025, and receive 50% off the full price.
\- Practice Exam – Familiarize your team with the test through a no-cost practice exam.
Ready to set a consistent knowledge base for your team, prove your business’s expertise, and earn an edge over the competition?
https://www.zend.com/training/php-certification-exam
https://redd.it/1kcboed
@r_php
The Zend PHP Certified Engineer exam is officially back.
Invest in your team’s success through this exam, which covers topics across the language and through PHP 8.4. Upon passing, all PHP Certified Engineers will receive a badge and a certificate to showcase their achievement.
Act now to access:
\- Team Discounts – Purchase two exams, get one free.
\- In-Depth Preparation – Sign up for our three Zend PHP Certified Engineer prep courses before June 30, 2025, and receive 50% off the full price.
\- Practice Exam – Familiarize your team with the test through a no-cost practice exam.
Ready to set a consistent knowledge base for your team, prove your business’s expertise, and earn an edge over the competition?
https://www.zend.com/training/php-certification-exam
https://redd.it/1kcboed
@r_php
Zend
PHP Certification Exam | Zend
The Zend Certified PHP Engineer is an industry-wide standard for PHP developers. Join your peers and get certified with this exam.
Laravel Cloud Pricing Calculator 🧮
https://preview.redd.it/isa83t3q87ye1.png?width=1556&format=png&auto=webp&s=b3b9250b3bf8ca24f9102179c9e11fb72cec1ab3
👋🏻 Howdy r/laravel! We've heard your feedback about Laravel Cloud pricing so we've shipped a bunch of updates including a ✨shiny✨ new pricing calculator. This is just v1 and I would love your feedback on how we can improve it and make it better for you to estimate your Cloud costs.
https://cloud.laravel.com/pricing/calculator
Also Chris Sev published a blog post & video walkthrough of everything we've added to improve visbility into your Cloud costs, you can check those out here:
https://blog.laravel.com/5-tools-to-estimate-your-laravel-cloud-bill
https://www.youtube.com/watch?v=ujlMw-\_XGCA
https://redd.it/1kcdcrj
@r_php
https://preview.redd.it/isa83t3q87ye1.png?width=1556&format=png&auto=webp&s=b3b9250b3bf8ca24f9102179c9e11fb72cec1ab3
👋🏻 Howdy r/laravel! We've heard your feedback about Laravel Cloud pricing so we've shipped a bunch of updates including a ✨shiny✨ new pricing calculator. This is just v1 and I would love your feedback on how we can improve it and make it better for you to estimate your Cloud costs.
https://cloud.laravel.com/pricing/calculator
Also Chris Sev published a blog post & video walkthrough of everything we've added to improve visbility into your Cloud costs, you can check those out here:
https://blog.laravel.com/5-tools-to-estimate-your-laravel-cloud-bill
https://www.youtube.com/watch?v=ujlMw-\_XGCA
https://redd.it/1kcdcrj
@r_php
Quick question about Guzzle that I cant find an answer to in the docs
Hey guys,
I figured I'd ask about a problem I'm having here because I can't seem to find anything on Google or in Guzzle docs (maybe I'm blind?).
I have a set of requests all going to the same URL. The requests are bundled in an array such that
I'm trying to find a way to attach a UNIQUE ID to each request so that in the
As far as I can tell, the PSR7 Request interface does not offer a way to attach an "ID" other than via Headers, which gets sent with the request to the server, causing issues as requests with unknown headers are rejected.
Only thread I found about this is here: https://github.com/guzzle/guzzle/issues/1460#issuecomment-216539884
And unfortunately that solution does not work in my case. Is there any other way of doing this?
Thanks in advance!
https://redd.it/1kcijpe
@r_php
Hey guys,
I figured I'd ask about a problem I'm having here because I can't seem to find anything on Google or in Guzzle docs (maybe I'm blind?).
I have a set of requests all going to the same URL. The requests are bundled in an array such that
$request_pool = [];
foreach ($this->requests as $request)
$request_pool[] = $client->sendAsync($request);
Utils::settle($request_pool)->wait();
I'm trying to find a way to attach a UNIQUE ID to each request so that in the
RetryDecider middlewear I can parse the response and figure out if it should be retried based on the validity of said response rather than just using the typical retry based on Response Code.As far as I can tell, the PSR7 Request interface does not offer a way to attach an "ID" other than via Headers, which gets sent with the request to the server, causing issues as requests with unknown headers are rejected.
Only thread I found about this is here: https://github.com/guzzle/guzzle/issues/1460#issuecomment-216539884
And unfortunately that solution does not work in my case. Is there any other way of doing this?
Thanks in advance!
https://redd.it/1kcijpe
@r_php
GitHub
Guzzle 6: Is it possible to somehow "tag" Requests/Responses? · Issue #1460 · guzzle/guzzle
I have to handle different types (e.g. different URLs) of Request/Responses in an async manner using a Pool. But in the fulfilled-callback I have only access to PSR-7 Response attributes, and I was...
The mysqli extension is missing when using XAMPP
Hello. Apologies if this is the wrong place to post this but i have been majorly stuck with this issue and its driving me nuts. I setup xampp v3.3.0 and within it i have php 8.3.20.
I have tried the following:
I have added these to my php.ini (with and without .dll):
extension=php_mysqli.dll
extension=php\_pdo\_mysql.dll
I have tried adding full file paths with the same issue.
I have added this above: extension\_dir="C:\\xampp\\php\\ext"
I have uncommented extensions that mysqli relies on
extension=bz2
extension=curl
;extension=ffi
;extension=ftp
extension=fileinfo
extension=gd
extension=zip
extension=gettext
;extension=gmp
extension=intl
;extension=imap
;extension=ldap
extension=mbstring
extension=exif ; Must be after mbstring as it depends on it
;extension=oci8\_12c ; Use with Oracle Database 12c Instant Client
;extension=oci8_19 ; Use with Oracle Database 19 Instant Client
;extension=odbc
;extension=openssl
;extension=pdo\_firebird
extension=php_mysqli.dll
extension=php\_pdo\_mysql.dll
;extension=pdo_oci
;extension=pdo\_odbc
;extension=pdo_pgsql
extension=pdo\_sqlite
I confirm the mysqli files all exist under the ext directory.
I tried clearing cache
I added both xampp and xampp/php to the environment variables
Im seriously stuck and this is a massive problem because i use this environment for work but im super stumped on what else to try. Any help would be greatly appreciated.
https://redd.it/1kckx40
@r_php
Hello. Apologies if this is the wrong place to post this but i have been majorly stuck with this issue and its driving me nuts. I setup xampp v3.3.0 and within it i have php 8.3.20.
I have tried the following:
I have added these to my php.ini (with and without .dll):
extension=php_mysqli.dll
extension=php\_pdo\_mysql.dll
I have tried adding full file paths with the same issue.
I have added this above: extension\_dir="C:\\xampp\\php\\ext"
I have uncommented extensions that mysqli relies on
extension=bz2
extension=curl
;extension=ffi
;extension=ftp
extension=fileinfo
extension=gd
extension=zip
extension=gettext
;extension=gmp
extension=intl
;extension=imap
;extension=ldap
extension=mbstring
extension=exif ; Must be after mbstring as it depends on it
;extension=oci8\_12c ; Use with Oracle Database 12c Instant Client
;extension=oci8_19 ; Use with Oracle Database 19 Instant Client
;extension=odbc
;extension=openssl
;extension=pdo\_firebird
extension=php_mysqli.dll
extension=php\_pdo\_mysql.dll
;extension=pdo_oci
;extension=pdo\_odbc
;extension=pdo_pgsql
extension=pdo\_sqlite
I confirm the mysqli files all exist under the ext directory.
I tried clearing cache
I added both xampp and xampp/php to the environment variables
Im seriously stuck and this is a massive problem because i use this environment for work but im super stumped on what else to try. Any help would be greatly appreciated.
https://redd.it/1kckx40
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Backdoor Activates in Magento Supply Chain Attack Impacting 1000 Stores
https://cyberinsider.com/backdoor-activates-in-magento-supply-chain-attack-impacting-1000-stores/
https://redd.it/1kcktte
@r_php
https://cyberinsider.com/backdoor-activates-in-magento-supply-chain-attack-impacting-1000-stores/
https://redd.it/1kcktte
@r_php
CyberInsider
Backdoor Activates in Magento Supply Chain Attack Impacting 1000 Stores
A supply chain attack has compromised dozens of Magento-based ecommerce modules, injecting a backdoor that lay dormant for six years.
I've spent 10+ years in PHP — Here's what I wish I knew earlier (especially for beginners)
After a decade of building everything from small tools to full-fledged platforms in PHP, I thought I’d share a few things I wish someone had told me earlier. Hope this helps someone starting out or even those stuck in the middle:
1. Use modern PHP — PHP 8+ is awesome. Strong typing, attributes, JIT — don’t write PHP like it’s 2010.
2. Frameworks aren’t everything — Laravel is amazing, but understanding the core PHP concepts (OOP, HTTP handling, routing, etc.) makes you dangerous in a good way.
3. Stop writing raw SQL everywhere — Use Eloquent or at least PDO with prepared statements to avoid headaches and security issues.
4. Testing saves lives — Even basic PHPUnit tests can save you from late-night debugging nightmares.
5. Composer is your best friend — Learn it well. It turns PHP into a modern ecosystem.
6. Invest in debugging skills — Learn Xdebug or at least proper logging with Monolog. Dump-and-die will only take you so far.
7. Use tools like PHPStan or Psalm — They will catch issues before they become bugs.
8. Security isn’t optional — Validate, sanitize, escape. Always.
9. Build side projects — That’s how I learned 90% of what I now use in client projects.
10. Join the community — Reddit, Discord, GitHub, Laracasts forums. You’ll grow 10x faster.
Curious to hear from you all:
What are your top “I wish I knew this earlier” PHP lessons?
https://redd.it/1kcmy5h
@r_php
After a decade of building everything from small tools to full-fledged platforms in PHP, I thought I’d share a few things I wish someone had told me earlier. Hope this helps someone starting out or even those stuck in the middle:
1. Use modern PHP — PHP 8+ is awesome. Strong typing, attributes, JIT — don’t write PHP like it’s 2010.
2. Frameworks aren’t everything — Laravel is amazing, but understanding the core PHP concepts (OOP, HTTP handling, routing, etc.) makes you dangerous in a good way.
3. Stop writing raw SQL everywhere — Use Eloquent or at least PDO with prepared statements to avoid headaches and security issues.
4. Testing saves lives — Even basic PHPUnit tests can save you from late-night debugging nightmares.
5. Composer is your best friend — Learn it well. It turns PHP into a modern ecosystem.
6. Invest in debugging skills — Learn Xdebug or at least proper logging with Monolog. Dump-and-die will only take you so far.
7. Use tools like PHPStan or Psalm — They will catch issues before they become bugs.
8. Security isn’t optional — Validate, sanitize, escape. Always.
9. Build side projects — That’s how I learned 90% of what I now use in client projects.
10. Join the community — Reddit, Discord, GitHub, Laracasts forums. You’ll grow 10x faster.
Curious to hear from you all:
What are your top “I wish I knew this earlier” PHP lessons?
https://redd.it/1kcmy5h
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Do PHP shops tend to use the cloud / CI/CD or not?
Hi. Sorry if this is a dumb question, but I'm wondering if PHP shops tend to deploy their sites to the cloud, using Jenkins / Bitbucket Pipelines / Github Actions or whatever, or if such sites still tend to be 'deployed' to traditional hosting, e.g. Linode? I get the sense that the PHP world is a bit...dusty, you see. I tend to see cloud / CI/CD mentioned more on Java/C# job ads as a 'nice to have'.
https://redd.it/1kcpokp
@r_php
Hi. Sorry if this is a dumb question, but I'm wondering if PHP shops tend to deploy their sites to the cloud, using Jenkins / Bitbucket Pipelines / Github Actions or whatever, or if such sites still tend to be 'deployed' to traditional hosting, e.g. Linode? I get the sense that the PHP world is a bit...dusty, you see. I tend to see cloud / CI/CD mentioned more on Java/C# job ads as a 'nice to have'.
https://redd.it/1kcpokp
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
New in Symfony 7.3: Configurable Compound Rate Limiter
https://symfony.com/blog/new-in-symfony-7-3-configurable-compound-rate-limiter?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1kcwcki
@r_php
https://symfony.com/blog/new-in-symfony-7-3-configurable-compound-rate-limiter?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1kcwcki
@r_php
Symfony
New in Symfony 7.3: Configurable Compound Rate Limiter (Symfony Blog)
In Symfony 7.3, you can now configure compound rate limiters without writing custom code.
NativePHP for Mobile (with Android) is here! 🚀
https://nativephp.com/mobile
https://redd.it/1kcy0vk
@r_php
https://nativephp.com/mobile
https://redd.it/1kcy0vk
@r_php
Nativephp
Build native applications, with the tools you already know.
SymfonyOnline June 2025 : Efficient Web Scraping with Symfony & PHP
https://symfony.com/blog/symfonyonline-june-2025-efficient-web-scraping-with-symfony-and-php?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1kd0cfp
@r_php
https://symfony.com/blog/symfonyonline-june-2025-efficient-web-scraping-with-symfony-and-php?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1kd0cfp
@r_php
Symfony
SymfonyOnline June 2025 : Efficient Web Scraping with Symfony & PHP (Symfony Blog)
Learn how to scrape the web efficiently and ethically with Symfony & PHP. 🎤 Efficient Web Scraping with Symfony & PHP with Suparn Padma Patra at #SymfonyOnline June 2025
Which code style tool warns you from too high complexity?
Hi,
I once worked on a php project and phpstorm would show me a warning in the editor when I nested codeblocks too deep like 4 nested if conditions.
I can't find that tool anywhere. I set up phpstan and php-cs-fixer but nothing. maybe it's some kind of custom rule?
https://redd.it/1kd14m1
@r_php
Hi,
I once worked on a php project and phpstorm would show me a warning in the editor when I nested codeblocks too deep like 4 nested if conditions.
I can't find that tool anywhere. I set up phpstan and php-cs-fixer but nothing. maybe it's some kind of custom rule?
https://redd.it/1kd14m1
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community