Doctrine-CipherSweet : Searchable encryption for Doctrine ORM and Symfony apps
https://github.com/paragonie/doctrine-ciphersweet
https://redd.it/1nvy7zs
@r_php
https://github.com/paragonie/doctrine-ciphersweet
https://redd.it/1nvy7zs
@r_php
GitHub
GitHub - paragonie/doctrine-ciphersweet: Use searchable encryption with Doctrine ORM, powered by CipherSweet. Useful for Symfony…
Use searchable encryption with Doctrine ORM, powered by CipherSweet. Useful for Symfony apps. - paragonie/doctrine-ciphersweet
I am creating a microservice framework for PHP using Swoole
Hey all,
I recently discovered Swoole and decided to learn it a bit more so I decided to write a microservice framework that's built on top of Swoole.
This is currently a work in progress but I thought I'd share it to see if I could get some feedback.
https://github.com/Kekke88/Mononoke
Contributions are also welcome, this is my first open source project so things might be a bit unstructured. Any tips and suggestions on this is highly appreciated.
https://redd.it/1nvxjro
@r_php
Hey all,
I recently discovered Swoole and decided to learn it a bit more so I decided to write a microservice framework that's built on top of Swoole.
This is currently a work in progress but I thought I'd share it to see if I could get some feedback.
https://github.com/Kekke88/Mononoke
Contributions are also welcome, this is my first open source project so things might be a bit unstructured. Any tips and suggestions on this is highly appreciated.
https://redd.it/1nvxjro
@r_php
GitHub
GitHub - Kekke88/Mononoke: Microservice framework in PHP using ReactPHP
Microservice framework in PHP using ReactPHP. Contribute to Kekke88/Mononoke development by creating an account on GitHub.
Plea for help! Does anyone have/know where I could obtain the brandonwamboldt/utilphp package?
Hello!
I've got a very old Dockerised project, for the website of a family member's small business, it was built \~8 years ago with Bolt CMS 3.2, and has basically been ticking along unmaintained since then (if it ain't broke, don't fix it)
A dependency of Bolt is https://packagist.org/packages/brandonwamboldt/utilphp, however at some time in the last year, the author decided to delete the Github repository.
A quirk of the project, I never got to the bottom of why, but every few months the DigitalOcean droplet runs out of disk space, so then I just run docker prune to clear all the volumes and images, and then rebuild everything 😂 (yeah it's amateurish, but it's such a basic website it's never been worth the effort to fix it properly!)
Anyway, today I discover that the project doesn't build because the above Github repository is deleted.
So, I'm posting here to ask if anyone happens to have any version of this package themselves - maybe in their own vendor folder, as a direct or indirect dependency - and if so, perhaps they could kindly share this with me? And then I could somehow work out how to hack things together so that composer recognises my own copy as the package's source.
Or, if anyone knows of a Github archive/mirror that would somehow still have this package available?
Otherwise I'll have to try and upgrade to Bolt 5 - but since a prerequisite is a working project with Bolt 3.7 - I'm not sure how possible this would be.
If anyone can help me they would really be a true lifesaver! Thank you in advance
On a sidenote - packagist says it has 538,490 installs - you hear a lot about this sort of thing happening with npm, where a package owner deletes the project and failing builds ensue - but I naively assumed composer would somehow do something to mitigate this - but I guess composer is just as vulnerable!? (Or even moreso - if I'm not mistaken npm have taken steps to remedy this - I'm not completely in the loop though so I could be wrong)
https://redd.it/1nvxt3s
@r_php
Hello!
I've got a very old Dockerised project, for the website of a family member's small business, it was built \~8 years ago with Bolt CMS 3.2, and has basically been ticking along unmaintained since then (if it ain't broke, don't fix it)
A dependency of Bolt is https://packagist.org/packages/brandonwamboldt/utilphp, however at some time in the last year, the author decided to delete the Github repository.
A quirk of the project, I never got to the bottom of why, but every few months the DigitalOcean droplet runs out of disk space, so then I just run docker prune to clear all the volumes and images, and then rebuild everything 😂 (yeah it's amateurish, but it's such a basic website it's never been worth the effort to fix it properly!)
Anyway, today I discover that the project doesn't build because the above Github repository is deleted.
So, I'm posting here to ask if anyone happens to have any version of this package themselves - maybe in their own vendor folder, as a direct or indirect dependency - and if so, perhaps they could kindly share this with me? And then I could somehow work out how to hack things together so that composer recognises my own copy as the package's source.
Or, if anyone knows of a Github archive/mirror that would somehow still have this package available?
Otherwise I'll have to try and upgrade to Bolt 5 - but since a prerequisite is a working project with Bolt 3.7 - I'm not sure how possible this would be.
If anyone can help me they would really be a true lifesaver! Thank you in advance
On a sidenote - packagist says it has 538,490 installs - you hear a lot about this sort of thing happening with npm, where a package owner deletes the project and failing builds ensue - but I naively assumed composer would somehow do something to mitigate this - but I guess composer is just as vulnerable!? (Or even moreso - if I'm not mistaken npm have taken steps to remedy this - I'm not completely in the loop though so I could be wrong)
https://redd.it/1nvxt3s
@r_php
packagist.org
brandonwamboldt/utilphp - Packagist
util.php is a collection of useful functions and snippets that you need or could use every day, designed to avoid conflicts with existing projects
I built a PHP SDK for the Agentic Commerce Protocol (ACP), looking for testers
Hey all,
Three days ago OpenAI + Stripe dropped this new thing called Agentic Commerce Protocol (ACP). Basically it lets people buy stuff directly inside ChatGPT with instant checkout. It’s super new and I was curious, so I spent the last days hacking together a PHP SDK for it.
Repo’s here: https://github.com/shopbridge/shopbridge-php
It handles checkout sessions (create/update/complete/cancel), webhook signatures, product feeds in CSV/JSON/XML, etc. Runs on PHP 7.4+.
This is all open source / MIT. I honestly just want people to try it out, break it, tell me what sucks, or maybe even use it in a test project. Happy to help if you want to play with ACP for your shop or a client.
It’s all very fresh, so don’t expect production-grade yet, but if anyone here is curious, I’d love feedback.
Cheers!
https://redd.it/1nvxfe2
@r_php
Hey all,
Three days ago OpenAI + Stripe dropped this new thing called Agentic Commerce Protocol (ACP). Basically it lets people buy stuff directly inside ChatGPT with instant checkout. It’s super new and I was curious, so I spent the last days hacking together a PHP SDK for it.
Repo’s here: https://github.com/shopbridge/shopbridge-php
It handles checkout sessions (create/update/complete/cancel), webhook signatures, product feeds in CSV/JSON/XML, etc. Runs on PHP 7.4+.
This is all open source / MIT. I honestly just want people to try it out, break it, tell me what sucks, or maybe even use it in a test project. Happy to help if you want to play with ACP for your shop or a client.
It’s all very fresh, so don’t expect production-grade yet, but if anyone here is curious, I’d love feedback.
Cheers!
https://redd.it/1nvxfe2
@r_php
GitHub
GitHub - shopbridge/shopbridge-php: PHP SDK for merchants integrating with the Agentic Commerce Protocol (ACP)
PHP SDK for merchants integrating with the Agentic Commerce Protocol (ACP) - shopbridge/shopbridge-php
When NOT To Use Filament: Three Cases
https://www.youtube.com/watch?v=ZI4lE_6w3D8
https://redd.it/1nw61vj
@r_php
https://www.youtube.com/watch?v=ZI4lE_6w3D8
https://redd.it/1nw61vj
@r_php
YouTube
When NOT To Use Filament: Three Cases
A video with my personal opinion, answering a question from YouTube.
Links mentioned in the video:
- My Laravel learning roadmap: https://laraveldaily.com/roadmap-learning-path?mtm_campaign=youtube-filament-not-use-cases-roadmap
- Filament examples: htt…
Links mentioned in the video:
- My Laravel learning roadmap: https://laraveldaily.com/roadmap-learning-path?mtm_campaign=youtube-filament-not-use-cases-roadmap
- Filament examples: htt…
SymfonyCon Amsterdam 2025: Emerging AI Design Patterns in Symfony
https://symfony.com/blog/symfonycon-amsterdam-2025-emerging-ai-design-patterns-in-symfony?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1nwatug
@r_php
https://symfony.com/blog/symfonycon-amsterdam-2025-emerging-ai-design-patterns-in-symfony?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1nwatug
@r_php
Symfony
SymfonyCon Amsterdam 2025: Emerging AI Design Patterns in Symfony (Symfony Blog)
🤖 From prompt to production. Join Titouan to learn the patterns, guardrails, and architecture that make LLMs reliable inside your Symfony stack.
Moving PHP open source forward
https://blog.jetbrains.com/phpstorm/2025/10/moving-php-open-source-forward/
https://redd.it/1nwd6hs
@r_php
https://blog.jetbrains.com/phpstorm/2025/10/moving-php-open-source-forward/
https://redd.it/1nwd6hs
@r_php
The JetBrains Blog
Moving PHP open source forward | The PhpStorm Blog
Explore our new round of sponsorships, as well as a more structured approach towards new PHP open source sponsorships in the future.
Stuck with Laravel Package Tests with Pest + Orchestra Testbench - Laravel Helpers Not Available
## Context
I've developed a Laravel package that works perfectly in production, but I'm struggling to get the tests working properly. The package is located at `packages/cli/` within my Laravel application (local package development setup).
**Goal:** Run my package tests from the Laravel app root using `php artisan test`
**Current Issue:** Tests run but Laravel helper functions like `config()`, `app()`, etc. are not available. I get "Target class [config] does not exist." errors.
## What I've Done So Far
### 1. Installed Required Dependencies
**Package `composer.json`:**
```json
{
"name": "sheaf/cli",
"type": "library",
"autoload": {
"psr-4": {
"Sheaf\\Cli\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Sheaf\\Cli\\Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"providers": [
"Sheaf\\Cli\\ServiceProvider"
]
}
},
"require-dev": {
"orchestra/testbench": "^10.4",
"pestphp/pest": "^3.8",
"pestphp/pest-plugin-laravel": "^3.2"
}
}
```
### 2. Created TestCase with Orchestra Testbench
**`packages/cli/tests/TestCase.php`:**
```php
<?php
namespace Sheaf\Cli\Tests;
use Orchestra\Testbench\TestCase as Orchestra;
class TestCase extends Orchestra
{
protected function getPackageProviders($app)
{
return [
\Sheaf\Cli\ServiceProvider::class,
];
}
protected function setUp(): void
{
parent::setUp();
}
}
```
### 3. Created Pest Configuration
**`packages/cli/tests/Pest.php`:**
```php
<?php
declare(strict_types=1);
uses(\Sheaf\Cli\Tests\TestCase::class)->in('Feature', 'Unit');
```
### 4. Created Test File
**`packages/cli/tests/Feature/ExampleTest.php`:**
```php
<?php
namespace Sheaf\Cli\Tests\Feature;
test('confirm environment is set to testing', function () {
expect(config('app.env'))->toBe('testing'); // ERROR HERE
});
```
### 5. Updated Laravel App's `phpunit.xml`
```xml
<testsuites>
<testsuite name="Package">
<directory>packages/cli/tests</directory>
</testsuite>
</testsuites>
```
## The Problem
When I run tests from the Laravel app root with `php artisan test`, I get:
```
Target class [config] does not exist.
```
I added debug code to check what's happening:
```php
test('debug', function () {
dd([
'testcase_class' => get_class($this),
'parent_class' => get_parent_class($this),
'app_exists' => isset($this->app),
]);
});
```
**Output:**
```php
array:3 [
"testcase_class" => "P\Packages\cli\tests\Feature\ExampleTest"
"parent_class" => "PHPUnit\Framework\TestCase"
"app_exists" => false // ❌ Laravel app not available
]
```
## What Works
✅ Running tests from **within the package directory** works fine:
```bash
cd packages/cli
./vendor/bin/pest
```
## What Doesn't Work
❌ Running from Laravel app root:
```bash
php artisan test
```
## My Understanding
I believe the issue is that when running tests from the Laravel app root, Pest doesn't discover my package's `Pest.php` configuration file, so it doesn't know to use my custom TestCase.
## What I've Tried
1. ✅ Verified autoload-dev has correct namespace with trailing backslash
2. ✅ Run `composer dump-autoload` multiple times
3. ✅ Cleared Laravel caches
4. ✅ Verified Orchestra Testbench is installed
5. ✅ Package ServiceProvider loads correctly in the app (commands work)
6. ❌ Tried adding `uses(TestCase::class)` in test files (got "uses() undefined")
## Questions
1. **Is this the correct approach for testing local packages within a Laravel app?**
2. **How do I make Pest discover/use my package's TestCase when running from the app root?**
3. **Should I be using a different testing strategy for local packages?**
## Directory Structure
```
my-laravel-app/
├── app/
├── packages/
│ └── cli/
│ ├── src/
│ │ └── ServiceProvider.php
│ ├── tests/
│ │ ├── Pest.php
│ │ ├── TestCase.php
│ │ └── Feature/
│ │ └──
## Context
I've developed a Laravel package that works perfectly in production, but I'm struggling to get the tests working properly. The package is located at `packages/cli/` within my Laravel application (local package development setup).
**Goal:** Run my package tests from the Laravel app root using `php artisan test`
**Current Issue:** Tests run but Laravel helper functions like `config()`, `app()`, etc. are not available. I get "Target class [config] does not exist." errors.
## What I've Done So Far
### 1. Installed Required Dependencies
**Package `composer.json`:**
```json
{
"name": "sheaf/cli",
"type": "library",
"autoload": {
"psr-4": {
"Sheaf\\Cli\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Sheaf\\Cli\\Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"providers": [
"Sheaf\\Cli\\ServiceProvider"
]
}
},
"require-dev": {
"orchestra/testbench": "^10.4",
"pestphp/pest": "^3.8",
"pestphp/pest-plugin-laravel": "^3.2"
}
}
```
### 2. Created TestCase with Orchestra Testbench
**`packages/cli/tests/TestCase.php`:**
```php
<?php
namespace Sheaf\Cli\Tests;
use Orchestra\Testbench\TestCase as Orchestra;
class TestCase extends Orchestra
{
protected function getPackageProviders($app)
{
return [
\Sheaf\Cli\ServiceProvider::class,
];
}
protected function setUp(): void
{
parent::setUp();
}
}
```
### 3. Created Pest Configuration
**`packages/cli/tests/Pest.php`:**
```php
<?php
declare(strict_types=1);
uses(\Sheaf\Cli\Tests\TestCase::class)->in('Feature', 'Unit');
```
### 4. Created Test File
**`packages/cli/tests/Feature/ExampleTest.php`:**
```php
<?php
namespace Sheaf\Cli\Tests\Feature;
test('confirm environment is set to testing', function () {
expect(config('app.env'))->toBe('testing'); // ERROR HERE
});
```
### 5. Updated Laravel App's `phpunit.xml`
```xml
<testsuites>
<testsuite name="Package">
<directory>packages/cli/tests</directory>
</testsuite>
</testsuites>
```
## The Problem
When I run tests from the Laravel app root with `php artisan test`, I get:
```
Target class [config] does not exist.
```
I added debug code to check what's happening:
```php
test('debug', function () {
dd([
'testcase_class' => get_class($this),
'parent_class' => get_parent_class($this),
'app_exists' => isset($this->app),
]);
});
```
**Output:**
```php
array:3 [
"testcase_class" => "P\Packages\cli\tests\Feature\ExampleTest"
"parent_class" => "PHPUnit\Framework\TestCase"
"app_exists" => false // ❌ Laravel app not available
]
```
## What Works
✅ Running tests from **within the package directory** works fine:
```bash
cd packages/cli
./vendor/bin/pest
```
## What Doesn't Work
❌ Running from Laravel app root:
```bash
php artisan test
```
## My Understanding
I believe the issue is that when running tests from the Laravel app root, Pest doesn't discover my package's `Pest.php` configuration file, so it doesn't know to use my custom TestCase.
## What I've Tried
1. ✅ Verified autoload-dev has correct namespace with trailing backslash
2. ✅ Run `composer dump-autoload` multiple times
3. ✅ Cleared Laravel caches
4. ✅ Verified Orchestra Testbench is installed
5. ✅ Package ServiceProvider loads correctly in the app (commands work)
6. ❌ Tried adding `uses(TestCase::class)` in test files (got "uses() undefined")
## Questions
1. **Is this the correct approach for testing local packages within a Laravel app?**
2. **How do I make Pest discover/use my package's TestCase when running from the app root?**
3. **Should I be using a different testing strategy for local packages?**
## Directory Structure
```
my-laravel-app/
├── app/
├── packages/
│ └── cli/
│ ├── src/
│ │ └── ServiceProvider.php
│ ├── tests/
│ │ ├── Pest.php
│ │ ├── TestCase.php
│ │ └── Feature/
│ │ └──
ExampleTest.php
│ ├── composer.json
│ └── phpunit.xml
├── tests/
├── composer.json
└── phpunit.xml
```
## Environment
- Laravel 11
- PHP 8.2
- Pest 3.8
- Orchestra Testbench 10.4
---
## Code source of my package:
https://github.com/sheafui/cli/tree/tests/configuration (within the branch `tests/configuration`)
Any guidance would be greatly appreciated! I've been stuck on this for days and can't figure out what I'm missing.
Thanks in advance! 🙏
https://redd.it/1nwdd6e
@r_php
│ ├── composer.json
│ └── phpunit.xml
├── tests/
├── composer.json
└── phpunit.xml
```
## Environment
- Laravel 11
- PHP 8.2
- Pest 3.8
- Orchestra Testbench 10.4
---
## Code source of my package:
https://github.com/sheafui/cli/tree/tests/configuration (within the branch `tests/configuration`)
Any guidance would be greatly appreciated! I've been stuck on this for days and can't figure out what I'm missing.
Thanks in advance! 🙏
https://redd.it/1nwdd6e
@r_php
GitHub
GitHub - sheafui/cli at tests/configuration
Sheaf CLI – A powerful Artisan command-line tool for seamless installation and management of high-quality Sheaf components in Laravel. - GitHub - sheafui/cli at tests/configuration
Using ionCube in Laravel for encrypting source code
Hi -
I'm a Laravel developer (love it), going on 5 years now -
Management has requested we use ionCube... I have had mixed success with ionCube... I get a lot of unresolved class errors, unresolved methods, binding resolution errors (not sure the exact name). Each php file on its own is stand-alone encrypted, so what I do is unencrypt specific files until the errors go away...
I'm not sure if it is related to the types of design patterns Laravel uses -
Does anyone use ionCube to encrypt source code? Do you come across any challenges? How do you solve those challenges in a general sense?
Thanks -
https://redd.it/1nwzfy8
@r_php
Hi -
I'm a Laravel developer (love it), going on 5 years now -
Management has requested we use ionCube... I have had mixed success with ionCube... I get a lot of unresolved class errors, unresolved methods, binding resolution errors (not sure the exact name). Each php file on its own is stand-alone encrypted, so what I do is unencrypt specific files until the errors go away...
I'm not sure if it is related to the types of design patterns Laravel uses -
Does anyone use ionCube to encrypt source code? Do you come across any challenges? How do you solve those challenges in a general sense?
Thanks -
https://redd.it/1nwzfy8
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
is there any reason "Installing Composer Dependencies for Existing Applications" section removed from Laravel 12 sail documentation?
I got a new macbook pro. I decided not to use Laravel valet to keep may Macos clean, And beside that I saw wehn Googling that Laravel valet maybe discontinued in future in favor of Laravel herd. I don't like to use herd, so I decided to go with Laravel sail. but when reading the docs I found out that they removed the "Installing Composer Dependencies for Existing Applications" I was a little concerned if they are discontinuing Laravel sail to in favor of herd? or it's just they forgot to add this se section back into Laravel 12 documentations. Because it does not make sense for someone who wants to use Laravel sail with docker to install PHP and composer too into it's OS. someone like me who decides to use docker is because I don't want to install PHP and Composer. If I install those I would use valet.
https://preview.redd.it/saugkw5dswsf1.png?width=1268&format=png&auto=webp&s=e1750ebbbb2b22d171370c02d535b9d316c5f6b9
https://redd.it/1nx12ad
@r_php
I got a new macbook pro. I decided not to use Laravel valet to keep may Macos clean, And beside that I saw wehn Googling that Laravel valet maybe discontinued in future in favor of Laravel herd. I don't like to use herd, so I decided to go with Laravel sail. but when reading the docs I found out that they removed the "Installing Composer Dependencies for Existing Applications" I was a little concerned if they are discontinuing Laravel sail to in favor of herd? or it's just they forgot to add this se section back into Laravel 12 documentations. Because it does not make sense for someone who wants to use Laravel sail with docker to install PHP and composer too into it's OS. someone like me who decides to use docker is because I don't want to install PHP and Composer. If I install those I would use valet.
https://preview.redd.it/saugkw5dswsf1.png?width=1268&format=png&auto=webp&s=e1750ebbbb2b22d171370c02d535b9d316c5f6b9
https://redd.it/1nx12ad
@r_php
laravel-cache-evict has been updated to fix several issues with database cache tables
https://packagist.org/packages/vectorial1024/laravel-cache-evict
https://redd.it/1nx5ko1
@r_php
https://packagist.org/packages/vectorial1024/laravel-cache-evict
https://redd.it/1nx5ko1
@r_php
packagist.org
vectorial1024/laravel-cache-evict - Packagist
Efficiently remove expired Laravel file/database cache data
PSA: What to do if you need a deleted PHP package (The Bettergist Archive)
https://old.reddit.com/r/PHP/comments/1nvxt3s/plea_for_help_does_anyone_haveknow_where_i_could/nhon9lz/
https://redd.it/1nxo4qe
@r_php
https://old.reddit.com/r/PHP/comments/1nvxt3s/plea_for_help_does_anyone_haveknow_where_i_could/nhon9lz/
https://redd.it/1nxo4qe
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Obfuscate PHP code
Couldn't find all that much besides Zend Guard and ionCube PHP Encoder.
When it comes to open source solutions the only one that stood out was YAK Pro and so far is working.
Any other, preferably open source, solutions to check out?
Also any insight on this subject is appreciated.
https://redd.it/1nxnebf
@r_php
Couldn't find all that much besides Zend Guard and ionCube PHP Encoder.
When it comes to open source solutions the only one that stood out was YAK Pro and so far is working.
Any other, preferably open source, solutions to check out?
Also any insight on this subject is appreciated.
https://redd.it/1nxnebf
@r_php
GitHub
GitHub - pk-fr/yakpro-po: YAK Pro - Php Obfuscator
YAK Pro - Php Obfuscator. Contribute to pk-fr/yakpro-po development by creating an account on GitHub.
CodeIgniter vs Laravel vs symphony for PHP developer
I'm PHP developer, who developed web apps using procedural PHP coding and have good understanding on OOP too. Now for me its time to learn one of the PHP frameworks.
I'm freelancer and also created few small web apps that are still working very well.
My plan is:
Be competent for job searching in the future if I might need to.
To replace my old and procedural PHP codes with better framework code.
To create my own startup web app.
I prefer to have:
Control and freedom
Fast and security
Fast speed of development and scalability
So which one would you choose for me based on your experiences.
Thank you in advance.
https://redd.it/1nxx8ny
@r_php
I'm PHP developer, who developed web apps using procedural PHP coding and have good understanding on OOP too. Now for me its time to learn one of the PHP frameworks.
I'm freelancer and also created few small web apps that are still working very well.
My plan is:
Be competent for job searching in the future if I might need to.
To replace my old and procedural PHP codes with better framework code.
To create my own startup web app.
I prefer to have:
Control and freedom
Fast and security
Fast speed of development and scalability
So which one would you choose for me based on your experiences.
Thank you in advance.
https://redd.it/1nxx8ny
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
NGINX UNIT + TrueAsync
How is web development today different from yesterday? In one sentence: nobody wants to wait for a server response anymore!
Seven or ten years ago or even earlier — all those modules, components being bundled, interpreted, waiting on the database — all that could lag a bit without posing much risk to the business or the customer.
Today, web development is built around the paradigm of maximum server responsiveness. This paradigm emerged thanks to increased internet speeds and the rise of **single-page applications (SPA)**. From the backend’s perspective, this means it now has to handle as many fast requests as possible and efficiently distribute the load.
It’s no coincidence that the two-pool architecture request workers and job workers has become a classic today.
The one-request-per-process model handles loads of many “lightweight” requests poorly. It’s time for concurrent processing, where a single process can handle multiple requests.
The need for concurrent request handling has led to the requirement that server code be as close as possible to business logic code. It wasn’t like that before! Previously, web server code could be cleanly and elegantly abstracted from the noscript file using CGI or FPM. That no longer works today!
This is why all modern solutions either integrate components as closely as possible or even embed the web server as an internal module. An example of such a project is \*\*NGINX Unit\*\*, which embeds other languages, such as JavaScript, Python, Go, and others — directly into its worker modules. There is also a module for PHP, but until now PHP has gained almost nothing from direct integration, because just like before, it can only handle one request per worker.
Let’s bring this story to an end! Today, we present **NGINX Unit** running PHP in concurrent mode:
[Dockerfile](https://github.com/EdmondDantes/nginx-unit/blob/true-async/src/true-async-php/Dockerfile)
Nothing complicated:
# 1.Configuration
**unit-config.json**
{
"applications": {
"my-php-async-app": {
"type": "php",
"async": true, // Enable TrueAsync mode
"entrypoint": "/path/to/entrypoint.php",
"working_directory": "/path/to/",
"root": "/path/to/"
}
},
"listeners": {
"127.0.0.1:8080": {
"pass": "applications/my-php-async-app"
}
}
}
# 2. Entrypoint
<?php
use NginxUnit\HttpServer;
use NginxUnit\Request;
use NginxUnit\Response;
set_time_limit(0);
// Register request handler
HttpServer::onRequest(static function (Request $request, Response $response) {
// handle this!
});
It's all.
`Entrypoint.php` is executed only once, during worker startup. Its main goal is to register the `onRequest` callback function, which will be executed inside a `coroutine` for each new request.
The `Request`/`Response` objects provide interfaces for interacting with the server, enabling non-blocking write operations. Many of you may recognize elements of this interface from Python, JavaScript, Swoole, AMPHP, and so on.
This is an answer to the question of why PHP needs TrueAsync.
For anyone interested in looking under the hood — please take a look here: [NGINX UNIT + TrueAsync](https://github.com/EdmondDantes/nginx-unit/tree/true-async/src/true-async-php)
https://redd.it/1nxzpt3
@r_php
How is web development today different from yesterday? In one sentence: nobody wants to wait for a server response anymore!
Seven or ten years ago or even earlier — all those modules, components being bundled, interpreted, waiting on the database — all that could lag a bit without posing much risk to the business or the customer.
Today, web development is built around the paradigm of maximum server responsiveness. This paradigm emerged thanks to increased internet speeds and the rise of **single-page applications (SPA)**. From the backend’s perspective, this means it now has to handle as many fast requests as possible and efficiently distribute the load.
It’s no coincidence that the two-pool architecture request workers and job workers has become a classic today.
The one-request-per-process model handles loads of many “lightweight” requests poorly. It’s time for concurrent processing, where a single process can handle multiple requests.
The need for concurrent request handling has led to the requirement that server code be as close as possible to business logic code. It wasn’t like that before! Previously, web server code could be cleanly and elegantly abstracted from the noscript file using CGI or FPM. That no longer works today!
This is why all modern solutions either integrate components as closely as possible or even embed the web server as an internal module. An example of such a project is \*\*NGINX Unit\*\*, which embeds other languages, such as JavaScript, Python, Go, and others — directly into its worker modules. There is also a module for PHP, but until now PHP has gained almost nothing from direct integration, because just like before, it can only handle one request per worker.
Let’s bring this story to an end! Today, we present **NGINX Unit** running PHP in concurrent mode:
[Dockerfile](https://github.com/EdmondDantes/nginx-unit/blob/true-async/src/true-async-php/Dockerfile)
Nothing complicated:
# 1.Configuration
**unit-config.json**
{
"applications": {
"my-php-async-app": {
"type": "php",
"async": true, // Enable TrueAsync mode
"entrypoint": "/path/to/entrypoint.php",
"working_directory": "/path/to/",
"root": "/path/to/"
}
},
"listeners": {
"127.0.0.1:8080": {
"pass": "applications/my-php-async-app"
}
}
}
# 2. Entrypoint
<?php
use NginxUnit\HttpServer;
use NginxUnit\Request;
use NginxUnit\Response;
set_time_limit(0);
// Register request handler
HttpServer::onRequest(static function (Request $request, Response $response) {
// handle this!
});
It's all.
`Entrypoint.php` is executed only once, during worker startup. Its main goal is to register the `onRequest` callback function, which will be executed inside a `coroutine` for each new request.
The `Request`/`Response` objects provide interfaces for interacting with the server, enabling non-blocking write operations. Many of you may recognize elements of this interface from Python, JavaScript, Swoole, AMPHP, and so on.
This is an answer to the question of why PHP needs TrueAsync.
For anyone interested in looking under the hood — please take a look here: [NGINX UNIT + TrueAsync](https://github.com/EdmondDantes/nginx-unit/tree/true-async/src/true-async-php)
https://redd.it/1nxzpt3
@r_php
GitHub
nginx-unit/src/true-async-php/Dockerfile at true-async · EdmondDantes/nginx-unit
NGINX Unit - universal web app server - a lightweight and versatile open source server that simplifies the application stack by natively executing application code across eight different programmin...
Launched a package: Laravel Auto Transaction - Simplifying Database Transaction Management
After working with Laravel applications, I noticed developers often forget to wrap critical operations in transactions or miss rollback handling. This led to data inconsistencies in production.
So I built Laravel Auto Transaction - an open-source package that automates database transaction management.
**Key Features:**
* Automatic commit on success, rollback on failure
* Middleware support for entire routes
* Built-in retry mechanism for deadlock handling
* Multi-database connection support
* Zero configuration required
This is my first Laravel package. The tests are passing, documentation is ready, and it's available on Packagist.
📦 Installation: `composer require sheum/laravel-auto-transaction`
🔗 GitHub: [github.com/laravel-auto-transaction](https://github.com/mohamadsheam/laravel-auto-transaction)
📖 Packagist: [packagist.org/laravel-auto-transaction](https://packagist.org/packages/sheum/laravel-auto-transaction)
I'd appreciate any feedback, suggestions, or contributions from the Laravel community.
Thanks
https://redd.it/1nya2h2
@r_php
After working with Laravel applications, I noticed developers often forget to wrap critical operations in transactions or miss rollback handling. This led to data inconsistencies in production.
So I built Laravel Auto Transaction - an open-source package that automates database transaction management.
**Key Features:**
* Automatic commit on success, rollback on failure
* Middleware support for entire routes
* Built-in retry mechanism for deadlock handling
* Multi-database connection support
* Zero configuration required
This is my first Laravel package. The tests are passing, documentation is ready, and it's available on Packagist.
📦 Installation: `composer require sheum/laravel-auto-transaction`
🔗 GitHub: [github.com/laravel-auto-transaction](https://github.com/mohamadsheam/laravel-auto-transaction)
📖 Packagist: [packagist.org/laravel-auto-transaction](https://packagist.org/packages/sheum/laravel-auto-transaction)
I'd appreciate any feedback, suggestions, or contributions from the Laravel community.
Thanks
https://redd.it/1nya2h2
@r_php
Symfony 7 + API Platform - Complete Docker Setup
https://youtu.be/98ZSfji9XKs
https://redd.it/1nyibl5
@r_php
https://youtu.be/98ZSfji9XKs
https://redd.it/1nyibl5
@r_php
YouTube
Symfony 7 + API Platform - Complete Docker Setup #docker #symfony #php
In this video, I’ll show you how to set up a complete PHP 8.2 and Apache environment using Docker and then use it to install and run Symfony 7 with API Platform. I will start by configuring Docker containers for PHP and Apache, then install Composer inside…
Laravel-based static site generator HydePHP v2 is released
https://hydephp.com/posts/hydephp-version-2-0-released
https://redd.it/1nyiif4
@r_php
https://hydephp.com/posts/hydephp-version-2-0-released
https://redd.it/1nyiif4
@r_php
HydePHP
HydePHP - HydePHP Version v2.0 Released
Make static websites, blogs, and documentation pages with the tools you already know and love.