Releases: psalm/codeception-psalm-module
Releases · psalm/codeception-psalm-module
Psalm 5 / Codeception 5 compatibility
What's Changed
- Temporarily blacklist polyfill that breaks tests by @weirdan in #32
- Fixed test to account for Psalm changes by @weirdan in #33
- Drop blacklists as they don't seem to be useful anymore by @weirdan in #34
- Fixed issues Psalm reported by @weirdan in #35
- Suppressed InternalMethod issues by @weirdan in #36
- Fixed taint test by @weirdan in #37
- Feature: Introduce initial support for codeception v5 by @boesing in #41
- Fix test expectations to account for changed error messages by @weirdan in #44
- Update vimeo/psalm requirement from ^4.17.0 || dev-master to ^4.17.0 || dev-master || ^5.0.0 || dev-master by @dependabot in #43
- Update codeception/module-cli requirement from ^1.0.0 to ^1.0.0 || ^2.0.0 by @dependabot in #42
New Contributors
Full Changelog: 0.13.1...0.14.0
Use preamble + code when generating the filename
Fixed
- Use preamble in addition to actual code when generating the file name (#31).
Remove support for 'default_file' config value
BC Breaks
default_file
config value was removed and is no longer honored (#30). To allow safe usage of Psalm cache the file name could no longer be kept fixed. Instead, the file forI have the following code
step is now generated from the hash of the file content.
Support regexp matching for issue types
Now you can use regular expressions to match the issue type (see #28)
Allow PHP 8
This release extends the supported version range to PHP 8.
Allow Psalm v4
This release extends the supported version range to Psalm 4.x
Fix crash when unknown package was used in `I have .. package satisfying ..`
Fixed
- (#23) Fixed crash when unknown package was used in
I have .. package satisfying ..
Allow checking versions constraints for arbitrary packages
This realease adds a new step that allows you to conditionally run tests, depending on whether a package satisfies particular version constraints. Constraint syntax is the same as those used by Composer:
Scenario: Running when dependency is satisfied
Given I have the "codeception/module-cli" package satisfying the "*"
And I have the following code
"""
atan("zz");
"""
When I run Psalm
Then I see these errors
| Type | Message |
| InvalidScalarArgument | /./ |
And I see no other errors
You can also check for the version of the module itself:
Scenario: Running when dependency is satisfied
Given I have the "weirdan/codeception-psalm-module" package satisfying the "^0.5 || ^0.6"
And I have the following code
"""
atan("zz");
"""
When I run Psalm
Then I see these errors
| Type | Message |
| InvalidScalarArgument | /./ |
And I see no other errors
Features
- (#20) Added
Given I have the :packageName package satisfying the :versionConstraints
(thanks @adrienlucas) - (#20) Allow querying installed packages from Composer 2+ (thanks @adrienlucas)
Add taint analysis
This release adds two new steps definitions, @Given I have Psalm with taint analysis
and @When I run Psalm with taint analysis
, which allow you to use taint analysis:
Scenario: Running with taint analysis
Given I have Psalm with taint analysis
And I have the following code
"""
<?php echo $_GET['param'];
"""
When I run Psalm with taint analysis
Then I see these errors
| Type | Message |
| TaintedInput | /./ |
And I see no other errors
Features
Fix issues caused by composer/semver's BC break
Fixed
- The module was failing to properly suppress Psalm's progress output when running with
composer/semver:2+
andvimeo/psalm:dev-master