Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI command to register diactoros as pinned for php-http/discovery #143

Open
boesing opened this issue Apr 27, 2023 · 1 comment
Open

CLI command to register diactoros as pinned for php-http/discovery #143

boesing opened this issue Apr 27, 2023 · 1 comment

Comments

@boesing
Copy link
Member

boesing commented Apr 27, 2023

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.json to provide per-interface factory mapping
  • verify that php-http/discovery is installed
  • add force option 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",
            "...": "..."
        }
    }
}
@Xerkus
Copy link
Member

Xerkus commented Sep 10, 2024

This will bring too many dependencies. If done it would have to be a satellite package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants