composer self-update
Composer issues in php 8.1 and not found error
composer update
PHP Deprecated: Return type of SolrObject::offsetExists($property_name) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrObject::offsetGet($property_name) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
....
PHP Deprecated: Return type of Google\Protobuf\Internal\MapFieldIter::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapFieldIter::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
I've tried to find SolrObject across all project structures.
Nothing.
I've tried -vvv for verbose exit. Nothing. How can I find the package that takes me to said warning?
@devingray_ Before I have wrote the post, I run composer self-update
And that does not work.
composer self-update
PHP Deprecated: Return type of SolrObject::offsetExists($property_name) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrObject::offsetGet($property_name) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrObject::offsetSet($property_name, $property_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 Unknown on line 0
PHP Deprecated: Return type of SolrObject::offsetUnset($property_name) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrDocument::offsetExists($fieldName) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrDocument::offsetGet($fieldName) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrDocument::offsetSet($fieldName, $fieldValue) 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 Unknown on line 0
PHP Deprecated: Return type of SolrDocument::offsetUnset($fieldName) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrDocument::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrDocument::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrDocument::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrDocument::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrDocument::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: SolrDocument implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in Unknown on line 0
PHP Deprecated: SolrModifiableParams implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in Unknown on line 0
PHP Deprecated: SolrQuery implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in Unknown on line 0
PHP Deprecated: SolrDisMaxQuery implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedField::offsetExists($index) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedField::offsetGet($index) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedField::offsetSet($index, $newval) 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 Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedField::offsetUnset($index) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedField::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedField::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedFieldIter::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedFieldIter::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedFieldIter::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedFieldIter::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedFieldIter::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapField::offsetExists($index) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapField::offsetGet($index) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapField::offsetSet($index, $newval) 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 Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapField::offsetUnset($index) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapField::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapField::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapFieldIter::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapFieldIter::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapFieldIter::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapFieldIter::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapFieldIter::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
You are already using the latest available Composer version 2.3.5 (stable channel).
❯ composer self-update
PHP Deprecated: Return type of SolrObject::offsetExists($property_name) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrObject::offsetGet($property_name) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrObject::offsetSet($property_name, $property_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 Unknown on line 0
PHP Deprecated: Return type of SolrObject::offsetUnset($property_name) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrDocument::offsetExists($fieldName) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrDocument::offsetGet($fieldName) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrDocument::offsetSet($fieldName, $fieldValue) 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 Unknown on line 0
PHP Deprecated: Return type of SolrDocument::offsetUnset($fieldName) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrDocument::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrDocument::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrDocument::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrDocument::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrDocument::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: SolrDocument implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in Unknown on line 0
PHP Deprecated: SolrModifiableParams implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in Unknown on line 0
PHP Deprecated: SolrQuery implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in Unknown on line 0
PHP Deprecated: SolrDisMaxQuery implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedField::offsetExists($index) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedField::offsetGet($index) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedField::offsetSet($index, $newval) 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 Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedField::offsetUnset($index) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedField::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedField::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedFieldIter::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedFieldIter::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedFieldIter::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedFieldIter::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\RepeatedFieldIter::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapField::offsetExists($index) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapField::offsetGet($index) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapField::offsetSet($index, $newval) 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 Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapField::offsetUnset($index) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapField::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapField::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapFieldIter::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapFieldIter::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapFieldIter::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapFieldIter::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of Google\Protobuf\Internal\MapFieldIter::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
You are already using the latest available Composer version 2.3.5 (stable channel).
@abkrim try deleting the vendor folder and run composer update.
Double check your dependencies in composer.json also.
@jlrdw This problem appears in all projects, of my system.
I've deleted composer global, and removed the vendor in one project...
Nothing. Desesperate.
@abkrim when you delete vendor and run:
composer update
You still get errors?
Try:
composer clearcache
composer selfupdate
composer update
Verify your php version also with:
phpinfo();
You could also uninstall composer and install fresh.
Is everything working, it seems to be just a Deprecated notice.
edit
Post your composer.json file here, you probably have to update some packages to newer ones. Or for now use php 8.0.
You are definitely running composer V2 ?
Like it was mentioned do you have a package that doesn't support PHP 8.1 yet. I am still new to Laravel but had a similar problem in another framework. So you might have to stay with PHP 8.0 a little longer.
Error is on every project, or in composer global. Is not a project issue. @jeffallen . It doesn't matter in which project I run it, nor if what I run is a global composer (I don't have anything because I deleted everything, the one installed from php-zero, the one from laravel, etc)
@snapey Composer version 2.3.5 2022-04-13 16:43:00
Fresh install
> php -v
PHP 8.1.6 (cli) (built: May 17 2022 16:46:54) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.6, Copyright (c) Zend Technologies
with Zend OPcache v8.1.6, Copyright (c), by Zend Technologies
with Xdebug v3.1.4, Copyright (c) 2002-2022, by Derick Rethans
> composer create-project laravel/laravel aborrar-app
PHP Deprecated: Return type of SolrObject::offsetExists($property_name) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
PHP Deprecated: Return type of SolrObject::offsetGet($property_name) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
@abkrim have you checked requirements:
Requirements
To use PHP runtime library requires:
C extension: PHP 7.x, 8.0 PHP package: PHP 5.5, 5.6, 7.x, or 8.0.
@jlrdw According composer
Latest Composer PHP 7.2.5 or above for the latest version.
Composer 2.2 LTS (Long Term Support) PHP versions 5.3.2 - 8.1 are still supported via the LTS releases of Composer (2.2.x). If you run the installer or the self-update command the appropriate Composer version for your PHP should be automatically selected.
I get the solution.
Problem is php-extension phpX.X-solr
Remove from my system, and work fine
The Apache Solr PHP extension is an extremely fast, light-weight, feature-rich library that allows PHP applications to communicate easily and efficiently with Apache Solr server instances using an object-oriented API.
composer update
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
27 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
@abkrim. I am having the same issue. How did you remove php-extension phpX.X-solr?
@nanadjei2 Assuming it was installed with pecl - pecl uninstall solr. Or using apt sudo apt purge php8.0-solr
@nanadjei2 In my case it's an Ubuntu package and use your package manager
sudo apt remove -y --purge php-solr
What's happening now in this error? When I update PHP 8.1 I got this.! -_-
Please or to participate in this conversation.