laminas / laminas-http

Provides an easy interface for performing Hyper-Text Transfer Protocol (HTTP) requests
https://docs.laminas.dev/laminas-http/
BSD 3-Clause "New" or "Revised" License
36 stars 27 forks source link

PHP 8.1: Countable incompatibility for Headers #55

Closed boesing closed 3 years ago

boesing commented 3 years ago

Bug Report

Q A
Version(s) 2.14

Summary

PHP Fatal error: During inheritance of Countable: Uncaught Return type of Laminas\Http\Headers::count() should either be compatible with Countable::count(): int, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

More details can be found here:

https://php.watch/versions/8.1/serializable-deprecated https://wiki.php.net/rfc/phase_out_serializable

Current behavior

Tests are failing.

How to reproduce

Execute tests with PHP 8.1

Expected behavior

Tests are passing.

laminas-bot commented 3 years ago

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.

ramsey commented 3 years ago

Asked about this in the Laminas Slack. Until there's a successor package, I think this means that much of the Laminas ecosystem will not be able to upgrade to PHP 8.1.

https://laminas.slack.com/archives/C4QBQUEG5/p1627577291397400

froschdesign commented 3 years ago

@ramsey Updates for PHP 8.1 are planned, also for this component.

Ocramius commented 3 years ago

Handled in #57