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

Closes #7136: Discourage use of update_option() #7139

Merged
merged 5 commits into from
Nov 28, 2024

Conversation

Miraeld
Copy link
Contributor

@Miraeld Miraeld commented Nov 25, 2024

Description

Fixes #7136
Doesn't impact the user

Type of change

Detailed scenario

N/a

Technical description

Documentation

This pull request includes a new Custom Rule for PHPStan to discourage the use of the update_option() function in favour of using the Option object. The changes add new baseline entries to flag occurrences of update_option() across various files in the codebase.

New dependencies

N/a

Risks

N/a

Mandatory Checklist

Code validation

  • I validated all the Acceptance Criteria. If possible, provide screenshots or videos.
  • I triggered all changed lines of code at least once without new errors/warnings/notices.
  • I implemented built-in tests to cover the new/changed code.

Code style

  • I wrote a self-explanatory code about what it does.
  • I protected entry points against unexpected inputs.
  • I did not introduce unnecessary complexity.
  • Output messages (errors, notices, logs) are explicit enough for users to understand the issue and are actionnable.

@Miraeld Miraeld added type: enhancement Improvements that slightly enhance existing functionality and are fast to implement noQA labels Nov 25, 2024
@Miraeld Miraeld self-assigned this Nov 25, 2024
@Miraeld Miraeld changed the title Enhancement/7136 discourage use of update option Closes #7136: Discourage use of update_option() Nov 25, 2024
Copy link

codacy-production bot commented Nov 25, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for a8a58761 (target: 50.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (a8a5876) Report Missing Report Missing Report Missing
Head commit (115ef58) 38228 16731 43.77%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#7139) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@Miraeld Miraeld requested a review from a team November 28, 2024 09:16
@Miraeld Miraeld force-pushed the enhancement/7136-discourage-use-of-update-option branch from c7446de to 86ab2b8 Compare November 28, 2024 09:22
@Miraeld Miraeld added this pull request to the merge queue Nov 28, 2024
Merged via the queue into develop with commit 7b308ee Nov 28, 2024
13 checks passed
@Miraeld Miraeld deleted the enhancement/7136-discourage-use-of-update-option branch November 28, 2024 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
noQA type: enhancement Improvements that slightly enhance existing functionality and are fast to implement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHPStan - Discourage the use of update_option
2 participants