amphp / http-server

An advanced async HTTP server library for PHP, perfect for real-time apps and APIs with high concurrency demands.
https://amphp.org/http-server
MIT License
1.29k stars 101 forks source link

PHP Fatal error: Declaration of Amp\Http\Server\Request::setHeader() #344

Closed lav45 closed 1 year ago

lav45 commented 1 year ago
PHP Fatal error:  Declaration of Amp\Http\Server\Request::setHeader(string $name, array|string $value): void must be compatible with Amp\Http\HttpMessage::setHeader(string $name, array|string|int|float $value): void in /app/vendor/amphp/http-server/src/Request.php on line 156
~$ composer show amphp/http-server
name     : amphp/http-server
descrip. : A non-blocking HTTP application server for PHP based on Amp.
keywords : amp, amphp, async, http, non-blocking, server
versions : * 3.x-dev
type     : library
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
homepage : https://github.com/amphp/http-server
source   : [git] https://github.com/amphp/http-server.git 9c95eb2ee0d78e95115f962fca57757857928a0c
dist     : [zip] https://api.github.com/repos/amphp/http-server/zipball/9c95eb2ee0d78e95115f962fca57757857928a0c 9c95eb2ee0d78e95115f962fca57757857928a0c
path     : /app/vendor/amphp/http-server
names    : amphp/http-server

support
issues : https://github.com/amphp/http-server/issues
source : https://github.com/amphp/http-server/tree/3.x

autoload
files
psr-4
Amp\Http\Server\ => src

requires
amphp/amp ^3
amphp/byte-stream ^2
amphp/cache ^2
amphp/hpack ^3
amphp/http ^2-dev
amphp/pipeline ^1
amphp/socket ^2
amphp/sync ^2
league/uri ^6
league/uri-interfaces ^2.3
php >=8.1
psr/http-message ^1
psr/log ^1|^2|^3
revolt/event-loop ^1

requires (dev)
amphp/http-client ^5-dev
amphp/log ^2
amphp/php-cs-fixer-config ^2-dev
amphp/phpunit-util ^3
league/uri-components ^2
monolog/monolog ^3
phpunit/phpunit ^9
psalm/phar ^5.4

suggests
ext-zlib Allows GZip compression of response bodies
Nek- commented 1 year ago

Hello, thank you for reporting this, it has been fixed in this commit : https://github.com/amphp/http-server/commit/aaf971e860ba44f63e3d5c850f439f279e086b27

Nek- commented 1 year ago

@trowski a new release with this fix would be great btw 🙏