Skip to content

Conversation

@javer
Copy link

@javer javer commented Sep 11, 2021

No description provided.

@tillkruss
Copy link
Member

Thanks for submitting this. Can you please post the errors/deprecations you're seeing when running the current release in 8.1?

$options = array();

if (strlen($this->match) > 0) {
if ($this->match !== null && strlen($this->match) > 0) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reason:

strlen(): Passing null to parameter #1 ($string) of type string is deprecated

Comment on lines +131 to 132
#[\ReturnTypeWillChange]
public function rewind()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reason for this and the following changes:

Fatal error: During inheritance of Iterator: Uncaught Return type of Predis\Collection\Iterator\ListKey::current() should either be compatible with Iterator::current(): mixed, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Fatal error: During inheritance of Iterator: Uncaught Return type of Predis\Collection\Iterator\ListKey::next() should either be compatible with Iterator::next(): void, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Fatal error: During inheritance of Iterator: Uncaught Return type of Predis\Collection\Iterator\ListKey::key() should either be compatible with Iterator::key(): mixed, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Fatal error: During inheritance of Iterator: Uncaught Return type of Predis\Collection\Iterator\ListKey::valid() should either be compatible with Iterator::valid(): bool, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Fatal error: During inheritance of Iterator: Uncaught Return type of Predis\Collection\Iterator\ListKey::rewind() should either be compatible with Iterator::rewind(): void, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Comment on lines +94 to 95
#[\ReturnTypeWillChange]
public function offsetExists($index)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reason for this and the following changes:

Fatal error: During inheritance of ArrayAccess: Uncaught Return type of Predis\Command\Processor\ProcessorChain::offsetExists($index) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Fatal error: During inheritance of ArrayAccess: Uncaught Return type of Predis\Command\Processor\ProcessorChain::offsetGet($index) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Fatal error: During inheritance of ArrayAccess: Uncaught Return type of Predis\Command\Processor\ProcessorChain::offsetSet($index, $processor) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Fatal error: During inheritance of ArrayAccess: Uncaught Return type of Predis\Command\Processor\ProcessorChain::offsetUnset($index) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Comment on lines 34 to 36
switch (strtolower($this->getArgument(0))) {
$argument = $this->getArgument(0);

switch (strtolower($argument !== null ? $argument : '')) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reason:

strtolower(): Passing null to parameter #1 ($string) of type string is deprecated

\Exception $innerException = null
) {
parent::__construct($message, $code, $innerException);
parent::__construct($message !== null ? $message : '', $code !== null ? $code : 0, $innerException);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reason:

Exception::__construct(): Passing null to parameter #1 ($message) of type string is deprecated
Exception::__construct(): Passing null to parameter #2 ($code) of type int is deprecated

Comment on lines +154 to 155
#[\ReturnTypeWillChange]
public function rewind()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reason for this and the following changes:

Fatal error: During inheritance of Iterator: Uncaught Return type of Predis\PubSub\AbstractConsumer::current() should either be compatible with Iterator::current(): mixed, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Fatal error: During inheritance of Iterator: Uncaught Return type of Predis\PubSub\AbstractConsumer::next() should either be compatible with Iterator::next(): void, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Fatal error: During inheritance of Iterator: Uncaught Return type of Predis\PubSub\AbstractConsumer::key() should either be compatible with Iterator::key(): mixed, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Fatal error: During inheritance of Iterator: Uncaught Return type of Predis\PubSub\AbstractConsumer::valid() should either be compatible with Iterator::valid(): bool, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Fatal error: During inheritance of Iterator: Uncaught Return type of Predis\PubSub\AbstractConsumer::rewind() should either be compatible with Iterator::rewind(): void, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Comment on lines 65 to 66
$sha1 = $eval ? sha1($command->getArgument(0)) : $command->getArgument(0);
$argument = $command->getArgument(0);
$sha1 = $eval ? sha1($argument !== null ? $argument : '') : $argument;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reason:

sha1(): Passing null to parameter #1 ($string) of type string is deprecated

Comment on lines +37 to 38
#[\ReturnTypeWillChange]
public function rewind()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reason for this and the following changes:

Fatal error: During inheritance of Iterator: Uncaught Return type of Predis\Response\Iterator\MultiBulkIterator::current() should either be compatible with Iterator::current(): mixed, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Fatal error: During inheritance of Iterator: Uncaught Return type of Predis\Response\Iterator\MultiBulkIterator::next() should either be compatible with Iterator::next(): void, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Fatal error: During inheritance of Iterator: Uncaught Return type of Predis\Response\Iterator\MultiBulkIterator::key() should either be compatible with Iterator::key(): mixed, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Fatal error: During inheritance of Iterator: Uncaught Return type of Predis\Response\Iterator\MultiBulkIterator::valid() should either be compatible with Iterator::valid(): bool, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Fatal error: During inheritance of Iterator: Uncaught Return type of Predis\Response\Iterator\MultiBulkIterator::rewind() should either be compatible with Iterator::rewind(): void, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Fatal error: During inheritance of Countable: Uncaught Return type of Predis\Response\Iterator\MultiBulkIterator::count() should either be compatible with Countable::count(): int, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Comment on lines +64 to 65
#[\ReturnTypeWillChange]
public function getInnerIterator()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reason:

Fatal error: During inheritance of OuterIterator: Uncaught Return type of Predis\Response\Iterator\MultiBulkTuple::getInnerIterator() should either be compatible with OuterIterator::getInnerIterator(): ?Iterator, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

public function __construct(MultiExec $transaction, $message, $code = null)
{
parent::__construct($message, $code);
parent::__construct($message, $code !== null ? $code : 0);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reason:

Exception::__construct(): Passing null to parameter #2 ($code) of type int is deprecated

@tillkruss tillkruss merged commit 5004f5d into predis:v1.1 Sep 12, 2021
@pimjansen pimjansen mentioned this pull request Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants