Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: psalm/psalm-plugin-phpunit
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.19.3
Choose a base ref
...
head repository: psalm/psalm-plugin-phpunit
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.19.4
Choose a head ref
  • 18 commits
  • 21 files changed
  • 2 contributors

Commits on Mar 30, 2025

  1. Simplified version lookup

    By removing `composer/package-versions-deprecated`, and instead using `composer-runtime-api:^2`,
    we both get rid of a dependency, and obtain better type information from our lookup.
    
    This also coincidentally drops a bunch of inline `@psalm-suppress` statements.
    Ocramius committed Mar 30, 2025
    Configuration menu
    Copy the full SHA
    6f7201f View commit details
    Browse the repository at this point in the history
  2. Dropping stubs for expectException() and mock methods, and bumping …

    …PHPUnit version
    
    Since PHPUnit 8.0, `expectException()` has proper type annotations, and I even patched `createMock()` and similars
    so that proper generic types are inferred.
    
    These stubs are therefore no longer necessary.
    
    At this point, these classes are mostly "OK" in PHPUnit, starting ~8.5.1:
    
    * `PHPUnit\Framework\MockObject\Builder\InvocationMocker` (now declares missing types)
    * `PHPUnit\Framework\MockObject\MockObject` (still uses `@method` at class level, but that works)
    * `PHPUnit\Framework\MockObject\MockBuilder` (fully templated)
    * `PHPUnit\Framework\TestCase` (except for `prophesize()`, which was later removed)
    Ocramius committed Mar 30, 2025
    Configuration menu
    Copy the full SHA
    d749c4c View commit details
    Browse the repository at this point in the history
  3. Removed pre-PHPUnit 7.5 stubs

    Adding a conflict to PHPUnit earlier than 8.5.1, to make
    the phpunit version requirement more clear.
    
    Starting with PHPUnit 8.0, assertions have decent assertion metadata declarations
    on most methods.
    
    This also removes assertion tests, simplifying the test suite further.
    Ocramius committed Mar 30, 2025
    Configuration menu
    Copy the full SHA
    74192e9 View commit details
    Browse the repository at this point in the history
  4. Removing Prophecy stubs

    Starting from Prophecy 1.20.0, methods have proper generic types declared.
    
    Adding a conflict to prevent earlier prophecy versions from being co-installed.
    
    Refs:
    
    * phpspec/prophecy@e4d39b1
    * phpspec/prophecy@0bb033e
    * phpspec/prophecy@4506935
    Ocramius committed Mar 30, 2025
    Configuration menu
    Copy the full SHA
    216bc9f View commit details
    Browse the repository at this point in the history
  5. Removing Prophecy stubs

    Starting from `phpspec/prophecy-phpunit:2.3.0`, the out-of-the-box `ProphecyTrait` is well typed.
    
    Ref: phpspec/prophecy-phpunit@ba6dc1b
    Ocramius committed Mar 30, 2025
    Configuration menu
    Copy the full SHA
    74aa83f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    139d8f2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    03bb9ad View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    aac9717 View commit details
    Browse the repository at this point in the history
  9. Externalize installation of codeception/codeception and `weirdan/co…

    …deception-psalm-module`
    
    These packages are runtimes that invoke `psalm/plugin-phpunit` via `exec()`, without sharing codespace with
    it, and therefore are safe to externalize elsewhere.
    
    We can't afford keeping these dependencies co-located with the main `composer.json` / `composer.lock`, as
    they conflict with non-dev dependencies that we want to explicitly test against.
    Ocramius committed Mar 30, 2025
    Configuration menu
    Copy the full SHA
    409c587 View commit details
    Browse the repository at this point in the history
  10. Rewrote acceptance test suite to use behat/behat as a main runner

    While `psalm/codeception-psalm-module` is a good idea in theory,
    in practice, Gherkin scenario steps as a composer dependency are really (REALLY)
    hard to distribute and maintain together with a test suite.
    
    This move replaces the external dependency with a local one, with the
    test runner mostly staying out of the way, and test logic all implemented
    in the `Context` class we wrote ourselves.
    
    The main aim is to improve atomicity of changes on the test suite itself.
    
    Ref: psalm/codeception-psalm-module#54
    Ocramius committed Mar 30, 2025
    Configuration menu
    Copy the full SHA
    bd8ef97 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    2837a1c View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    edf4d32 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    a13bd53 View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2025

  1. Merge pull request #149 from Ocramius/feature/support-phpunit-attributes

    Implemented support for `#[Test]`, `#[DataProvider]`, `#[Before]` attributes, cleaned up old PHPUnit/Prophecy support
    danog authored Mar 31, 2025
    Configuration menu
    Copy the full SHA
    415fde7 View commit details
    Browse the repository at this point in the history
  2. Bump

    danog committed Mar 31, 2025
    Configuration menu
    Copy the full SHA
    529f041 View commit details
    Browse the repository at this point in the history
  3. Fixes

    danog committed Mar 31, 2025
    Configuration menu
    Copy the full SHA
    d4d893c View commit details
    Browse the repository at this point in the history
  4. Fixes

    danog committed Mar 31, 2025
    Configuration menu
    Copy the full SHA
    a28228f View commit details
    Browse the repository at this point in the history
  5. Fixes

    danog committed Mar 31, 2025
    Configuration menu
    Copy the full SHA
    7a4facc View commit details
    Browse the repository at this point in the history
Loading