u01jmg3 / ics-parser

Parser for iCalendar Events • PHP 8+, 7 (≥ 7.4), 5 (≥ 5.6)
MIT License
453 stars 145 forks source link

ICal\Event gives deprecation warnings for PHP 8.2 #315

Closed Hikariii closed 1 year ago

Hikariii commented 1 year ago

Description of the Issue:

PHP 8.2

Steps to Reproduce:

  1. Use a PHP 8.2 environment
  2. run $event = new \Ical\Event(['foo' => ['bar', 3])

The following deprecation warnings occur:

NOTICE: PHP message: PHP Deprecated: Creation of dynamic property ICal\Event::$foo is deprecated in src/ICal/Event.php on line 140

NOTICE: PHP message: PHP Deprecated: Use of "self" in callables is deprecated in src/ICal/Event.php on line 155

Running the testsuite in PHP 8.2 causes the same notices.

Hikariii commented 1 year ago

@u01jmg3 Don't really know what the release-strategy is but I'd love for this to be a patch release on 3.2 and installable via Composer.

u01jmg3 commented 1 year ago

Done ✔️

room34 commented 1 year ago

This shunting of dynamic properties into the additionalProperties array is forcing me to rewrite parts of my application.

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

It seems from the above that this issue could have been resolved in a way that caused less disruption to existing applications.

u01jmg3 commented 1 year ago

Can you raise a new issue explaining the problem and the rewrite that's required? I'm also happy to review another PR. In the meantime you can downgrade to a previous version