Skip to content

Drop PHP 8.1, and require a Psalm 7 release that doesn't suggest purity annotations by default - #167

Merged
danog merged 1 commit into
psalm:2.xfrom
danog:drop-php-8.1
Nov 18, 2026
Merged

danog merged 1 commit into
psalm:2.xfrom
danog:drop-php-8.1

Conversation

@danog

@danog danog commented Nov 18, 2026

Copy link
Copy Markdown
Member

The taint test's ORM query helper carried an @psalm-suppress InvalidReturnType, only because on PHP 8.1 (Psalm 7.0.0-rc18 at most) and with the lowest dependencies (rc3) Psalm asks for it to be marked pure.

Before

/**
 * @psalm-suppress InvalidReturnType
 * @return \Doctrine\ORM\Query
 * @psalm-capabilities read-props
 */
function query() {}

After

function query(): \Doctrine\ORM\Query {
  throw new \RuntimeException();
}

PHP 8.1 is dropped, and vimeo/psalm starts at 7.0.0-rc28, which made purity suggestions opt-in: the lowest dependencies now install Psalm 7.0.0.

…ty annotations by default

On PHP 8.1 Composer can only install Psalm 7.0.0-rc18 and older, which ask the
test's helpers to be marked pure; the lowest dependencies installed rc3. The
ORM query helper of the taint test goes back to a plain function.
@danog
danog merged commit 875a2d5 into psalm:2.x Nov 18, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant