Plugin Compatibility with PHP 8

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

doczimut
Posts: 126
Joined: Thu Dec 25, 2008 1:10 pm
Location: Normandy (France)

Re: Plugin Compatibility with PHP 8

Post by doczimut » Thu Mar 02, 2023 11:35 am

Yes, it is strange!
It works now.
However, if I activate the Debug mode, I have:

DEPRECATED: Return type of XH\PluginConfig::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

C:\...\cmsimple\classes\PluginConfig.php:52
DEPRECATED: Return type of XH\PluginConfig::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

C:\...\cmsimple\classes\PluginConfig.php:67
DEPRECATED: Return type of XH\PluginConfig::offsetSet($offset, $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

C:\...\cmsimple\classes\PluginConfig.php:83
DEPRECATED: Return type of XH\PluginConfig::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

C:\...\cmsimple\classes\PluginConfig.php:98
XH-DEPRECATED: Function initvar() is deprecated

C:\...\plugins\jm_landingpage\admin.php:15

Line 15: InitVar('jm_landingpage');

lck
Posts: 2963
Joined: Wed Mar 23, 2011 11:43 am
Contact:

Re: Plugin Compatibility with PHP 8

Post by lck » Thu Mar 02, 2023 11:47 am

I'll send you a customized version via PM. Test it once.
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“   👉 Ludwig's XH-Templates for MultiPage & OnePage

lck
Posts: 2963
Joined: Wed Mar 23, 2011 11:43 am
Contact:

Re: Plugin Compatibility with PHP 8

Post by lck » Thu Mar 02, 2023 11:56 am

doczimut wrote:
Thu Mar 02, 2023 11:35 am
DEPRECATED: Return type of XH\PluginConfig::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

C:\...\cmsimple\classes\PluginConfig.php:52
DEPRECATED: Return type of XH\PluginConfig::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

C:\...\cmsimple\classes\PluginConfig.php:67
DEPRECATED: Return type of XH\PluginConfig::offsetSet($offset, $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

C:\...\cmsimple\classes\PluginConfig.php:83
DEPRECATED: Return type of XH\PluginConfig::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
These error messages come from XH 1.7.5 under PHP 8.2. This has nothing to do with jm_langingpage.
These errors are already fixed somewhere here in the forum.

*Edit: Found on Github: https://github.com/cmsimple-xh/cmsimple ... 1013288590
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“   👉 Ludwig's XH-Templates for MultiPage & OnePage

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Plugin Compatibility with PHP 8

Post by cmb » Thu Mar 02, 2023 1:31 pm

lck wrote:
Thu Mar 02, 2023 11:56 am
These errors are already fixed somewhere here in the forum.
And they don't do any harm; for now, you can just ignore them. :)
Christoph M. Becker – Plugins for CMSimple_XH

doczimut
Posts: 126
Joined: Thu Dec 25, 2008 1:10 pm
Location: Normandy (France)

Re: Plugin Compatibility with PHP 8

Post by doczimut » Thu Mar 02, 2023 1:45 pm

The version offered via messaging no longer causes errors for the plugin.
For errors from CMSimple and after applying the patch, this error remains:
DEPRECATED: Return type of XH\PluginConfig::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
C:\...\cmsimple\classes\PluginConfig.php:101

Line 101 is the patch's 'public function offsetUnset($offset)'.

doczimut
Posts: 126
Joined: Thu Dec 25, 2008 1:10 pm
Location: Normandy (France)

Re: Plugin Compatibility with PHP 8

Post by doczimut » Thu Mar 02, 2023 2:03 pm

I also have these error messages in Admin/Settings/configuration

DEPRECATED: Using ${var} in strings is deprecated, use {$var} instead
C:\...\cmsimple\classes\CoreConfigFileEdit.php:52
DEPRECATED: Using ${var} in strings is deprecated, use {$var} instead
C:\...\cmsimple\classes\CoreConfigFileEdit.php:53
DEPRECATED: Creation of dynamic property XH\CoreConfigFileEdit::$varName is deprecated
C:\...\cmsimple\classes\CoreConfigFileEdit.php:26

lck
Posts: 2963
Joined: Wed Mar 23, 2011 11:43 am
Contact:

Re: Plugin Compatibility with PHP 8

Post by lck » Thu Mar 02, 2023 5:03 pm

doczimut wrote:
Thu Mar 02, 2023 1:45 pm
The version offered via messaging no longer causes errors for the plugin.
Fine.
doczimut wrote:
Thu Mar 02, 2023 1:45 pm
For errors from CMSimple and after applying the patch, this error remains:
DEPRECATED: Return type of XH\PluginConfig::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
C:\...\cmsimple\classes\PluginConfig.php:101
Should be all fixed in this version.
doczimut wrote:
Thu Mar 02, 2023 2:03 pm
I also have these error messages in Admin/Settings/configuration

DEPRECATED: Using ${var} in strings is deprecated, use {$var} instead
C:\...\cmsimple\classes\CoreConfigFileEdit.php:52
DEPRECATED: Using ${var} in strings is deprecated, use {$var} instead
C:\...\cmsimple\classes\CoreConfigFileEdit.php:53
DEPRECATED: Creation of dynamic property XH\CoreConfigFileEdit::$varName is deprecated
C:\...\cmsimple\classes\CoreConfigFileEdit.php:26
There are already fixes for this.

 
cmb wrote:
Thu Mar 02, 2023 1:31 pm
lck wrote:
Thu Mar 02, 2023 11:56 am
These errors are already fixed somewhere here in the forum.
And they don't do any harm; for now, you can just ignore them. :)
Yes, but XH 1.7.6 would probably be urgently needed and should be released as soon as possible.
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“   👉 Ludwig's XH-Templates for MultiPage & OnePage

doczimut
Posts: 126
Joined: Thu Dec 25, 2008 1:10 pm
Location: Normandy (France)

Re: Plugin Compatibility with PHP 8

Post by doczimut » Fri Mar 17, 2023 5:39 pm

Hello

I return to you the deprecated messages.
For the file /cmsimple/classes/PluginConfig.php, I saw this fix, however on line 101, put a \ at #[ReturnTypeWillChange] which becomes #[\ReturnTypeWillChange]

And the following errors persist:

In Admin/Settings/configuration:
DEPRECATED: Using ${var} in strings is deprecated, use {$var} instead
C:\...\cmsimple\classes\CoreConfigFileEdit.php:52
DEPRECATED: Using ${var} in strings is deprecated, use {$var} instead
C:\...\cmsimple\classes\CoreConfigFileEdit.php:53
DEPRECATED: Creation of dynamic property XH\CoreConfigFileEdit::$varName is deprecated
C:\...\cmsimple\classes\CoreConfigFileEdit.php:26

In Admin/Settings/language:
DEPRECATED: Creation of dynamic property XH\CoreLangFileEdit::$varName is deprecated
C:\...\cmsimple\classes\CoreLangFileEdit.php:26

lck
Posts: 2963
Joined: Wed Mar 23, 2011 11:43 am
Contact:

Re: Plugin Compatibility with PHP 8

Post by lck » Tue Mar 21, 2023 5:22 pm

As Christoph has already written, the messages can be ignored in the meantime.

In the current Master of CMSimpel_XH these messages are already fixed. Direct Download.
You can test this version under PHP 8.2 and give feedback. CMSimple_XH 1.7.6 should be released soon.
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“   👉 Ludwig's XH-Templates for MultiPage & OnePage

Berni
Posts: 132
Joined: Wed Feb 12, 2014 4:38 pm
Contact:

Re: Plugin Compatibility with PHP 8

Post by Berni » Wed Apr 19, 2023 5:02 am

Zu Quoteoftheday 1.1 habe ich allerdings eine Einschränkung zu vermelden:
Denn das Plugin läuft zwar, kann aber im Backend nicht mehr aufgerufen werden.

CMSimple_XH 1.7.5 Released: 2021-10-03
PHP 8.0.28

Post Reply