Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICal\Event gives deprecation warnings for PHP 8.2 #315

Closed
Hikariii opened this issue Feb 23, 2023 · 4 comments · Fixed by #316
Closed

ICal\Event gives deprecation warnings for PHP 8.2 #315

Hikariii opened this issue Feb 23, 2023 · 4 comments · Fixed by #316

Comments

@Hikariii
Copy link
Contributor

Hikariii commented Feb 23, 2023

  • PHP Version: 8.2
  • PHP date.timezone: *
  • ICS Parser Version: 3.2.0
  • Windows && Mac && Linux

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.

u01jmg3 added a commit that referenced this issue Feb 23, 2023
Co-authored-by: Jonathan Goode <u01jmg3@users.noreply.github.com>
@u01jmg3 u01jmg3 added this to the v2.x.x milestone Feb 23, 2023
@u01jmg3 u01jmg3 removed their assignment Feb 23, 2023
@Hikariii
Copy link
Contributor Author

Hikariii commented Feb 24, 2023

@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 u01jmg3 changed the title ICal\Event gives deprecation warnings for php8.2 ICal\Event gives deprecation warnings for PHP 8.2 Feb 24, 2023
@u01jmg3
Copy link
Owner

u01jmg3 commented Feb 24, 2023

Done ✔️

@room34
Copy link
Contributor

room34 commented Mar 14, 2023

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
Copy link
Owner

u01jmg3 commented Mar 14, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants