Skip to content

Add Dependabot configuration and stop committing composer.lock - #42

Merged
stixx merged 4 commits into
mainfrom
chore/dependabot
Aug 30, 2026
Merged

Add Dependabot configuration and stop committing composer.lock#42
stixx merged 4 commits into
mainfrom
chore/dependabot

Conversation

@stixx

@stixx stixx commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Enables Dependabot on the repository and removes the committed composer.lock.

Dependabot

Alerts and security updates were both off — not just the auto-PRs, the alerting itself. Both are now enabled in the repository settings; this adds the config for everything else.

github-actions, weekly. The workflow pins actions to floating major tags (actions/checkout@v5, shivammathur/setup-php@v2, actions/cache@v4). A moved tag executes new code in CI with repository credentials. Updates are grouped into one PR.

composer, security only. open-pull-requests-limit: 0 disables version updates; security updates are governed by the repository setting and still apply.

Remove composer.lock

Libraries don't commit a lock file — Composer ignores a dependency's lock, so it never reached a consumer. Nelmio, maker-bundle, DoctrineBundle and api-platform/core all omit it.

It also did almost nothing here. The test matrix runs composer update per Symfony version and never read it; it pinned only the Lint job's static-analysis tools. Meanwhile it held vulnerable transitive Symfony versions, which is the whole of the 8 advisories currently shown on the default branch — all transitive under framework-bundle, none a direct require, so consumers were never affected. Removing the file clears them; #37#41 become obsolete.

Lint now runs composer update. The cache key already hashes composer.json.

JsonSerializedResponder::supports()

Unpinning the tools moved Lint from PHPStan 2.1.33 to 2.2.10, which flags:

return is_object($result)
    || is_array($result)
    || $result instanceof Traversable;   // unreachable

Traversable is an interface, so every implementation is an object and the first branch already returned true. Removed, with its import. Behaviour is unchanged — the existing 'Traversable' case in supportsProvider passes an ArrayIterator and still expects true.

Verification

A clean clone without the lock reports No security vulnerability advisories found, resolves the five previously-flagged packages to v8.1.5, and passes 224 tests. All six CI checks green.

Trade-off

A phpstan or php-cs-fixer release can now turn Lint red without a code change, as it did in this PR. Tightening those two require-dev constraints is the lever if that becomes disruptive.

Not included

  • SHA-pinning the actions (@<sha> # v5), which Dependabot also maintains — separate, larger diff.
  • composer audit's "block-insecure": false, set in 0.11.1 so the solver would resolve. Worth re-testing now that a fresh resolve is clean.

Actions are referenced by floating major tags, so a moved tag runs new code in CI
with repository credentials. Weekly version updates keep them current, grouped
into one pull request.

Composer is set to security updates only. Consumers resolve against composer.json
and never see this package's composer.lock, so routine lock bumps would be noise;
open-pull-requests-limit: 0 disables version updates without affecting the
security updates enabled on the repository.
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 19 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f8930cf7-de9f-4a24-8efd-f4e3d86e3e64

📥 Commits

Reviewing files that changed from the base of the PR and between a5d8937 and 3b1bbfe.

⛔ Files ignored due to path filters (1)
  • composer.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • .github/dependabot.yml
  • .github/workflows/ci.yml
  • .gitignore
  • src/Responder/JsonSerializedResponder.php

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Composer ignores a dependency's lock file, so this one never reached consumers.
Comparable bundles — Nelmio, maker-bundle, DoctrineBundle, api-platform — do not
commit one either.

It was also nearly inert here: the test matrix runs composer update against each
Symfony version and never read it, so it pinned only the Lint job's static
analysis tools. What it did do was hold vulnerable transitive Symfony versions,
which is the entire content of the eight advisories that appeared when Dependabot
alerts were switched on. A fresh resolve reports no advisories.

Lint now runs composer update. The cache key already hashes composer.json, so it
needs no change.
@stixx stixx changed the title Add Dependabot configuration Add Dependabot configuration and stop committing composer.lock Aug 30, 2026
stixx added 2 commits August 30, 2026 20:32
supports() tested `$result instanceof Traversable` after is_object(), but
Traversable is an interface, so every implementation is an object and the earlier
branch already returned true. PHPStan 2.2 reports it as instanceof.alwaysFalse.

Behaviour is unchanged: the existing 'Traversable' case in supportsProvider,
which passes an ArrayIterator and expects true, still passes.

Surfaced by dropping composer.lock — Lint had been pinned to PHPStan 2.1.33 and
now resolves 2.2.10, which added this rule.
@stixx
stixx merged commit a2c2ce1 into main Aug 30, 2026
7 checks passed
@stixx
stixx deleted the chore/dependabot branch August 30, 2026 18:44
@stixx stixx added the enhancement New feature or request label Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant