Skip to content

chore(deps): update composer and npm dependencies within constraints#282

Merged
CybotTM merged 6 commits into
mainfrom
chore/upgrade-deps-2026-05
May 6, 2026
Merged

chore(deps): update composer and npm dependencies within constraints#282
CybotTM merged 6 commits into
mainfrom
chore/upgrade-deps-2026-05

Conversation

@CybotTM
Copy link
Copy Markdown
Member

@CybotTM CybotTM commented May 6, 2026

Summary

  • Composer (89 packages): Symfony 8.0.x → 8.0.8/9, doctrine/orm 3.6.1 → 3.6.3, doctrine/persistence 4.1.1 → 4.2.0, phpunit 12.5.10 → 12.5.24, phpstan 2.1.37 → 2.1.54, sentry/sentry-symfony 5.8.3 → 5.10.0, laminas-ldap 2.19 → 2.20, twig 3.23 → 3.24, plus rector, php-cs-fixer, captainhook, paratest, and the rest of the Symfony/PHPStan ecosystem.
  • NPM (252 changed, 83 added, 32 removed): webpack 5.98 → 5.106, sass/sass-embedded 1.90 → 1.99, sass-loader 16.0.5 → 16.0.7, core-js 3.41 → 3.49, @babel/core 7.26.10 → 7.29.0, plus transitive updates.
  • No composer.json / package.json constraint changes — this is a pure lock-file refresh.

Out of scope (follow-up PRs)

  • Major bumps requiring constraint changes: phpunit/phpunit 12 → 13, @symfony/webpack-encore 5 → 6, webpack-cli 5 → 7.
  • PHPStan baseline cleanup (37 errors pre-existing on main).

Test plan

  • make test — 1923 tests, 5676 assertions pass (LDAP integration tests need ldap-dev container running)
  • make npm-build — webpack production build OK, 2106 files emitted
  • phpstan analyze — 37 errors, identical to main (no new regressions)
  • php-cs-fixer fix --dry-run — clean
  • CI green

Copilot AI review requested due to automatic review settings May 6, 2026 10:29
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

@gemini-code-assist
Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

Bumps all in-range Composer and NPM packages to their latest versions
without changing manifest constraints. Major version bumps (phpunit 13,
webpack-encore 6, webpack-cli 7) are deferred to a follow-up PR.

Composer (89 packages): symfony 8.0.x → 8.0.8/9, doctrine/orm 3.6.1 →
3.6.3, doctrine/persistence 4.1.1 → 4.2.0, phpunit 12.5.10 → 12.5.24,
phpstan 2.1.37 → 2.1.54, sentry/sentry-symfony 5.8.3 → 5.10.0,
laminas-ldap 2.19 → 2.20, twig 3.23 → 3.24, plus rector, php-cs-fixer,
captainhook, paratest, and assorted Symfony/PHPStan ecosystem updates.

NPM (252 changed, 83 added, 32 removed): webpack 5.98 → 5.106,
sass/sass-embedded 1.90 → 1.99, sass-loader 16.0.5 → 16.0.7, core-js
3.41 → 3.49, @babel/core 7.26.10 → 7.29.0, plus transitive updates.

Verified: 1923 PHPUnit tests pass, webpack production build OK, PHPStan
unchanged (37 baseline errors), php-cs-fixer clean.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
@CybotTM CybotTM force-pushed the chore/upgrade-deps-2026-05 branch from 639d84c to d0878b8 Compare May 6, 2026 10:29
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.49%. Comparing base (66c8c4e) to head (8a7be80).

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #282   +/-   ##
=========================================
  Coverage     81.49%   81.49%           
  Complexity     2579     2579           
=========================================
  Files           172      172           
  Lines          7107     7107           
=========================================
  Hits           5792     5792           
  Misses         1315     1315           
Flag Coverage Δ
integration 47.47% <33.33%> (ø)
unit 50.56% <66.66%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

CybotTM added 5 commits May 6, 2026 12:39
The dependency upgrade in the previous commit shifted two CI invariants
that need follow-up changes here:

1. phpstan-baseline: phpstan-phpunit 2.0.16 stopped reporting "Dynamic
   call to static method PHPUnit\Framework\Assert::*" against test
   classes, so 28 baseline entries became unmatched and broke CI under
   reportUnmatchedIgnoredErrors. Regenerated baseline removes those
   obsolete entries; net ~17 fewer error suppressions. New strict-rule
   findings (~9) introduced by upgraded phpstan packages are baselined
   to be addressed in a follow-up PR.

2. E2E Playwright: lockfile bumped @playwright/test 1.58 → 1.59, but
   the prebuilt ghcr.io/netresearch/timetracker:e2e image still has
   chromium baked in for 1.58. Added a step to run `npx playwright
   install chromium --with-deps` after npm install so the browser
   binary always matches the locked playwright version, regardless of
   when the e2e image was last published.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
Previous attempt installed browsers via `docker compose run --rm` which
creates a throwaway container — the download landed in the container's
overlay and was discarded before tests ran in their own fresh container.

Move the install into the test step so it runs in the same `--rm`
container as the playwright test invocation.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
phpat 0.12.4 deprecated canOnlyDependOn() and shouldNotDependOn() in
favour of split builders ->canOnly()->dependOn() and
->shouldNot()->dependOn(). These calls flag as method.deprecated under
the bundled phpstan-deprecation-rules and break the architecture lint
job after the upgrade.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
Rector 2.4.2 (up from 2.3.4) detects new opportunities:

* RemoveUselessVarTagRector — drops 4 redundant /** @var mixed */ and
  one /** @var QueryBuilder */ annotation now that PHPStan can infer
  these types directly.
* RecastingRemovalRector — removes a redundant cast in
  GroupByWorktimeAction.
* ThrowWithPreviousExceptionRector — wires the caught LDAP/Throwable
  through to CustomUserMessageAuthenticationException so the previous
  exception is preserved in the chain. Rector emits a 3-arg form
  (string, code, previous) by default; the actual constructor signature
  is (string, array \$messageData, int, ?Throwable), so we explicitly
  pass [] for messageData to keep argument positions correct (without
  this both LdapAuthenticatorTest::testAuthenticateHandles* tests fail
  with TypeError).

Also drops an unused `use Doctrine\ORM\QueryBuilder;` import that
becomes dead after the @var removal in ContractRepository.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
RecastingRemovalRector dropped a redundant (string) cast in
GroupByWorktimeAction in the previous commit, so the matching
"Casting to string something that's already string" baseline entry
becomes unmatched and breaks CI under reportUnmatchedIgnoredErrors.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 6, 2026

@CybotTM CybotTM merged commit 0d4c52f into main May 6, 2026
24 checks passed
@CybotTM CybotTM deleted the chore/upgrade-deps-2026-05 branch May 6, 2026 12:06
@CybotTM CybotTM mentioned this pull request May 6, 2026
4 tasks
CybotTM added a commit that referenced this pull request May 8, 2026
## Summary

- Bumps `phpunit/phpunit` from `^12.3` to `^13.0` (resolves to 13.1.8)
- Bumps `brianium/paratest` from `^7.11` to `^7.22` (paratest 7.21+
requires phpunit ^13)
- `phpstan/phpstan-phpunit` stays at 2.0.16 (no upper bound on phpunit;
already supports 13)
- `phpunit/php-code-coverage` 12 -> 14 (transitive)
- Updates the phpunit XML schema reference to 13.1 in `phpunit.xml.dist`
and the three configs under `config/testing/`
- Bumps the symfony phpunit-bridge `SYMFONY_PHPUNIT_VERSION` env var
from `12.3` to `13.1` everywhere it is set
- Regenerates `phpstan-baseline.neon` to absorb new errors from the
upgraded `phpstan-phpunit` extension
- `config/reference.php` is regenerated by symfony framework-bundle's
post-install hook (triggered by the dependency tree update)

## Breaking changes addressed

The PHPUnit 13 changelog removals were checked against the codebase;
none of the removed APIs are used:

- `Assert::isType()` - not used
- `assertContainsOnly()` / `assertNotContainsOnly()` - not used
(`assertContainsOnlyInstancesOf()`, which we do use, is unaffected)
- `containsOnly()` - not used
- `#[RunClassInSeparateProcess]` attribute - not used
- `any()` matcher (hard-deprecated) - not used
- Drop of PHP 8.3 support - not relevant (project requires PHP 8.5)

So no production or test code changes were required to keep the suite
green.

## phpstan baseline regeneration

`phpstan/phpstan-phpunit` reflects PHPUnit 13's stricter return types:
`MockBuilder::method()->with(...)` without an explicit `expects(...)`
now returns `InvocationStubber`, which has no `with()` method. This
raises 121 new `method.notFound` and 121 new `method.nonObject` errors
across the test suite.

The underlying runtime deprecation is "Using `with*()` without
`expects()` is deprecated and will no longer be possible in PHPUnit 14"
(introduced in PHPUnit 12.5.11). Migrating those 121 call sites to the
`expects()`-based mock setup API is intentionally scoped out of this
dependency bump - it's a substantial test refactor that should land as
its own PR before the PHPUnit 14 upgrade. The baseline regeneration is
consistent with the regeneration that landed in #282.

## Test plan

- [x] `make test` passes locally with phpunit 13.1.8 (1923 tests, 5676
assertions, 0 errors, 0 failures; LDAP integration tests required the
`ldap-dev` container to be reachable on the compose network)
- [x] `docker compose run --rm app-dev php -d memory_limit=1G
bin/phpstan analyze --no-progress` reports `[OK] No errors`
- [x] `composer update --ignore-platform-req=php phpunit/phpunit
phpstan/phpstan-phpunit brianium/paratest symfony/phpunit-bridge
--with-all-dependencies` completes cleanly inside the dev container
- [ ] CI green (test-unit, test-integration, e2e, codeql, scorecard)

## Follow-ups (not in this PR)

- Migrate the 143 tests that use `with*()` without `expects()` to the
new mock builder API before bumping to PHPUnit 14
- 6 PHP 8.5 deprecations in `src/Service/ExportService.php` (null array
offsets) and `src/Service/Util/TimeCalculationService.php` (implicit
float-to-int) surfaced by `--display-deprecations`; not new in this
upgrade
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.

2 participants