php-ews icon indicating copy to clipboard operation
php-ews copied to clipboard

PHP 8.2 - Deprecated dynamic properties

Open Carlmundo opened this issue 2 years ago • 6 comments

https://php.watch/versions/8.2/dynamic-properties-deprecated

Deprecated: Creation of dynamic property garethp\ews\API\Type::$Subject is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$BodyType is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$Body is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$EmailAddress is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$ToRecipients is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$EmailAddress is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$Mailbox is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$From is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$Message is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$Items is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$MessageDisposition is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$Subject is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$BodyType is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$Body is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$EmailAddress is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$ToRecipients is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$EmailAddress is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$Mailbox is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$From is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$Message is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$Items is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Deprecated: Creation of dynamic property garethp\ews\API\Type::$MessageDisposition is deprecated in /home/site/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 44

Carlmundo avatar Jun 29 '23 12:06 Carlmundo

@Garethp Is this library maintained ? And be compatible with PHP 8.2+ ?

Thanks

kl3sk avatar Jan 11 '24 14:01 kl3sk

Hey.

It's been almost a decade since I've needed this library myself and I haven't worked with PHP in quite a long time. If someone reports an actual bug with enough information that I can easily reproduction I'm happy to fix it, but I don't think I've had any real bugs reported in years, it's mostly been people who haven't been sure how to use the EWS API.

That being said, migrating this project to not use Dynamic Properties is a very large piece of work and would be a breaking change none the less. All of the code that would need to be changed is automatically generated from the xsd files that are distributed by EWS. To move away from dynamic properties I'd have to work on having it generate a fair bit more code to wrap everything in getter/setter functions with multiple different auto generated functions per type of property.

Unfortunately it's unlikely that I'm going to be making that massive shift, so I'm happy to keep things working for PHP 8 but I probably wouldn't migrate this library to continue working for PHP 9 unless I found myself in another PHP job where I needed to use the EWS Library again, or unless a company that needed it's continued support paid for the time needed to upgrade it.

With that said, if someone forks it and makes the required changes, I'd be happy to give what advice I can and accept their changes back into this project, releasing a new major version to indicate the breaking change.

Garethp avatar Jan 11 '24 16:01 Garethp

Thanks you for your quick answer.

I totally understand your position, even if it is a bad news for this library.

I have to find a suitable solution for me.

Regards

kl3sk avatar Jan 11 '24 16:01 kl3sk

Thanks for all your work @Garethp.

@kl3sk - Did you find another solution?

Carlmundo avatar Feb 16 '24 14:02 Carlmundo

Hi @Carlmundo,

I indeed, find an other solution in conjonction with my company technical team. I now use the (Deprecated) REST Api.

kl3sk avatar Feb 16 '24 15:02 kl3sk