PHP Reddit – Telegram
PHP Reddit
34 subscribers
289 photos
37 videos
24.8K links
Channel to sync with /r/PHP /r/Laravel /r/Symfony. Powered by awesome @r_channels and @reddit2telegram
Download Telegram
The laravel Hub

I’ve recently launched a new platform designed to be a centralized hub for everything related to PHP and Laravel.

Right now, you’ll find curated articles and packages, along with the ability to submit your own Laravel packages.

And this is just the beginning, many more features are coming soon, insha’Allah.

I'd love to hear your thoughts on the project and the idea behind it.
Check it out: https://laravel-hub.com
Follow the updates: https://x.com/TheLaravelHub

https://redd.it/1mdmuzb
@r_php
Digital Signatures

Hello everyone,

I have a very specific question about digital signatures. I have a PDF file and its corresponding digital signature generated in the CAdES format (.p7s, detached). What I need now is to embed this signature into the PDF itself, producing a PDF signed in the PAdES format (embedded signature).

Is it technically possible to take a .p7s and the original PDF and generate a new PDF with the signature embedded (PAdES)?

I work with PHP 8.1 and Laravel 9, but I’m open to solutions in other languages (Java, Python, etc.) or tools that perform this conversion. I’ve seen references to the DSS (Digital Signature Services) library by the European Commission, but I’m not sure if it can transform an existing .p7s into a PAdES-signed PDF.

Has anyone done this or can point me in the right direction?

Thanks in advance!\]

https://redd.it/1mdq74u
@r_php
I built Laravel Backbone – a package that helps you to create structured REST APIs in ~20 lines of code (early beta, feedback welcome)

I built a package called Laravel Backbone (https://github.com/khanhartisan/laravel-backbone) to make building REST APIs in Laravel cleaner and more maintainable, especially for larger projects.

Over time, I kept hitting the same pain points:

Controllers getting packed with repetitive CRUD logic
Scattered model event handling that’s hard to track and maintain
Deleting related data safely often requiring messy, manual steps

With Laravel Backbone, you can:

Spin up a full CRUD endpoint in about 15–20 lines of code
Use lifecycle hooks (before/after store, update, delete) with a simple visitor pattern
A better approach to structure your model event handlers, instead of a long-messy {Model}Observer.php
Handle cascading deletes/restores for SoftDeletes models, no DB constraint headaches
Speed up API testing with built-in CRUD test helpers

I’ve already used this package on a few personal and company projects, and it’s been running reliably.

That said, I’m calling this an early beta – if there’s enough interest and feedback, I’ll put in more time to harden it and release a production-stable version.

Would love to hear your thoughts:

Is this something you’d actually use?
Anything I should rethink or improve before pushing for stable release?

Repo link https://github.com/khanhartisan/laravel-backbone

Comments, issues, or DMs are all welcome – happy to chat with anyone who’s interested.

Thanks for reading – and thanks in advance for your feedback

https://redd.it/1mdr919
@r_php
Livewire 4 emoji

Livewire 4 was just announced with the ability to put an emoji on the filename to automatically make it a livewire component, from your components folder.

So what are you guys thinking about this ?

https://preview.redd.it/mgv41nb8o5gf1.png?width=423&format=png&auto=webp&s=59a026cfc143a779c9b137784e1f4607d010ec4a

I don't like it lol I'm gonna stick with the old way if I can

https://redd.it/1mdufsj
@r_php
Should I implement my own Chat feature (with libsodium) ?

I'm working on a fiverr-like website and contemplating weither or not I should implement a chat feature to simplify communication between freelancers and client.

The interface and web-socket is already set-up, however I'd also like to garantee maximum security/privacy through message encryption, something I know is better done by true professionals.

If I do implement it myself however, I intend on making it extremely limited. It won't be accessible unless there is an active job ongoing, and it won't have any fancy features like vocal message, image uploading or even emojis for that matter, as it's meant to be used strictly to professional ends for now. Users should't have any particular reason to share personal infos and I intend on encouraging them not to.

I've thought about using a third-party bundle as it's clearly the lightest, safest route, but right now the available options (TalkJs, CometChat, ect..) are simply too pricy for me, especially considering how most of it seems to justify itself with a lot of unneeded features.

So my question is : Is my farely basic knowledge of libsodium enough for a light, limited chat feature until I can afford something better or should I skip on it altogether ?

If not implemented there's ways for me to work-around it but I'm afraid users might find the process too steep and get turned off from the plateform as a result.

FYI I'm mostly working with Symfony.

https://redd.it/1mdyds5
@r_php
One Year of PHP at Scale: Reflections on Community, Research, and Impact

In five days, my newsletter, PHP at Scale, will mark its first year of publication. Reflecting on this milestone, I’ve been considering what creating this newsletter has brought to my work and the PHP community. Here’s my sum up:

* Reddit Discussions: This one is unexpected to me, as I have never used Reddit prior to my newsletter, and was suggested by a colleague that it might be a good place to share my newsletter and insights. Yet the conversation about it here has been the most significant benefit. Your insights and debates have directly inspired some newsletter editions or ideas.
* Research: Second most valuable thing I would say is research. Preparing each issue requires extensive research. This process consistently adds some interesting details my understanding, much like preparing for a technical presentation.
* Newsletter itself: While it’s encouraging to see the number of subscribers and views grow, the newsletter itself hasn’t yet delivered substantial value beyond that metric. I value knowing readers engage with the content, but I’m still seeking deeper interactions or outcomes from it.

I’m interested in your perspectives on creating or engaging with technical content, whether newsletters, blogs, or community discussions. What motivates you to contribute or follow such resources? If you produce content, how do you select topics that resonate? I remain committed to crafting each issue manually, prioritizing authenticity over automated tools, and I’d appreciate your thoughts on this approach or suggestions for future topics.

You can explore my latest insights on scaling PHP applications here: [https://phpatscale.substack.com/p/php-at-scale-11](https://phpatscale.substack.com/p/php-at-scale-11)

https://redd.it/1mdz7lz
@r_php
Nightwatch has been out for a while, what are your thoughts?

I gave Nightwatch a try for about a month but I eventually moved back to Sentry, the number one reason being the cost. Sentry has stuff I need, like logging and at a much more reasonable price.

I'm not sure what the target audience is for Nightwatch, I use Laravel daily but I felt like it wasn't a good deal compared to other offerings available.

If you're still using Nightwatch, or have used it and switched, why? What are your thoughts on the product?

https://redd.it/1meb5ya
@r_php
Blaze by Caleb Porzio for blade components speed looks awesome and not just for Livewire
https://youtu.be/GM0glP77tsA?t=20371

https://redd.it/1medlta
@r_php
Asynchronous server vs Coroutine style server in swoole.

I wanted to try and test the basics of Swoole. While reading the documentation on its official site, I noticed there are two ways to write a Swoole HTTP server:

1. Asynchronous server

use Swoole\Http\Server
$http = new Server("127.0.0.1", 9501);
$http->on('request', function ($request, $response) {
$response->end("<h1>Hello Swoole. #".rand(1000, 9999)."</h1>");
});
$http->start();

2. Coroutine style

use Swoole\Coroutine\Http\Server;
use function Swoole\Coroutine\run;
run(function () {
$server = new Server('127.0.0.1', 9502, false);
$server->handle('/', function ($request, $response) {
$response->end("<h1>Index</h1>");
});
$server->handle('/test', function ($request, $response) {
$response->end("<h1>Test</h1>");
});
$server->handle('/stop', function ($request, $response) use ($server) {
$response->end("<h1>Stop</h1>");
$server->shutdown();
});
$server->start();
});

It looks like the asynchronous style is more popular and widely used. However, I wanted to know the differences, challenges, and performance comparisons between these two approaches.

Has anyone tried both methods and found which one is better or more suitable for a large application in production?

https://redd.it/1mepltl
@r_php
Comprehensive analysis of the entire Packagist.org packages as of 2025-07-31 related to package size

Hi. I run the Bettergist Collector which creates the Packagist Archive now three times a week. As of July 30th, 2025, I can give you the following stats:

Of 430,678 packages in packagist.org since 2019-04-29 when the packagist archive started, 406,404 packages are stored in the Bettergist archive. 24,274 packages (0.56%) have been lost forever (or possibly can be found in the 2020 archive).

Of these, 395,678 packages were archived via packagist.org on 2024-07-31. 406,404 in 2025-07-31.

20,109 new composer projects since 2025-01-01, and 39,746 created since 2024-07-31. 422,860 projects are listed in packagist.org, so 37,908 packages have been deleted or lost since 2024-07-31 (subtract 10,726 new packages from 27,182 lost packages as of 2024-07-31), or 8.97%.

99.5% of all packages are 50.56 MB or less. This represents an increase of 2.38 MB since 2024-07-31 (4.94%).

The top 1% of largest packages use 137.34 MB or more (450 packages).

The total disk space of the Bettergist Archive: 645,798 MB, of which the Biggest 1% use up 138,625 MB (21.4%). The Biggest 5% (2,246 projects) use up 280,044 MB (43.35%) and this is why they are (mostly) excluded from the Bootstrap A Dead World USBs which are hiidden all over the world.

In the Top 1,000 most-stared projects, 50 are bigger than the 50 MB cut off and are included anyway. These 50 projects take up 7,317 MB (~7.3 GB) and have an average disk space of 146 MB and a median of 125 MB.

The biggest packages:

1. acosf/archersys - 8.65 GB - 4 installs - 3 github stars
2. inpsyde/gutenberg-versions-mirror - 6.58 GB - 126 installs - 0 stars
3. robiningelbrecht/wca-rest-api - 5.24 GB - 0 installs - 20 stars
4. khandieyea/nzsdf - 2.82 GB - 1004 installs - 1 star
5. srapsware/domaindumper - 2.34 GB - 15 installs - 21 stars

There are 12 packages using more than 1 GB, and they collectively use 35.84 GB. Of these, 6 have 0 github stars, 8 have less than 3 stars, and none of them have more than 64 stars. They have very low install rates, a median of 12 composer installs.

68 projects have more than 10,000 classes. Of these, the top 10 are:

| Package | Classes | Methods | Disk Space |
|---------|---------|---------|------------|
| sunaoka/aws-sdk-php-structures | 95,819 | 79,408 | 400,272 |
| microsoft/microsoft-graph-beta | 59,836 | 246,571 | 417,352 |
| tencentcloud/tencentcloud-sdk-php | 36,183 | 72,398 | 209,216 |
| datadog/dd-trace | 34,824 | 190,018 | 778,348 |
| microsoft/microsoft-graph | 34,436 | 135,560 | 232,672 |
| inpsyde/wp-stubs | 33,720 | 349,713 | 307,028 |
| udemy/googleads-php-lib | 32,540 | 104,360 | 43,400 |
| acosf/archersys | 31,344 | 235,313 | 8,649,176 |
| cmutter/google-adwords-api | 30,692 | 98,584 | 43,228 |
| huaweicloud/huaweicloud-sdk-php | 29,836 | 681,364 | 411,420 |

Not sure what else to report based on size...

https://redd.it/1mf1hya
@r_php
Mailpit: Simple Local Email Testing for Laravel

Mailpit is a local SMTP server that lets you preview Laravel emails in the browser without actually sending them. Perfect for safe email testing during development.

https://laravel-hub.com/blog/mailpit-simple-local-email-testing-for-laravel

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