Skip to content

Commit

Permalink
[PsrHttpMessageBridge] Import the bridge into the monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed Jul 27, 2023
1 parent 0c0323a commit 266c09f
Show file tree
Hide file tree
Showing 10 changed files with 105 additions and 161 deletions.
3 changes: 3 additions & 0 deletions composer.json
Expand Up @@ -44,6 +44,7 @@
"psr/clock": "^1.0",
"psr/container": "^1.1|^2.0",
"psr/event-dispatcher": "^1.0",
"psr/http-message": "^1.0|^2.0",
"psr/link": "^1.1|^2.0",
"psr/log": "^1|^2|^3",
"symfony/contracts": "^2.5|^3.0",
Expand Down Expand Up @@ -94,6 +95,7 @@
"symfony/property-access": "self.version",
"symfony/property-info": "self.version",
"symfony/proxy-manager-bridge": "self.version",
"symfony/psr-http-message-bridge": "self.version",
"symfony/rate-limiter": "self.version",
"symfony/remote-event": "self.version",
"symfony/routing": "self.version",
Expand Down Expand Up @@ -182,6 +184,7 @@
"Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/",
"Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/",
"Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/",
"Symfony\\Bridge\\PsrHttpMessage\\": "src/Symfony/Bridge/PsrHttpMessage/",
"Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/",
"Symfony\\Bundle\\": "src/Symfony/Bundle/",
"Symfony\\Component\\": "src/Symfony/Component/"
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Bridge/PsrHttpMessage/.gitattributes
@@ -1,6 +1,4 @@
/Tests export-ignore
/phpunit.xml.dist export-ignore
/.gitattributes export-ignore
/.github export-ignore
/.gitignore export-ignore
/.php_cs.dist export-ignore
49 changes: 0 additions & 49 deletions src/Symfony/Bridge/PsrHttpMessage/.github/workflows/ci.yml

This file was deleted.

3 changes: 0 additions & 3 deletions src/Symfony/Bridge/PsrHttpMessage/.gitignore
@@ -1,7 +1,4 @@
vendor/
composer.lock
phpunit.xml
.php-cs-fixer.cache
.php-cs-fixer.php
.phpunit.result.cache
/Tests/Fixtures/App/var
25 changes: 0 additions & 25 deletions src/Symfony/Bridge/PsrHttpMessage/.php-cs-fixer.dist.php

This file was deleted.

120 changes: 71 additions & 49 deletions src/Symfony/Bridge/PsrHttpMessage/CHANGELOG.md
@@ -1,85 +1,107 @@
CHANGELOG
=========

# 2.3.1 (2023-07-26)
6.4
---

* Don't rely on `Request::getPayload()` to populate the parsed body
* Import the bridge into the Symfony monorepo and synchronize releases

# 2.3.0 (2023-07-25)
2.3.1
-----

* Leverage `Request::getPayload()` to populate the parsed body of PSR-7 requests
* Implement `ValueResolverInterface` introduced with Symfony 6.2
* Don't rely on `Request::getPayload()` to populate the parsed body

# 2.2.0 (2023-04-21)
2.3.0
-----

* Drop support for Symfony 4
* Bump minimum version of PHP to 7.2
* Support version 2 of the psr/http-message contracts
* Leverage `Request::getPayload()` to populate the parsed body of PSR-7 requests
* Implement `ValueResolverInterface` introduced with Symfony 6.2

# 2.1.3 (2022-09-05)
2.2.0
-----

* Ignore invalid HTTP headers when creating PSR7 objects
* Fix for wrong type passed to `moveTo()`
* Drop support for Symfony 4
* Bump minimum version of PHP to 7.2
* Support version 2 of the psr/http-message contracts

# 2.1.2 (2021-11-05)
2.1.3
-----

* Allow Symfony 6
* Ignore invalid HTTP headers when creating PSR7 objects
* Fix for wrong type passed to `moveTo()`

# 2.1.0 (2021-02-17)
2.1.2
-----

* Added a `PsrResponseListener` to automatically convert PSR-7 responses returned by controllers
* Added a `PsrServerRequestResolver` that allows injecting PSR-7 request objects into controllers
* Allow Symfony 6

# 2.0.2 (2020-09-29)
2.1.0
-----

* Fix populating server params from URI in HttpFoundationFactory
* Create cookies as raw in HttpFoundationFactory
* Fix BinaryFileResponse with Content-Range PsrHttpFactory
* Added a `PsrResponseListener` to automatically convert PSR-7 responses returned by controllers
* Added a `PsrServerRequestResolver` that allows injecting PSR-7 request objects into controllers

# 2.0.1 (2020-06-25)
2.0.2
-----

* Don't normalize query string in PsrHttpFactory
* Fix conversion for HTTPS requests
* Fix populating default port and headers in HttpFoundationFactory
* Fix populating server params from URI in HttpFoundationFactory
* Create cookies as raw in HttpFoundationFactory
* Fix BinaryFileResponse with Content-Range PsrHttpFactory

# 2.0.0 (2020-01-02)
2.0.1
-----

* Remove DiactorosFactory
* Don't normalize query string in PsrHttpFactory
* Fix conversion for HTTPS requests
* Fix populating default port and headers in HttpFoundationFactory

# 1.3.0 (2019-11-25)
2.0.0
-----

* Added support for streamed requests
* Added support for Symfony 5.0+
* Fixed bridging UploadedFile objects
* Bumped minimum version of Symfony to 4.4
* Remove DiactorosFactory

# 1.2.0 (2019-03-11)
1.3.0
-----

* Added new documentation links
* Bumped minimum version of PHP to 7.1
* Added support for streamed responses
* Added support for streamed requests
* Added support for Symfony 5.0+
* Fixed bridging UploadedFile objects
* Bumped minimum version of Symfony to 4.4

# 1.1.2 (2019-04-03)
1.2.0
-----

* Fixed createResponse
* Added new documentation links
* Bumped minimum version of PHP to 7.1
* Added support for streamed responses

# 1.1.1 (2019-03-11)
1.1.2
-----

* Deprecated DiactorosFactory, use PsrHttpFactory instead
* Removed triggering of deprecation
* Fixed createResponse

# 1.1.0 (2018-08-30)
1.1.1
-----

* Added support for creating PSR-7 messages using PSR-17 factories
* Deprecated DiactorosFactory, use PsrHttpFactory instead
* Removed triggering of deprecation

# 1.0.2 (2017-12-19)
1.1.0
-----

* Fixed request target in PSR7 Request (mtibben)
* Added support for creating PSR-7 messages using PSR-17 factories

# 1.0.1 (2017-12-04)
1.0.2
-----

* Added support for Symfony 4 (dunglas)
* Fixed request target in PSR7 Request (mtibben)

# 1.0.0 (2016-09-14)
1.0.1
-----

* Initial release
* Added support for Symfony 4 (dunglas)

1.0.0
-----

* Initial release
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/PsrHttpMessage/LICENSE
@@ -1,4 +1,4 @@
Copyright (c) 2004-2021 Fabien Potencier
Copyright (c) 2004-present Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Expand Up @@ -50,6 +50,7 @@ protected function configureContainer(ContainerConfigurator $container): void
'router' => ['utf8' => true],
'secret' => 'for your eyes only',
'test' => true,
'annotations' => false,
'http_method_override' => false,
]);

Expand Down
27 changes: 11 additions & 16 deletions src/Symfony/Bridge/PsrHttpMessage/composer.json
Expand Up @@ -16,20 +16,19 @@
}
],
"require": {
"php": ">=7.2.5",
"psr/http-message": "^1.0 || ^2.0",
"symfony/deprecation-contracts": "^2.5 || ^3.0",
"symfony/http-foundation": "^5.4 || ^6.0"
"php": ">=8.1",
"psr/http-message": "^1.0|^2.0",
"symfony/deprecation-contracts": "^2.5|^3.0",
"symfony/http-foundation": "^5.4|^6.0"
},
"require-dev": {
"symfony/browser-kit": "^5.4 || ^6.0",
"symfony/config": "^5.4 || ^6.0",
"symfony/event-dispatcher": "^5.4 || ^6.0",
"symfony/framework-bundle": "^5.4 || ^6.0",
"symfony/http-kernel": "^5.4 || ^6.0",
"symfony/phpunit-bridge": "^6.2",
"symfony/browser-kit": "^5.4|^6.0",
"symfony/config": "^5.4|^6.0",
"symfony/event-dispatcher": "^5.4|^6.0",
"symfony/framework-bundle": "^5.4|^6.0",
"symfony/http-kernel": "^5.4|^6.0",
"nyholm/psr7": "^1.1",
"psr/log": "^1.1 || ^2 || ^3"
"psr/log": "^1.1|^2|^3"
},
"suggest": {
"nyholm/psr7": "For a super lightweight PSR-7/17 implementation"
Expand All @@ -40,9 +39,5 @@
"/Tests/"
]
},
"extra": {
"branch-alias": {
"dev-main": "2.3-dev"
}
}
"minimum-stability": "dev"
}
34 changes: 18 additions & 16 deletions src/Symfony/Bridge/PsrHttpMessage/phpunit.xml.dist
@@ -1,29 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit backupGlobals="false"
backupStaticAttributes="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.3/phpunit.xsd"
backupGlobals="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
</php>

<testsuites>
<testsuite name="Symfony PSR-7 HTTP message Bridge Test Suite">
<directory>./Tests/</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<coverage>
<include>
<directory>./</directory>
<exclude>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
</include>
<exclude>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</coverage>
</phpunit>

0 comments on commit 266c09f

Please sign in to comment.