backdrop-contrib / entity_plus

This module wraps in a variety of additional entity-related functionality from various sources. Partial port of D7 Entity API.
https://backdropcms.org/project/entity_plus
GNU General Public License v2.0
3 stars 11 forks source link

Deprecated functions - Can't run site update.php because of entity_plus #127

Closed muranod closed 2 years ago

muranod commented 2 years ago

1.x-1.0.15

I think all was fine when I worked on the site five or six days ago.

Noticed this right after updating core to latest version and then running update.php, both automatically and from the address bar.

Deprecated function: Return type of EntityStructureWrapper::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 277 of D:\xampp\htdocs\backdrop\modules\entity_plus\includes\entity_plus.wrapper.inc).
Deprecated function: Return type of EntityListWrapper::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 971 of D:\xampp\htdocs\backdrop\modules\entity_plus\includes\entity_plus.wrapper.inc).
Deprecated function: Return type of EntityListWrapper::offsetExists($delta) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 971 of D:\xampp\htdocs\backdrop\modules\entity_plus\includes\entity_plus.wrapper.inc).
Deprecated function: Return type of EntityListWrapper::offsetGet($delta) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 971 of D:\xampp\htdocs\backdrop\modules\entity_plus\includes\entity_plus.wrapper.inc).
Deprecated function: Return type of EntityListWrapper::offsetSet($delta, $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 require_once() (line 971 of D:\xampp\htdocs\backdrop\modules\entity_plus\includes\entity_plus.wrapper.inc).
Deprecated function: Return type of EntityListWrapper::offsetUnset($delta) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 971 of D:\xampp\htdocs\backdrop\modules\entity_plus\includes\entity_plus.wrapper.inc).
Deprecated function: Return type of EntityListWrapper::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 971 of D:\xampp\htdocs\backdrop\modules\entity_plus\includes\entity_plus.wrapper.inc).
Deprecated function: Return type of EntityMetadataWrapperIterator::hasChildren() should either be compatible with RecursiveIterator::hasChildren(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 1387 of D:\xampp\htdocs\backdrop\modules\entity_plus\includes\entity_plus.wrapper.inc).
Deprecated function: Return type of EntityMetadataWrapperIterator::getChildren() should either be compatible with RecursiveIterator::getChildren(): ?RecursiveIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 1387 of D:\xampp\htdocs\backdrop\modules\entity_plus\includes\entity_plus.wrapper.inc).
Deprecated function: Return type of EntityMetadataWrapperIterator::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 1387 of D:\xampp\htdocs\backdrop\modules\entity_plus\includes\entity_plus.wrapper.inc).
Deprecated function: Return type of EntityMetadataWrapperIterator::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 1387 of D:\xampp\htdocs\backdrop\modules\entity_plus\includes\entity_plus.wrapper.inc).
Deprecated function: Return type of EntityMetadataWrapperIterator::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 1387 of D:\xampp\htdocs\backdrop\modules\entity_plus\includes\entity_plus.wrapper.inc).
Deprecated function: Return type of EntityMetadataWrapperIterator::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 1387 of D:\xampp\htdocs\backdrop\modules\entity_plus\includes\entity_plus.wrapper.inc).
Deprecated function: Return type of EntityMetadataWrapperIterator::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 1387 of D:\xampp\htdocs\backdrop\modules\entity_plus\includes\entity_plus.wrapper.inc).
Deprecated function: Return type of EntityMetadataArrayObject::offsetExists($delta) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 1455 of D:\xampp\htdocs\backdrop\modules\entity_plus\includes\entity_plus.wrapper.inc).
Deprecated function: Return type of EntityMetadataArrayObject::offsetGet($delta) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 1455 of D:\xampp\htdocs\backdrop\modules\entity_plus\includes\entity_plus.wrapper.inc).
Deprecated function: Return type of EntityMetadataArrayObject::offsetSet($delta, $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 require_once() (line 1455 of D:\xampp\htdocs\backdrop\modules\entity_plus\includes\entity_plus.wrapper.inc).
Deprecated function: Return type of EntityMetadataArrayObject::offsetUnset($delta) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 1455 of D:\xampp\htdocs\backdrop\modules\entity_plus\includes\entity_plus.wrapper.inc).
Deprecated function: Return type of EntityMetadataArrayObject::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 1455 of D:\xampp\htdocs\backdrop\modules\entity_plus\includes\entity_plus.wrapper.inc).
Deprecated function: Return type of EntityMetadataArrayObject::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 1455 of D:\xampp\htdocs\backdrop\modules\entity_plus\includes\entity_plus.wrapper.inc).
argiepiano commented 2 years ago

This looks suspiciously like a problem generated by PHP 8. What version of PHP are you using? We'll probably need to investigate a fix by looking at any PHP 8 fixes in D7 Entity API.

As a quick and dirty fix, see if you can set your site to use PHP 7.4?

argiepiano commented 2 years ago

Confirmed. See D7 Entity API issue https://www.drupal.org/project/entity/issues/3249556.

I'll work on a patch.

argiepiano commented 2 years ago

@muranod can you please test the PR I just provided and confirm that it removes these deprecation notices? PR #128.

muranod commented 2 years ago

Thanks, for the messages. Yes, it’s php 8.1.2 because I’m setting both backdrop and drupal 9, was hoping I’d have fewer issues transitioning to d10.

My skill level is not all that high – do I need to patch the current module (if I can figure that out – haven’t done that in years) or download the tar/zip file and install. Tried the latter, but update now cites unresolved dependencies and won’t run.

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows

From: Alejandro @.> Sent: Wednesday, April 6, 2022 6:38 PM To: @.> Cc: @.>; @.> Subject: Re: [backdrop-contrib/entity_plus] Deprecated functions - Can't run site update.php because of entity_plus (Issue #127)

@muranodhttps://github.com/muranod can you please test the PR I just provided and confirm that it removes these deprecation notices? PR #128https://github.com/backdrop-contrib/entity_plus/pull/128.

— Reply to this email directly, view it on GitHubhttps://github.com/backdrop-contrib/entity_plus/issues/127#issuecomment-1090882546, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADUVECEQ26FWBIKK5GHYHQTVDYG6PANCNFSM5SXM7BSA. You are receiving this because you were mentioned.Message ID: @.***>

muranod commented 2 years ago

Thanks for the quick responses. Yes, it is php 8.1.2 – setting up the same site in both Backdrop and Drupal 9 – was hoping using v8 would ease the transition to D10.

Do I need to patch the module with the code or can I dl and install the tar/zip file? I tried that and it installed, but I get “unresolved dependency” errors re: needing EP v. 1.0.5 and the update won’t run.

Apologies for my lack of skills in this area.

Error Unresolved dependency

Entity Plus (Version =1.0.5 required) more Error Unresolved dependency

Entity Plus (Version =1.0.5 required) more Error Unresolved dependency

Entity Plus (Version =1.0.5 required) more Error Unresolved dependency

Entity Plus (Version =1.0.5 required) more

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows

From: Alejandro @.> Sent: Wednesday, April 6, 2022 6:38 PM To: @.> Cc: @.>; @.> Subject: Re: [backdrop-contrib/entity_plus] Deprecated functions - Can't run site update.php because of entity_plus (Issue #127)

@muranodhttps://github.com/muranod can you please test the PR I just provided and confirm that it removes these deprecation notices? PR #128https://github.com/backdrop-contrib/entity_plus/pull/128.

— Reply to this email directly, view it on GitHubhttps://github.com/backdrop-contrib/entity_plus/issues/127#issuecomment-1090882546, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADUVECEQ26FWBIKK5GHYHQTVDYG6PANCNFSM5SXM7BSA. You are receiving this because you were mentioned.Message ID: @.***>

argiepiano commented 2 years ago

@muranod thanks for the reply. The "Unresolved dependency" error is unrelated to this fix. It means that you probably downloaded the "dev" version of Entity Plus and a module that depends on it (Rules? Entity Tokens?) is complaining. The way to fix this new error is to be sure you actually patch the latest release of Entity Plus, not the dev version. You can find the latest release here: https://github.com/backdrop-contrib/entity_plus/releases/download/1.x-1.0.15/entity_plus.zip

You'll need to download that, patch it, and then manually move it to your modules folder. Remove the old Entity Plus folder from there.

It looks like the issue you reported has been fixed, though.

If you need further help please ping me on the Backdrop Zulip channel. https://backdrop.zulipchat.com/

muranod commented 2 years ago

Awesome. Thanks, Alejandro!

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows

From: Alejandro @.> Sent: Thursday, April 7, 2022 8:58 AM To: @.> Cc: @.>; @.> Subject: Re: [backdrop-contrib/entity_plus] Deprecated functions - Can't run site update.php because of entity_plus (Issue #127)

@muranodhttps://github.com/muranod thanks for the reply. The "Unresolved dependency" error is unrelated to this fix. It means that you probably downloaded the "dev" version of Entity Plus and a module that depends on it (Rules? Entity Tokens?) is complaining. The way to fix this new error is to be sure you actually patch the latest release of Entity Plus, not the dev version. You can find the latest release here: https://github.com/backdrop-contrib/entity_plus/releases/download/1.x-1.0.15/entity_plus.zip

You'll need to download that, patch it, and then manually move it to your modules folder. Remove the old Entity Plus folder from there.

It looks like the issue you reported has been fixed, though.

If you need further help please ping me on the Backdrop Zulip channel. https://backdrop.zulipchat.com/

— Reply to this email directly, view it on GitHubhttps://github.com/backdrop-contrib/entity_plus/issues/127#issuecomment-1091704771, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADUVECDJMC453DIEFSXMYJLVD3LYFANCNFSM5SXM7BSA. You are receiving this because you were mentioned.Message ID: @.***>

muranod commented 1 year ago

Thanks much for this, Alejandro.

Sorry I didn’t respond sooner - I have a houseguest staying in the room with the dev computer, so I haven’t been able to work on this over the weekend.

I did try many times last week, but couldn’t get the patch to apply – my lack of skills are at fault.

I will return to trying it this week.

Cheers!

Dan Murano

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows

From: Alejandro @.> Sent: Thursday, April 7, 2022 8:58 AM To: @.> Cc: @.>; @.> Subject: Re: [backdrop-contrib/entity_plus] Deprecated functions - Can't run site update.php because of entity_plus (Issue #127)

@muranodhttps://github.com/muranod thanks for the reply. The "Unresolved dependency" error is unrelated to this fix. It means that you probably downloaded the "dev" version of Entity Plus and a module that depends on it (Rules? Entity Tokens?) is complaining. The way to fix this new error is to be sure you actually patch the latest release of Entity Plus, not the dev version. You can find the latest release here: https://github.com/backdrop-contrib/entity_plus/releases/download/1.x-1.0.15/entity_plus.zip

You'll need to download that, patch it, and then manually move it to your modules folder. Remove the old Entity Plus folder from there.

It looks like the issue you reported has been fixed, though.

If you need further help please ping me on the Backdrop Zulip channel. https://backdrop.zulipchat.com/

— Reply to this email directly, view it on GitHubhttps://github.com/backdrop-contrib/entity_plus/issues/127#issuecomment-1091704771, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADUVECDJMC453DIEFSXMYJLVD3LYFANCNFSM5SXM7BSA. You are receiving this because you were mentioned.Message ID: @.***>