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

Replace dynamic properties with declared (deprecation) #405

Merged
merged 7 commits into from
Dec 13, 2022

Conversation

yitznewton
Copy link
Contributor

  • Add PHP 8.2 to testing matrix

For #404

src/Jit/Parser.php Outdated Show resolved Hide resolved
@samsonasik
Copy link
Collaborator

Could you try fix the error on php 8.2 ?

@yitznewton
Copy link
Contributor Author

I've fixed some of the errors, but I don't understand why there's still a deprecation error around dynamic properties - those should be covered by the __get() and __set() methods which are part of the eval'ed classes. I tested a separate file with my own eval'ed classes and there was no error.

@codecov-commenter
Copy link

Codecov Report

Merging #405 (4526434) into dev (9edb4da) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              dev     #405   +/-   ##
=======================================
  Coverage   97.76%   97.76%           
=======================================
  Files          72       72           
  Lines        2638     2638           
=======================================
  Hits         2579     2579           
  Misses         59       59           
Flag Coverage Δ
tests 97.76% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Jit/Parser.php 96.51% <ø> (ø)
src/Suite.php 98.43% <ø> (ø)
src/Plugin/Double.php 96.58% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@samsonasik
Copy link
Collaborator

It seems you can use #[AllowDynamicProperties] for that:

#[AllowDynamicProperties]
class SomeClass {
}

for that.

@samsonasik
Copy link
Collaborator

So, the code dynamic generation should include #[AllowDynamicProperties] on it.

src/Plugin/Double.php Outdated Show resolved Hide resolved
@samsonasik
Copy link
Collaborator

The expectation output seems needs update based based on addition #[\AllowDynamicProperties] https://github.com/cppgh/kahlan/actions/runs/3677927095/jobs/6220536873#step:6:67

Copy link
Collaborator

@samsonasik samsonasik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@samsonasik
Copy link
Collaborator

The deprecattion notice may need update but I guess that can be next iteration :)

https://github.com/kahlan/kahlan/actions/runs/3678754621/jobs/6228226258#step:6:60

Coverage Summary
----------------
PHP Deprecated:  Function utf8_decode() is deprecated in /home/runner/work/kahlan/kahlan/src/Reporter/Coverage.php on line 243
                                             Lines              %
PHP Deprecated:  Function utf8_decode() is deprecated in /home/runner/work/kahlan/kahlan/src/Reporter/Coverage.php on line 243

@samsonasik
Copy link
Collaborator

samsonasik commented Dec 13, 2022

Thank you @yitznewton , you can use "kahlan/kahlan": "dev-dev" for now while wait for next release.

@samsonasik
Copy link
Collaborator

I released kahlan 5.2.2 for it https://github.com/kahlan/kahlan/releases/tag/5.2.2 ;)

@yitznewton yitznewton deleted the dev branch December 13, 2022 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants