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

Fix error issues reported by phpStan level2 tool #1875

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

thanhnd0905
Copy link
Contributor

@thanhnd0905 thanhnd0905 commented Dec 12, 2023

Description

Fixes: https://app.asana.com/0/1204419514580775/1206148918307666

There are 1598 errors when upgrade phpStan level to 2
See here: https://gist.github.com/thanhnd0905/d1dc17e8fe10d8a56e7456444b6f1943

Below are the commits for fixing all errors for each folder:
Fix error issues reported by PhpSta level2 tool in API folder
Fix error issues reported by PhpSta level2 tool in Block folder
Fix error issues reported by PhpSta level2 tool in Controller folder
Fix error issues reported by PhpSta level2 tool in Observer folder
Fix error issues reported by PhpSta level2 tool in Helper folder
Fix error issues reported by PhpSta level2 tool in Model folder
Fix error issues reported by PhpSta level2 tool in Plugin folder
Fix error issues reported by PhpSta level2 tool in ThirdPartyModules folder

#changelog Fix error issues reported by PhpSta level2 tool in API folder

Type of change

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please validate that you have tested your change in at least one of the following areas:

  • Successfully tested locally (or docker image)
  • Successfully tested on a staging or sandbox server
  • Successfully tested on a merchant's staging server

For PR Reviewer

  • Reviewed unit tests to make sure we are using real components rather than mocks as much as possible?
  • For any major change (observer, new Bolt feature, core Magento interaction) we must add a feature switch, did you verify this?

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • New and existing unit tests pass locally with my changes.
  • I have created or modified unit tests to sufficiently cover my changes.
  • I have added my ticket link and provided a changelog message.

Copy link

peril-bolt bot commented Dec 12, 2023

Warnings
⚠️ Plugin directory has been modified - please take extra care reviewing overwritten core M2 classes.
⚠️ Helper/Config.php has been changed - please make sure you have updated getAllConfigSettings.

Generated by 🚫 dangerJS

@johnmccombs1 johnmccombs1 force-pushed the refactor_code_for_phpStan_level2 branch from a37a068 to 36b92af Compare December 12, 2023 18:25
@thanhnd0905 thanhnd0905 changed the title Fix error issues reported by PhpSta level2 tool in API folder Fix error issues reported by PhpSta level2 tool Dec 12, 2023
@johnmccombs1 johnmccombs1 force-pushed the refactor_code_for_phpStan_level2 branch 24 times, most recently from 0fc839c to 79fff75 Compare December 15, 2023 23:17
@johnmccombs1 johnmccombs1 force-pushed the refactor_code_for_phpStan_level2 branch 3 times, most recently from 9637195 to 68e9af2 Compare December 21, 2023 18:48
@johnmccombs1 johnmccombs1 force-pushed the refactor_code_for_phpStan_level2 branch 14 times, most recently from 80a1244 to 2a0b69c Compare December 28, 2023 15:13
@thanhnd0905 thanhnd0905 marked this pull request as ready for review December 28, 2023 18:28
@thanhnd0905 thanhnd0905 requested a review from a team as a code owner December 28, 2023 18:28
@thanhnd0905 thanhnd0905 changed the title Fix error issues reported by PhpSta level2 tool Fix error issues reported by phpStan level2 tool Dec 28, 2023
@johnmccombs1 johnmccombs1 force-pushed the refactor_code_for_phpStan_level2 branch from 179988e to f539841 Compare January 23, 2024 22:13
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.

2 participants