Skip to content

[4.x] Prefer stable dependencies and analyse with PHPStan for PHP 8.3 - #74

Open
Hackwar wants to merge 1 commit into
joomla-framework:4.x-devfrom
Hackwar:4.x-phpstan-php83-prefer-stable
Open

Hackwar wants to merge 1 commit into
joomla-framework:4.x-devfrom
Hackwar:4.x-phpstan-php83-prefer-stable

Conversation

@Hackwar

@Hackwar Hackwar commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

  • composer.json sets "minimum-stability": "dev" without "prefer-stable": true, so Composer resolves dependencies to development branches even where releases exist. A composer update --dry-run on 4.x-dev locks symfony/polyfill-mbstring to 1.x-dev and phpunit/phpunit to 12.5.x-dev. With prefer-stable they resolve to v1.43.3 and 12.5.43, so the tests run against released versions.
  • phpstan.neon sets phpVersion: 80100, but the package requires PHP ^8.3.0. It is now 80300.

Testing Instructions

Run composer update --dry-run with and without the change and compare the locked versions. php vendor/bin/phpstan analyse reports no errors locally, vendor/bin/phpunit passes, and phpcs is clean.

The PHPStan job in CI fails on 4.x-dev too (Function mb_trim not found and so on, for the PHP 8.4 functions that symfony/polyfill-mbstring provides), and this PR does not change that. #66 fixes it by adding the polyfill to scanDirectories.

Documentation Changes Required

None

Related to #66. Both change phpstan.neon on lines that are close together but do not overlap, so they should merge cleanly in either order.

🤖 Generated with Claude Code

With minimum-stability dev and no prefer-stable, Composer resolves
dependencies such as symfony/polyfill-mbstring and phpunit/phpunit to
development branches, so the tests do not run against released
versions. phpstan.neon still targets PHP 8.1 although the package
requires PHP 8.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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