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

Setup Psalm error level to 1 #505

Merged
merged 14 commits into from
Dec 4, 2023
Merged

Setup Psalm error level to 1 #505

merged 14 commits into from
Dec 4, 2023

Conversation

s1lver
Copy link
Member

@s1lver s1lver commented Nov 24, 2023

Q A
Is bugfix?
New feature?
Breaks BC? ✔️
Fixed issues

@s1lver s1lver added the type:enhancement Enhancement label Nov 24, 2023
@s1lver s1lver added this to the 3.0.0 milestone Nov 24, 2023
Copy link

what-the-diff bot commented Nov 24, 2023

PR Summary

  • Updated Error Detection Settings in Code Analysis
    Modified the psalm.xml file for intensifying levels of error detection in the static code analysis and enabling the unused code detection. Additionally, updated the list of ignored files for the analysis scope.

  • Refined Object Annotations
    Refined the @var annotations for the sender property in JobEvent.php file and other properties in various files, essentially making the object definitions more precise.

  • Enhanced Log Message Generation Process
    Made changes to LogBehavior.php file to update the logger messages based on worker's PID.

  • Suppressed Less Critical Psalm Warnings
    Added @psalm-suppress annotations in several files like Action.php, Queue.php, Behavior.php etc. to ignore some non-critical warnings generated by Psalm, a static analysis tool.

  • Added Type Hints For Improved Code Clarity and Robustness
    Modified function signatures in Command.php file and others by adding type hints, improving both code readability and reliability.

  • Improved Type and Value Consistency
    Changed property names, added type hints, and conducted type casting in areas throughout the codebase to ensure consistency in code and values.

  • Swapped PHP Serialization with Laravel's SerializableClosure
    In Job.php, switched from native PHP serialization to Laravel's SerializableClosure for handling closures, enhancing compatibility and code efficiency.

  • Improved Code Analysis Annotating
    Major part of the change involved adding or modifying @var annotations across many files like Queue.php, src/drivers/file/Queue.php, src/drivers/redis/InfoAction.php, etc to improve the benefits of static code analysis.

  • Added new method and file to enhance functionality
    In src/drivers/file/Queue.php file, added new remove() method. Additionally, new file src/drivers/sqs/Payload.php has been added.

  • Introduced Changes to Enable Usage of New Payload Class
    In the src/drivers/sqs/Queue.php file, modified method signatures for using the new Payload class instead of array structures for certain operations.

  • Updated Comment and Return Type Annotations
    Updated property, comment and return type annotations in multiple files across the codebase to enable clearer understanding and direction for developers.

Copy link

codecov bot commented Nov 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (3.0@f915784). Click here to learn what that means.

Additional details and impacted files
@@          Coverage Diff           @@
##             3.0     #505   +/-   ##
======================================
  Coverage       ?   32.18%           
  Complexity     ?      458           
======================================
  Files          ?       40           
  Lines          ?     1482           
  Branches       ?        0           
======================================
  Hits           ?      477           
  Misses         ?     1005           
  Partials       ?        0           

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

src/LogBehavior.php Outdated Show resolved Hide resolved
@s1lver s1lver requested a review from rob006 November 29, 2023 17:43
@samdark samdark merged commit 032da07 into 3.0 Dec 4, 2023
6 checks passed
@samdark samdark deleted the psalm_level_1 branch December 4, 2023 14:42
@samdark
Copy link
Member

samdark commented Dec 4, 2023

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants