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

Warnung loswerden: Creation of dynamic property ... is deprecated #1607

Merged

Conversation

nelarsen
Copy link
Contributor

@nelarsen nelarsen commented Jul 1, 2024

Mit Bezug auf #1605 ist das Ziel dieser PR, die u.g. Warnungen loszuwerden. PHP erlaubt es (bald) nicht mehr, properties dynamisch zu deklarieren. Die Lösung ist also, die betroffenen properties in der class-Definition zu deklarieren.

PHP Deprecated: Creation of dynamic property CommonsBooking\Tests\Repository\TimeframeTest::$timeframeId is deprecated in /home/runner/work/commonsbooking/commonsbooking/tests/php/Repository/TimeframeTest.php on line 485
PHP Deprecated: Creation of dynamic property CommonsBooking\Tests\Repository\TimeframeTest::$otherItemId is deprecated in /home/runner/work/commonsbooking/commonsbooking/tests/php/Repository/TimeframeTest.php on line 41
PHP Deprecated: Creation of dynamic property CommonsBooking\Tests\Repository\TimeframeTest::$otherLocationId is deprecated in /home/runner/work/commonsbooking/commonsbooking/tests/php/Repository/TimeframeTest.php on line 42
PHP Deprecated: Creation of dynamic property CommonsBooking\Tests\Repository\TimeframeTest::$otherTimeframeId is deprecated in /home/runner/work/commonsbooking/commonsbooking/tests/php/Repository/TimeframeTest.php on line 43
PHP Deprecated: Creation of dynamic property CommonsBooking\Tests\Service\BookingRuleAppliedTest::$alwaysallow is deprecated in /home/runner/work/commonsbooking/commonsbooking/tests/php/Service/BookingRuleAppliedTest.php on line 161
PHP Deprecated: Creation of dynamic property CommonsBooking\Tests\Service\BookingRuleAppliedTest::$alwaysdeny is deprecated in /home/runner/work/commonsbooking/commonsbooking/tests/php/Service/BookingRuleAppliedTest.php on line 170

…ally.

From PHP 8.2 it is deprecated to dynamically declare properties for objects, so declare them in class definition.
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.79%. Comparing base (076ae51) to head (0118a77).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1607   +/-   ##
=========================================
  Coverage     49.79%   49.79%           
  Complexity     2682     2682           
=========================================
  Files            97       97           
  Lines         10712    10712           
=========================================
  Hits           5334     5334           
  Misses         5378     5378           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hansmorb hansmorb added php Pull requests that update Php code dx Developer Experience (technical) labels Jul 2, 2024
@hansmorb hansmorb merged commit dc1514d into wielebenwir:master Jul 2, 2024
14 checks passed
@hansmorb hansmorb added this to the 2.10 milestone Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dx Developer Experience (technical) php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants