Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Codeception Psalm Module Laravel Package

weirdan/codeception-psalm-module

Codeception module that integrates Psalm static analysis into your test workflow. Run Psalm checks as part of Codeception suites to catch type issues and improve PHP code quality during CI and local testing.

View on GitHub
Deep Wiki
Context7
0.14.0

What's Changed

New Contributors

Full Changelog: https://github.com/psalm/codeception-psalm-module/compare/0.13.1...0.14.0

0.13.1

Fixed

  • Use preamble in addition to actual code when generating the file name (#31).
0.13.0

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 for I have the following code step is now generated from the hash of the file content.
0.12.0

Now you can use regular expressions to match the issue type (see #28)

0.11.0

This release extends the supported version range to PHP 8.

0.10.0

This release extends the supported version range to Psalm 4.x

0.9.1

Fixed

  • (#23) Fixed crash when unknown package was used in I have .. package satisfying ..
0.9.0

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)
0.8.0

This release adds two new steps definitions, [@Given](https://github.com/Given) I have Psalm with taint analysis and [@When](https://github.com/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

  • (#16) Run Psalm with taint analysis (thanks @muglug)
0.7.4

Fixed

  • The module was failing to properly suppress Psalm's progress output when running with composer/semver:2+ and vimeo/psalm:dev-master
0.7.3

This release allows composer/semver 2.0 and 3.0 (the latter is a requirement for composer/composer 2.0).

0.7.2

Fixed

  • (#12) Reset preamble between tests. Previously, if one feature had a preamble, but the one after that had not, the preamble from the first feature would be carrier over to the next one. (thanks @mr-feek)
0.7.1

Features

  • (#11) Errors are now parsed on demand. This allows to test for Psalm (internal) failures, but otherwise should not cause any user-visible changes (thanks @mr-feek).
0.7.0

Now you can make assertions on Psalm's exit code (#10, #9, thanks to @mr-feek):

When I run Psalm
Then I see exit code 255
0.6.0

Now you can use regular expressions to match the issue message (see #8)

0.5.0

Previously, Psalm crashes were ignored and the run was considered successful even when Psalm crashed. This release changes it, so that if Psalm crashes you would see your test failing.

0.4.0

Now you can compose SUT projects of multiple files.

  • Use I have the following code in "filename.php" to create a file
  • Use I run Psalm on "filename.php" to run Psalm on a single file
  • Use I have the following classmap together with a table of class -> file mappings

If you use custom psalm config (I have the following config) you would need to add %s placeholder for autoloader attribute:

    Given I have the following config
      """
      <?xml version="1.0"?>
      <psalm totallyTyped="true" %s>
        <projectFiles>
          <directory name="."/>
        </projectFiles>
        <issueHandlers>
          <InvalidScalarArgument errorLevel="suppress"/>
        </issueHandlers>
      </psalm>
      """

The module will use it to add autoloader="autoload.php" when necessary.

0.3.0

BC Breaks

Minimum requirements were raised (#4, #5, thanks @Lctrs):

  • PHP 7.1+
  • Codeception 4+
  • Psalm 3.7+
0.2.2
  • Disable progress when running Psalm in Codeception environment
  • Allow Psalm 3.3+
  • Allow Codeception 3.0+
  • Don't force installation of muglug/package-versions-56 when ocramius/package-version is available
0.2.1
0.2.0
0.1.0

Fixed

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport