Open
Description
This is a discussion issue for the upcoming release of version 4.0.0.
I'd like to do the following things:
- Require PHP 8.0 as minimum PHP version (dropping support for PHP 7.1, 7.2, 7.3, 7.4)
This would also drop the necessity of 3 different PHPUnit versions and would improve the maintainability of the test suites.
Version 3.x will continue to support PHP 7.1-8.0, but won't add or backport new features, just bug fixes. - Upgrade the codebase to use PHP 8.0 language features like typed properties etc.
- Require
ext-fileinfo
incomposer.json
to rely on mime type detection for multipart/form-data requests - Refactor the
AbstractRequest
class, so that it always expects a request content object by requiring theComposesRequestContent
interface for the$content
property.This would make the named constructorpublic function __construct( string $scriptFilename, ComposesRequestContent $content ) public function setContent( ComposesRequestContent $content )
newWithRequestContent()
, that was introduced in v3.1.0, obsolete and should be less confusing how to compose the content of a request for users. See BC-Break with final constructor in AbstractRequest #56 - In general, find sources of potential BC breaks or usage confusion and eradicate them if possible
- Allow to configure/overwrite the
STREAM_SELECT_USEC
value used by stream_select, see configuring STREAM_SELECT_USEC #18 - Make the use of GET requests easier by adding a possibility to pass an array of query parameters to the request instead of composing a valid request URI in userland
- Add request methods with retry mechanism, first thoughts about that in [BUG]: Remove broken sockets from socket collection if write request fails #61. If writing to an idle stream fails for some reason try to use a new one instead of throwing an exception. Method names could be:
Client#tryRequest( $connection, $request, $maxTries = 5 )
andClient#tryAsyncRequest( $connection, $request, $maxTries = 5 )
- Refactor and rearrange some tests, especially those which test for the behaviour of interrupted php-fpm processes.
- Remove license information from all PHP files and use the LICENSE file only
- Cleanup and split the documentation by major version
- Cleanup and split the CHANGELOG by major version
My main goals are:
- Take the library to the current language level
- Make maintenance easier
- Avoid unwanted BC breaks in future releases
@theseer, @sebastianheuer, @mnapoli, @Nyholm, @taylorotwell I'd like to hear your thoughts and ideas on this, also for improvements, features or things to consider from your perspective as you are the "main" users of this library, afaik.
Everyone else is also welcome to the discussion of course.