composer/API Surface Check for PHP
Comment on a pull request with the public API surface changes (added, removed, modified symbols) detected.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jun 4, 2026
- License
- None
Pinned Snippet
uses: composer/api-surface-check@bba9f1cb940df6e02271b1b6158679ac0b3f39d3 # 1.0.1tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| paths | Pathspec patterns of files to analyze (whitespace or newline separated). | no | src/**/*.php |
| source-roots | Directories used to resolve parent classes/interfaces, comma or whitespace separated. | no | src |
| output-dir | Directory inside the runner where the analysis output is written. | no | api-surface-result |
| include-internal | Include symbols marked with @internal or @private. | no | false |
| types | Comma-separated list of symbol kinds to report (class,interface,trait,enum,method,property,constant). | no | class,interface,trait,enum,method,property,constant |
| visibility | Comma-separated visibilities to report (public,protected,private). | no | public,protected |
| show-removed | Include removed symbols in the report. | no | true |
| show-modified | Include symbols whose signature changed. | no | true |
| comment-marker | HTML comment marker used to identify previous bot comments. | no | <!-- api-surface-bot --> |
| heading | Markdown heading for the comment body. | no | ## API Surface Changes |
| working-directory | Directory the analysis runs from (must be a git repo with the analyzed files). Defaults to the workflow's working directory. | no | . |
| install-dependencies | Run composer install in the analyzed project so vendor classes are resolvable when walking parent hierarchies. Composer is invoked with --no-scripts and --no-plugins so PR-controlled code never executes. | no | false |
| composer-working-directory | Directory containing the analyzed project's composer.json. Empty (default) means use the value of working-directory. | no | "" |
Outputs
no outputs