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

phpstan: fixed "Access to an undefined property" #2554

Merged
merged 6 commits into from
Sep 12, 2022
Merged

phpstan: fixed "Access to an undefined property" #2554

merged 6 commits into from
Sep 12, 2022

Conversation

sreichel
Copy link
Contributor

@sreichel sreichel commented Sep 5, 2022

Description (*)

Set undefined properties. I hope its correct to make "new" properties public.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)
  • Add yourself to contributors list

@github-actions github-actions bot added Component: Adminhtml Relates to Mage_Adminhtml Component: Catalog Relates to Mage_Catalog Component: Eav Relates to Mage_Eav Component: Paygate Relates to Mage_Paygate Component: PayPal Relates to Mage_Paypal Component: Sales Relates to Mage_Sales Component: Shipping Relates to Mage_Shipping environment phpstan labels Sep 5, 2022
@fballiano
Copy link
Contributor

why not protected?

@elidrissidev
Copy link
Member

They should probably be protected by default unless there is a usage outside the class.

@sreichel
Copy link
Contributor Author

sreichel commented Sep 6, 2022

They should probably be protected by default unless there is a usage outside the class.

Yes, BUT ... they were public all the time and someone could have used them outside the class.

I can change it, because they should have not been used outside. Let me know.

@fballiano
Copy link
Contributor

right, but php 8.2 deprecates public properties so...
https://php.watch/versions/8.2/dynamic-properties-deprecated
what's the right choice here?

@sreichel
Copy link
Contributor Author

sreichel commented Sep 6, 2022

Public is still okay, but not dynamically set.

@fballiano fballiano merged commit d033c75 into OpenMage:1.9.4.x Sep 12, 2022
@github-actions
Copy link
Contributor

Unit Test Results

1 files  ±0  1 suites  ±0   0s ⏱️ ±0s
0 tests ±0  0 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
7 runs  ±0  5 ✔️ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit d033c75. ± Comparison against base commit a24224d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Adminhtml Relates to Mage_Adminhtml Component: Catalog Relates to Mage_Catalog Component: Eav Relates to Mage_Eav Component: Paygate Relates to Mage_Paygate Component: PayPal Relates to Mage_Paypal Component: Sales Relates to Mage_Sales Component: Shipping Relates to Mage_Shipping environment phpstan
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants