yandex
yandex copied to clipboard
PHP 8.1 deprecation warnings
Добрый день!
При использовании расширения с 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
А я получаю предупреждение об ошибке во время установки, хотя http-client v1.11.0 требует php:>=7.3, но не 8. Как использовать пакет на 8 версии языка?
- arhitector/yandex 2.2 requires php-http/client-common ^1.1 -> found php-http/client-common[v1.1.0, ..., 1.11.0] but it conflicts with your root composer.json require (^2.5).
@RNSNC судя по сообщению, в composer.json
есть какая-то другая зависимость, у которой есть зависимость php-http/client-common
^2.5
и они конфликтуют.
В моем случае я смог установить пакет на PHP 8.0 и всё работает без предупреждений и ошибок, хотя загрузка на яндекс диск адски долгая - 1Гб около 3х часов. :hourglass: