File tree Expand file tree Collapse file tree 11 files changed +47
-31
lines changed
Expand file tree Collapse file tree 11 files changed +47
-31
lines changed Original file line number Diff line number Diff line change 3434 fail-fast : true
3535 matrix :
3636 php-version :
37- - " 8.1"
38- - " 8.2"
39- - " 8.3"
4037 - " 8.4"
4138 - " 8.5"
4239
8077 - ubuntu-latest
8178 - windows-latest
8279 php-version :
83- - " 8.1"
84- - " 8.2"
85- - " 8.3"
8680 - " 8.4"
8781 - " 8.5"
8882
Original file line number Diff line number Diff line change 1717 // that functions removed in php 7.0 exist.
1818 // (See `backward_compatibility_checks` for additional options)
1919 'target_php_version ' => null ,
20- 'minimum_target_php_version ' => '8.1 ' ,
20+ 'minimum_target_php_version ' => '8.4 ' ,
2121
2222 // A list of directories that should be parsed for class and
2323 // method information. After excluding the directories
Original file line number Diff line number Diff line change @@ -23,11 +23,11 @@ Add [PSR-17](https://www.php-fig.org/psr/psr-17/) factories and a [PSR-18](https
2323
2424### Features
2525
26- A PSR-18 HTTP client and PSR-17 factories for your unit tetss . That's it.
26+ A PSR-18 HTTP client and PSR-17 factories for your unit tets . That's it.
2727
2828### Requirements
2929
30- - PHP 8.1 +
30+ - PHP 8.4 +
3131 - required extensions may vary depending on the used HTTP client
3232
3333
@@ -40,12 +40,12 @@ Add this library along with PHPUnit and an optional HTTP client to the `require-
4040``` json
4141{
4242 "require" : {
43- "php" : " ^8.1 "
43+ "php" : " ^8.4 "
4444 },
4545 "require-dev" : {
46- "chillerlan/phpunit-http" : " ^1 .0" ,
47- "guzzlehttp/guzzle" : " ^7.8 " ,
48- "phpunit/phpunit" : " ^10.5 "
46+ "chillerlan/phpunit-http" : " ^2 .0" ,
47+ "guzzlehttp/guzzle" : " ^7.10 " ,
48+ "phpunit/phpunit" : " ^13.0 "
4949 }
5050}
5151```
Original file line number Diff line number Diff line change 2323 "minimum-stability" : " stable" ,
2424 "prefer-stable" : true ,
2525 "require" : {
26- "php" : " ^8.1 "
26+ "php" : " ^8.4 "
2727 },
2828 "require-dev" : {
2929 "chillerlan/php-httpinterface" : " ^6.0" ,
3030 "guzzlehttp/guzzle" : " ^7.10" ,
3131 "phan/phan" : " ^6.0.2" ,
3232 "phpstan/phpstan" : " ^2.1.42" ,
3333 "phpstan/phpstan-deprecation-rules" : " ^2.0.4" ,
34- "phpunit/phpunit" : " ^10.5 " ,
34+ "phpunit/phpunit" : " ^13.0 " ,
3535 "slevomat/coding-standard" : " ^8.28" ,
3636 "squizlabs/php_codesniffer" : " ^4.0"
3737 },
Original file line number Diff line number Diff line change 110110 <exclude-pattern >examples</exclude-pattern >
111111 </rule >
112112
113- <rule ref =" SlevomatCodingStandard.TypeHints.UnionTypeHintFormat " >
113+ <rule ref =" SlevomatCodingStandard.TypeHints.DNFTypeHintFormat " >
114114 <properties >
115- <property name =" withSpaces" value =" no" />
116115 <property name =" shortNullable" value =" no" />
117116 <property name =" nullPosition" value =" last" />
118117 </properties >
Original file line number Diff line number Diff line change @@ -11,3 +11,21 @@ parameters:
1111 identifier : property.protected
1212 count : 1
1313 path : src/ChillerlanHttpClientFactory.php
14+
15+ -
16+ rawMessage : Cannot unset property chillerlan\PHPUnitHttpTest\PHPUnitHttpFactoryTestAbstract::$REQUEST_FACTORY because it might have hooks in a subclass.
17+ identifier : unset.possiblyHookedProperty
18+ count : 1
19+ path : tests/PHPUnitHttpFactoryTestAbstract.php
20+
21+ -
22+ rawMessage : Cannot unset property chillerlan\PHPUnitHttpTest\PHPUnitHttpFactoryTestAbstract::$httpClient because it might have hooks in a subclass.
23+ identifier : unset.possiblyHookedProperty
24+ count : 1
25+ path : tests/PHPUnitHttpFactoryTestAbstract.php
26+
27+ -
28+ rawMessage : Cannot unset property chillerlan\PHPUnitHttpTest\PHPUnitHttpFactoryTestAbstract::$httpClientFactory because it might have hooks in a subclass.
29+ identifier : unset.possiblyHookedProperty
30+ count : 1
31+ path : tests/PHPUnitHttpFactoryTestAbstract.php
Original file line number Diff line number Diff line change 1616
1717interface HttpClientFactoryInterface{
1818
19- public const USER_AGENT = 'chillerlanPHPUnitHttp/1 .0.0 +https://github.com/chillerlan/phpunit-http ' ;
19+ public const string USER_AGENT = 'chillerlanPHPUnitHttp/2 .0.0 +https://github.com/chillerlan/phpunit-http ' ;
2020
2121 /**
2222 * Returns a fully prepared http client instance
Original file line number Diff line number Diff line change 2525trait HttpFactoryTrait{
2626
2727 /**
28- * @todo: constants in traits are allowed as of PHP 8.2
29- *
3028 * @var array<string, string>
3129 */
32- private array $ FACTORIES = [
30+ final protected const array FACTORIES = [
3331 'requestFactory ' => 'REQUEST_FACTORY ' ,
3432 'responseFactory ' => 'RESPONSE_FACTORY ' ,
3533 'streamFactory ' => 'STREAM_FACTORY ' ,
@@ -55,7 +53,7 @@ trait HttpFactoryTrait{
5553 */
5654 protected function initFactories (string $ cacert = '' ):void {
5755
58- foreach ($ this -> FACTORIES as $ property => $ const ){
56+ foreach ($ this :: FACTORIES as $ property => $ const ){
5957 $ class = $ this ->getFactoryClass ($ const );
6058
6159 // some interfaces may not always be needed or implemented
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class ChillerlanFactoryTest extends PHPUnitHttpFactoryTestAbstract{
2323 protected string $ URI_FACTORY = HTTPFactory::class;
2424 protected string $ HTTP_CLIENT_FACTORY = ChillerlanHttpClientFactory::class;
2525
26- public function testHttpClientInstance ():void {
26+ public function httpClientInstance ():void {
2727 $ this ::assertInstanceOf (CurlClient::class, $ this ->httpClient );
2828 }
2929
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class GuzzleFactoryTest extends PHPUnitHttpFactoryTestAbstract{
2323 protected string $ URI_FACTORY = HTTPFactory::class;
2424 protected string $ HTTP_CLIENT_FACTORY = GuzzleHttpClientFactory::class;
2525
26- public function testHttpClientInstance ():void {
26+ public function httpClientInstance ():void {
2727 $ this ::assertInstanceOf (Client::class, $ this ->httpClient );
2828 }
2929
You can’t perform that action at this time.
0 commit comments