PHP 8.2 - Community Input

Open to all! Ask other shopowners for help.
Omar_one
Senior Contributor
Posts: 677
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Has thanked: 100 times
Been thanked: 56 times

PHP 8.2 - Community Input

Post by Omar_one »

Hello,
Will this version support PHP 8.2?

BR
Omar


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
burt
Core Team
Posts: 4551
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: 1.0.8.16 Questions / Comments / Concerns

Post by burt »

Phoenix is tested at 8.0

https://github.com/CE-PhoenixCart/Phoen ... quirements

PHP8.2 introduces breaking changes, it may work but will cause many errors in error_log
There is no roadmap to getting Phoenix ready for 8.2
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: 1.0.8.16 Questions / Comments / Concerns

Post by ecartz »

burt wrote: Thu Nov 02, 2023 11:23 am There is no roadmap to getting Phoenix ready for 8.2
If you turn off E_DEPRECATED in error_reporting, I would expect 8.2 to work. The largest problem is strftime, which is likely to require a significant rewrite. More than I'd want to do in the 1.0.8.* series.
Omar_one
Senior Contributor
Posts: 677
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Has thanked: 100 times
Been thanked: 56 times

Re: 1.0.8.16 Questions / Comments / Concerns

Post by Omar_one »

thank you @burt , @ecartz
We got email from the hosting company that PHP version PHP 7.4 is deprecated. We recommend that we update to a supported version of PHP (PHP 8.2), and they will remove the outdated PHP versions 7.2 and 8.1 from the server. PHP version 7.4 will still be available on the server, but this will be removed for good on December 1, 2023 :cry: :( :(
so I testing that 1.0.8.16 work for sure also with the latest PHP version. I change the PHP version to PHP 8.2 from the cPanel management in the MultiPHP manager section.
The shop side working fine till now
a few error there is

Code: Select all

PHP Deprecated:  Return type of database_core::query($sql, $resultmode = MYSQLI_STORE_RESULT) should either be compatible with mysqli::query(string $query, int $result_mode = MYSQLI_STORE_RESULT): mysqli_result|bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/shop/public_html/includes/system/versioned/1.0.8.1/database_core.php on line 61
PHP Deprecated:  Return type of mysql_session::open($save_path, $session_name) should either be compatible with SessionHandler::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/shop/public_html/includes/system/versioned/1.0.8.3/mysql_session.php on line 27
PHP Deprecated:  Return type of mysql_session::close() should either be compatible with SessionHandler::close(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/shop/public_html/includes/system/versioned/1.0.8.3/mysql_session.php on line 15
PHP Deprecated:  Return type of mysql_session::read($key) should either be compatible with SessionHandler::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/shop/public_html/includes/system/versioned/1.0.8.3/mysql_session.php on line 31
PHP Deprecated:  Return type of mysql_session::write($key, $value) should either be compatible with SessionHandler::write(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/shop/public_html/includes/system/versioned/1.0.8.3/mysql_session.php on line 47
PHP Deprecated:  Return type of mysql_session::destroy($key) should either be compatible with SessionHandler::destroy(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/shop/public_html/includes/system/versioned/1.0.8.3/mysql_session.php on line 19
PHP Deprecated:  Return type of mysql_session::gc($maxlifetime) should either be compatible with SessionHandler::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/shop/public_html/includes/system/versioned/1.0.8.3/mysql_session.php on line 23
PHP Deprecated:  Return type of mysql_session::validateId($key) should either be compatible with SessionUpdateTimestampHandlerInterface::validateId(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/shop/public_html/includes/system/versioned/1.0.8.3/mysql_session.php on line 42
PHP Deprecated:  Return type of mysql_session::updateTimestamp($key, $ignore) should either be compatible with SessionUpdateTimestampHandlerInterface::updateTimestamp(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/shop/public_html/includes/system/versioned/1.0.8.3/mysql_session.php on line 38
PHP Deprecated:  Return type of Href::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/hattufi/public_html/includes/system/versioned/1.0.8.5/href.php on line 139
adding this line before error line fix the issue

Code: Select all

#[\ReturnTypeWillChange]
still have this error

Code: Select all

PHP Deprecated:  Creation of dynamic property messageStack::$messages is deprecated in /home/shop/public_html/includes/system/versioned/1.0.5.1/message_stack.php on line 23
@burt ,@ecartz if you think it's not the right place to post it here I can delete the post from here and create new one or if the @admin can move it as new post

thank you
Omar
User avatar
bonbec
Contributor
Posts: 190
Joined: Mon Oct 26, 2020 12:23 pm
Phoenix Version: V1.1.0.7
Has thanked: 54 times
Been thanked: 40 times

Re: 1.0.8.16 Questions / Comments / Concerns

Post by bonbec »

@Omar_one
For the last error, add this #[AllowDynamicProperties] before the class call
Old MS2.2 PHP7.4 site being converted to CE Phoenix v1.1.0.6 PHP 8.3
User avatar
burt
Core Team
Posts: 4551
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: PHP 8.2 - Community Input

Post by burt »

I did start working on testing (not fixing!) 1.0.8.20 with php8.2 back in the early summer, but as with all things, other more important things get in the way and stuff gets put on the back burner or even down the back of the oven never to be seen again :-\

My findings (line numbers may have changed but should be broadly the same) - please do note that NONE of these changes are tested other than by me while I was solving some other problems. All should therefore be taken and tested, and I will be glad of any feedback or changes;
/includes/hooks/admin/siteWide/hMenu.php:53
usort($group['apps'], 'static::sort_box_links');

admin/includes/classes/message_stack.php
Add new L23
public $errors;

/includes/system/versioned/1.0.5.1/message_stack.php
Add new L21
public $messages;

Adding #[\ReturnTypeWillChange] to the following files removes warnings.
It's not the true fix but does stop the error_log getting blasted..

includes/system/versioned/1.0.8.1/database_core.php:61
includes/system/versioned/1.0.8.3/mysql_session.php:15
includes/system/versioned/1.0.8.3/mysql_session.php:20
includes/system/versioned/1.0.8.3/mysql_session.php:25
includes/system/versioned/1.0.8.3/mysql_session.php:30
includes/system/versioned/1.0.8.3/mysql_session.php:35
includes/system/versioned/1.0.8.3/mysql_session.php:43
includes/system/versioned/1.0.8.3/mysql_session.php:48
includes/system/versioned/1.0.8.3/mysql_session.php:54
includes/system/versioned/1.0.8.5/href.php:145

includes/system/versioned/1.0.7.8/abstract_payment_module.php
Add new L15
public $public_title, $order_status;
We're not going to be looking at getting Phoenix ready for 8.2 for some small while yet. Core Team has way too much to do and very little time in which to do those things, so any help from the Community on this would be very appreciated.

In the meantime it would be excellent if anyone running Phoenix on php8.2 would regularly check their logs and post in this thread any errors they find (and hopefully any fixes for those errors as well).
User avatar
burt
Core Team
Posts: 4551
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: PHP 8.2 - Community Input

Post by burt »

And another obvious problem is going to be strftime(). That's a complicated one.
See https://github.com/CE-PhoenixCart/PhoenixCart/issues/36 for a bit of chit-chat etc on that.

But feel free to discuss here also.

The more ideas/solutions we can get from the community, the better - this is, after all, still called "CE Phoenix". Community Edition Phoenix, and we really need and would be really grateful for the help.
Omar_one
Senior Contributor
Posts: 677
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Has thanked: 100 times
Been thanked: 56 times

Re: PHP 8.2 - Community Input

Post by Omar_one »

burt wrote: Fri Nov 03, 2023 2:00 pm
/includes/system/versioned/1.0.5.1/message_stack.php
Add new L21
public $messages;

Adding #[\ReturnTypeWillChange] to the following files removes warnings.
It's not the true fix but does stop the error_log getting blasted..

includes/system/versioned/1.0.8.1/database_core.php:61
includes/system/versioned/1.0.8.3/mysql_session.php:15
includes/system/versioned/1.0.8.3/mysql_session.php:20
includes/system/versioned/1.0.8.3/mysql_session.php:25
includes/system/versioned/1.0.8.3/mysql_session.php:30
includes/system/versioned/1.0.8.3/mysql_session.php:35
includes/system/versioned/1.0.8.3/mysql_session.php:43
includes/system/versioned/1.0.8.3/mysql_session.php:48
includes/system/versioned/1.0.8.3/mysql_session.php:54
includes/system/versioned/1.0.8.5/href.php:145
here what I have done
I created folder "versioned" in includes/system/override and inside created folders (1.0.5.1, 1.0.8.1, 1.0.8.3 and 1.0.8.5) I copied the files (message_stack.php, database_core.php, mysql_session.php, href.php, there and edit them and saved them

the admin side admin/includes/classes/message_stack.php
change L20 to

Code: Select all

class messageStack extends \stdClass{
I am not sure if it's right
Last edited by Omar_one on Sat Nov 04, 2023 10:35 am, edited 2 times in total.
Omar_one
Senior Contributor
Posts: 677
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Has thanked: 100 times
Been thanked: 56 times

Re: PHP 8.2 - Community Input

Post by Omar_one »

here another errors
almost all of them about this L21 (/home/shop/public_html/admin/includes/classes/object_info.php)

Code: Select all

PHP Deprecated:  Creation of dynamic property objectInfo::$orders_id is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$customers_id is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$customers_name is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$customers_company is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$customers_street_address is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$customers_suburb is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$customers_city is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$customers_postcode is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$customers_state is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$customers_country is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$customers_country_id is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$customers_telephone is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$customers_email_address is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$customers_address_format_id is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$customers_guest is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$reviews_key is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$delivery_name is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$delivery_company is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$delivery_street_address is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$delivery_suburb is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$delivery_city is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$delivery_postcode is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$delivery_state is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$delivery_country is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$delivery_country_id is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$delivery_address_format_id is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$billing_name is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$billing_company is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$billing_street_address is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$billing_suburb is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$billing_city is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$billing_postcode is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$billing_state is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
PHP Deprecated:  Creation of dynamic property objectInfo::$billing_country is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$billing_country_id is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$billing_address_format_id is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$payment_method is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$cc_type is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$cc_owner is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$cc_number is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$cc_expires is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$transaction_details is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$last_modified is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$date_purchased is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$orders_status is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$orders_date_finished is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$currency is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$currency_value is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$clubosc_key is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$clubosc_email_sent is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$customer_service_id is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$void is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$return_exchange is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$in_store_purchase is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$pos_username is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$gift_wrap is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$discount_codes is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$customer_shopping_points_spending is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$customer_referral is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$shipping_module is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$orders_status_name is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21
 PHP Deprecated:  Creation of dynamic property objectInfo::$order_total is deprecated in /home/shop/public_html/admin/includes/classes/object_info.php on line 21 

Code: Select all

PHP Deprecated:  preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/shop/public_html/admin/includes/functions/html_output.php on line 27

Code: Select all

 PHP Deprecated:  Creation of dynamic property objectInfo::$link is deprecated in /home/shop/public_html/admin/includes/actions/orders/views/default.php on line 95
Omar_one
Senior Contributor
Posts: 677
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Has thanked: 100 times
Been thanked: 56 times

Re: PHP 8.2 - Community Input

Post by Omar_one »

more PHP Deprecated

Code: Select all

PHP Deprecated:  substr(): Passing null to parameter #1 ($string) of type string is deprecated in /home/shop/public_html/includes/apps/paypal/OSCOM_PayPal.php on line 238
PHP Deprecated:  Function utf8_encode() is deprecated in /home/shop/public_html/includes/apps/paypal/api/GetBalance.php on line 34


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply