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

Support for PHP 8.1 #27

Closed
alexgit2k opened this issue Dec 16, 2021 · 11 comments · Fixed by #30
Closed

Support for PHP 8.1 #27

alexgit2k opened this issue Dec 16, 2021 · 11 comments · Fixed by #30

Comments

@alexgit2k
Copy link
Contributor

Accordingly to the changelog (http://pecl.php.net/package-changelog.php?package=solr&release=2.5.1) the solr-extension is only compatible to PHP 8.0.0beta3 but not to the latest PHP-version 8.1.

@ryandesign
Copy link

And these warnings are emitted when for example php -v is run with php 8.1.1 when solr 2.5.1 is installed:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@0mars
Copy link
Collaborator

0mars commented Dec 30, 2021

yes, there is a major change in the serialization API, that needs to be thought about

@glensc
Copy link
Contributor

glensc commented Jan 17, 2022

Can at least the #[\ReturnTypeWillChange] attribute be set in extension? (or whatever is the way on extension code).

@0mars
Copy link
Collaborator

0mars commented Feb 3, 2022

@glensc thanks for pointing that out, will have a look into it, this weekend!

@cmelius
Copy link

cmelius commented Mar 10, 2022

@0mars hi there. Were you able to take a look at this? The deprecations are not nice but should not stop it from working, I guess?

@0mars
Copy link
Collaborator

0mars commented Mar 14, 2022

@cmelius there is a PR #30 that I'm currently testing, and seeing what kind of side-effects it has.

@0mars
Copy link
Collaborator

0mars commented Mar 14, 2022

so we have these which I can tackle in a later release, at least the core features are still working, plan would be to release
2.5.2 sometime this week

=====================================================================
TIME END 2022-03-14 18:48:48

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :    0
Exts tested     :   33
---------------------------------------------------------------------

Number of tests :  151               151
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :   15 (  9.9%) (  9.9%)
Tests passed    :  136 ( 90.1%) ( 90.1%)
---------------------------------------------------------------------
Time taken      :   10 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
SolrClient::getDebug() - Get request debug logs for the last request [tests/019.solrclient_getdebug.phpt]
SolrDocument::hasChildDocuments() - Method test [tests/025.solrdocument_haschilddocuments.phpt]
SolrDocument::getChildDocumentsCount() - Method test [tests/026.solrdocument_getchilddocscount.phpt]
SolrDocument::getInputDocument() - Where document has child docs [tests/027.solrdocument_getinputdocument_children.phpt]
SolrDocument - clone [tests/028.solrdocument_clone.phpt]
SolrDocument - clone [tests/029.solrdocument_serialize.phpt]
SolrDocument::clear - Remove all fields from the document [tests/031.solrdocument_clear.phpt]
SolrDocument::fieldExists [tests/032.solrdocument_fieldexists.phpt]
SolrDocument::getField [tests/037.solrdocument_getfield.phpt]
SolrResponse - ParseMode [tests/101.solrresponse_parseMode.phpt]
SolrDocument - Response parsed as SolrDocument with child documents [tests/106.solrresponse_child_doc_response_solrdoc.phpt]
Solr - Fetch and Update nested documents [tests/160.solr_update_document_block.phpt]
SolrParams::serialize() - serialize params [tests/196.solrparams_serialize.phpt]
SolrParams::unserialize() [tests/197.solrparams_unserialize.phpt]
Solr bug #61836 - Extending SolrDocument [tests/bug_61836_error.phpt]

@0mars 0mars closed this as completed in #30 Mar 14, 2022
@cmelius
Copy link

cmelius commented Mar 14, 2022

Great, thx!

@babesflorin
Copy link

Hello. Any news on the 2.5.2 release?

@0mars
Copy link
Collaborator

0mars commented Apr 7, 2022

Hi All, super sorry, my travel plans got shifted, and will be back online 2nd week of April, Cheers!

@babesflorin
Copy link

Hello. Welcome back @0mars. Any updates with the 2.5.2 release?

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

Successfully merging a pull request may close this issue.

6 participants