jenssegers / php-proxy

A PHP proxy script with https and post support
https://jenssegers.com
933 stars 266 forks source link

Support http-foundation:^2.6|^3.0 for 2.2.2 point release? #48

Closed andig closed 7 years ago

andig commented 7 years ago

If you'd accept a PR I'd be happy to create one. As I'm not on PSR7 yet that would greatly simplify my testing dependencies.

omar-elsherif commented 7 years ago

What is a PR?

andig commented 7 years ago

What is a PR?

A pull request? Didn't know what else to call it ;)

jenssegers commented 7 years ago

You can use the psr-http-message-bridge to convert Symfony requests: https://github.com/symfony/psr-http-message-bridge

use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory;

$httpFoundationFactory = new HttpFoundationFactory();

// convert a Request
// $psrRequest is an instance of Psr\Http\Message\ServerRequestInterface
$symfonyRequest = $httpFoundationFactory->createRequest($psrRequest);

// convert a Response
// $psrResponse is an instance of Psr\Http\Message\ResponseInterface
$symfonyResponse = $httpFoundationFactory->createResponse($psrResponse);
andig commented 7 years ago

Wow, didn't know that- great! Any chance for tagging a stable 3.0 to use it with?

KTP95 commented 7 years ago

Same question, My project has dependences for

 "symfony/http-foundation": "^3.1"

When i try install via composer get error:

- jenssegers/proxy v2.2.1 requires symfony/http-foundation ~2.6
satisfiable by symfony/http-foundation[2.6.x-dev,.....................v2.8.9] 
but these conflict with your requirements or minimum-stability.

Some solution for use composer and no-conflicts ?

Edit:

I solve by upgrating to ^3.0.0-beta2' [based on zend and not http foundation]