Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed incompatible
string|Stringable
non-contravariant type decla…
…ration Fixes #151 This patch makes the component compatible with `psr/log:^1` again. Ref: #151 > Heyo, just noticed this incompatibility while upgrading: > > ``` > PHP Fatal error: Declaration of Gelf\Logger::log($level, Stringable|string $message, array $context = []): void must be compatible with Psr\Log\LoggerInterface::log($level, $message, array $context = []) > ``` > > Practically, the `Stringable|string` is incompatible with `Psrl\Log\LoggerInterface` in `psr/log:1.0.0`: > > https://github.com/php-fig/log/blob/fe0936ee26643249e916849d48e3a51d5f5e278b/Psr/Log/LoggerInterface.php#L113 > > ``` > /** > * Logs with an arbitrary level. > * > * @param mixed $level > * @param string $message > * @param array $context > * @return null > */ > public function log($level, $message, array $context = array()); > ``` > > https://github.com/bzikarsky/gelf-php/blob/a8f68846ff4db5f1942172bb428465be7ebb768c/src/Gelf/Logger.php#L42-L44 Ref: https://wiki.php.net/rfc/covariant-returns-and-contravariant-parameters
- Loading branch information