Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.1 deprecation warnings #47

Open
dhampik opened this issue Jun 12, 2022 · 2 comments
Open

PHP 8.1 deprecation warnings #47

dhampik opened this issue Jun 12, 2022 · 2 comments

Comments

@dhampik
Copy link

dhampik commented Jun 12, 2022

Добрый день!

При использовании расширения с PHP 8.1 (в частности, вместе с пакетом phpbu) получаю множество deprecation warnings:

Deprecation warnings (click to expand)

Deprecated: Return type of Arhitector\Yandex\Disk::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/arhitector/yandex/src/Client/Container/ContainerTrait.php on line 161

Deprecated: Return type of Arhitector\Yandex\Disk::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/arhitector/yandex/src/Client/Container/ContainerTrait.php on line 174

Deprecated: Return type of Arhitector\Yandex\Disk::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/arhitector/yandex/src/Client/Container/ContainerTrait.php on line 202

Deprecated: Return type of Arhitector\Yandex\Disk::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/arhitector/yandex/src/Client/Container/ContainerTrait.php on line 189

Deprecated: Return type of Arhitector\Yandex\Disk::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/arhitector/yandex/src/Client/Container/ContainerTrait.php on line 82

Deprecated: Return type of Arhitector\Yandex\Disk::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/arhitector/yandex/src/Disk.php on line 474

Deprecated: Return type of Symfony\Component\OptionsResolver\OptionsResolver::offsetExists($option) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/symfony/options-resolver/OptionsResolver.php on line 909

Deprecated: Return type of Symfony\Component\OptionsResolver\OptionsResolver::offsetGet($option) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/symfony/options-resolver/OptionsResolver.php on line 690

Deprecated: Return type of Symfony\Component\OptionsResolver\OptionsResolver::offsetSet($option, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/symfony/options-resolver/OptionsResolver.php on line 923

Deprecated: Return type of Symfony\Component\OptionsResolver\OptionsResolver::offsetUnset($option) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/symfony/options-resolver/OptionsResolver.php on line 933

Deprecated: Return type of Symfony\Component\OptionsResolver\OptionsResolver::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/symfony/options-resolver/OptionsResolver.php on line 949

Deprecated: Return type of Arhitector\Yandex\Disk\AbstractResource::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/arhitector/yandex/src/Client/Container/ContainerTrait.php on line 161

Deprecated: Return type of Arhitector\Yandex\Disk\AbstractResource::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/arhitector/yandex/src/Client/Container/ContainerTrait.php on line 174

Deprecated: Return type of Arhitector\Yandex\Disk\AbstractResource::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/arhitector/yandex/src/Client/Container/ContainerTrait.php on line 202

Deprecated: Return type of Arhitector\Yandex\Disk\AbstractResource::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/arhitector/yandex/src/Client/Container/ContainerTrait.php on line 189

Deprecated: Return type of Arhitector\Yandex\Disk\AbstractResource::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/arhitector/yandex/src/Client/Container/ContainerTrait.php on line 33

Deprecated: Return type of Arhitector\Yandex\Disk\AbstractResource::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/arhitector/yandex/src/Client/Container/ContainerTrait.php on line 82

Deprecated: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in /srv/phpbu/vendor/arhitector/yandex/src/Disk/Resource/Closed.php on line 91

Deprecated: Return type of Arhitector\Yandex\Client\Container\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/arhitector/yandex/src/Client/Container/ContainerTrait.php on line 161

Deprecated: Return type of Arhitector\Yandex\Client\Container\Collection::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/arhitector/yandex/src/Client/Container/ContainerTrait.php on line 174

Deprecated: Return type of Arhitector\Yandex\Client\Container\Collection::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/arhitector/yandex/src/Client/Container/ContainerTrait.php on line 202

Deprecated: Return type of Arhitector\Yandex\Client\Container\Collection::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/arhitector/yandex/src/Client/Container/ContainerTrait.php on line 189

Deprecated: Return type of Arhitector\Yandex\Client\Container\Collection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/arhitector/yandex/src/Client/Container/ContainerTrait.php on line 82

Deprecated: Return type of Arhitector\Yandex\Client\Container\Collection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/phpbu/vendor/arhitector/yandex/src/Client/Container/ContainerTrait.php on line 33

Deprecated: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in /srv/phpbu/vendor/arhitector/yandex/src/Disk/Resource/Closed.php on line 91

Deprecated: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in /srv/phpbu/vendor/arhitector/yandex/src/Disk/Resource/Closed.php on line 647

Deprecated: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in /srv/phpbu/vendor/arhitector/yandex/src/Disk/Resource/Closed.php on line 573

Deprecated: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in /srv/phpbu/vendor/arhitector/yandex/src/Disk/Resource/Closed.php on line 91

Deprecated: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in /srv/phpbu/vendor/arhitector/yandex/src/Disk/Resource/Closed.php on line 647

@dhampik
Copy link
Author

dhampik commented Jun 16, 2022

@RNSNC судя по сообщению, в composer.json есть какая-то другая зависимость, у которой есть зависимость php-http/client-common ^2.5 и они конфликтуют.
В моем случае я смог установить пакет на PHP 8.0 и всё работает без предупреждений и ошибок, хотя загрузка на яндекс диск адски долгая - 1Гб около 3х часов. ⌛

@jack-theripper
Copy link
Owner

releases/2.3.0

Список изменений

21/11/2022

PHP 7.4, 8.0, 8.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants