-
-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
Feature Request
| Q | A |
|---|---|
| New Feature | yes |
Summary
With the most recent php-http/discovery v1.17.0 it is possible to pin PSR-17 and/or PSR-18 implementations in projects. I'd love to have a laminas-cli command which does that registration for me so that I do not have to do it manually.
The CLI command should:
- modify
composer.jsonto provide per-interface factory mapping - verify that php-http/discovery is installed
- add
forceoption to set the composer.json modifications even without php-http/discovery being installed - check if php-http/discovery is at least ^1.17 and output warning in case it is an older version
Example JSON configuration*
{
"extra": {
"discovery": {
"Psr\\Http\\Message\\RequestFactoryInterface": "Laminas\\Diactoros\\RequestFactory",
"...": "..."
}
}
}