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

Add psalm integration #26

Merged

Conversation

weierophinney
Copy link
Member

  • Creates a psalm.xml.dist for the package.
  • Adds a static-analysis script to composer.json.
  • Updates Travis configuration:
    • Install vimeo/psalm and psalm/phpunit-plugin when installing test deps.
    • Run static-analysis script when TEST_COVERAGE env is present.
  • Fixes all errors flagged by psalm.
    • Extracts anonymous class to a test asset, and uses proper type hinting against it in test cases.

Fixes #19

- Creates a psalm.xml.dist for the package.
- Adds a `static-analysis` script to `composer.json`.
- Updates Travis configuration:
  - Install `vimeo/psalm` and `psalm/phpunit-plugin` when installing test deps.
  - Run static-analysis script when TEST_COVERAGE env is present.
- Fixes all errors flagged by psalm.
  - Extracts anonymous class to a test asset, and uses proper type hinting against it in test cases.

Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
@codecov
Copy link

codecov bot commented Nov 2, 2020

Codecov Report

Merging #26 into 2.1.x will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##              2.1.x      #26      +/-   ##
============================================
- Coverage     92.39%   92.37%   -0.03%     
  Complexity      100      100              
============================================
  Files             5        5              
  Lines           342      341       -1     
============================================
- Hits            316      315       -1     
  Misses           26       26              
Flag Coverage Δ Complexity Δ
composer1 53.07% <70.00%> (+0.44%) 100.00 <5.00> (ø)
composer2 69.20% <60.00%> (-0.10%) 100.00 <5.00> (ø)

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

Impacted Files Coverage Δ Complexity Δ
src/DependencyRewriterPluginDelegator.php 52.63% <ø> (ø) 14.00 <0.00> (ø)
src/Replacements.php 97.36% <ø> (ø) 20.00 <0.00> (ø)
src/AbstractDependencyRewriter.php 91.83% <100.00%> (+0.17%) 14.00 <1.00> (+1.00)
src/DependencyRewriterV1.php 100.00% <100.00%> (ø) 18.00 <3.00> (ø)
src/DependencyRewriterV2.php 97.81% <100.00%> (-0.04%) 34.00 <1.00> (-1.00)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 42ca6cd...09745d7. Read the comment docs.

Prevents conflicts with composer/semver

Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
@weierophinney weierophinney added this to To do in Psalm via automation Nov 2, 2020
@weierophinney weierophinney moved this from To do to In progress in Psalm Nov 2, 2020
@weierophinney weierophinney added this to the 2.1.0 milestone Nov 2, 2020
@weierophinney weierophinney merged commit 09745d7 into laminas:2.1.x Nov 2, 2020
Psalm automation moved this from In progress to Done Nov 2, 2020
@weierophinney weierophinney deleted the feature/psalm-integration branch November 2, 2020 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Psalm
  
Done
Development

Successfully merging this pull request may close these issues.

Psalm integration
1 participant