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

Request object from controller is not usable by RequestInterface and PSR-7 #79

Closed
Eugentis opened this issue Oct 5, 2023 · 2 comments
Closed
Labels
Bug Something isn't working

Comments

@Eugentis
Copy link

Eugentis commented Oct 5, 2023

Bug Report

Q A
Version(s) 2.18.0

Summary

Hi!

Class src/Request.php is not comfortable to use by Laminas\Stdlib\RequestInterface interface.
Real object has more public methods in comparison with RequestInterface - for method, uri and others

Do you have any plans to use common PSR interfaces like RequestInterface?

It will be more comfortable to use in this situation.

Current behavior

In code you should use Request class as dependency instead of RequestInterface

How to reproduce

Try to use \Laminas\Mvc\Controller\AbstractController::getRequest() and receive uri by getUri() on it and check code by phpstan

Expected behavior

RequestInterface is suitable with PSR-7

@Eugentis Eugentis added the Bug Something isn't working label Oct 5, 2023
@laminas-bot
Copy link
Contributor

This package is considered feature-complete, and is now in security-only maintenance mode, following a decision by the Technical Steering Committee.
If you have a security issue, please follow our security reporting guidelines.
If you wish to take on the role of maintainer, please nominate yourself

You can continue using laminas/laminas-http safely.
Its successor will be PSR-7 in a later revision of laminas/laminas-mvc.

@Ocramius
Copy link
Member

Ocramius commented Oct 5, 2023

Not for laminas/laminas-http: use a PSR-18 HTTP client implementation for that instead :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants