Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support baseline configuration #737

Open
wants to merge 11 commits into
base: 8.4.x
Choose a base branch
from
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
phpstan.neon
phpunit.xml
phpcs.xml
.phpunit.result.cache
/.phpunit.cache
2 changes: 1 addition & 1 deletion .laminas-ci.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extensions": [
"bcmath"
"bcmath", "pcov"
],
"ini": [
"memory_limit=-1"
Expand Down
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,20 @@ vendor/bin/roave-backward-compatibility-check --help

## Configuration

There are currently no configuration options available.
The file `.roave-backward-compatibility-check.xml` is read from the current working directory (when it exists) and sets configuration for the command.

It's expected to be an XML file that follows our [schema](resources/schema.xsd):

**Example:**

```xml
<?xml version="1.0" encoding="UTF-8" ?>
<roave-bc-check
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/roave/backward-compatibility-check/resources/schema.xsd">
<baseline>
<ignored-regex>#\[BC\] CHANGED: The parameter \$a of of TestArtifact\\TheClass\#method\(\)#</ignored-regex>
<ignored-regex>#\[BC\] CHANGED: The parameter \$b of of TestArtifact\\TheClass\#method2\(\)#</ignored-regex>
</baseline>
</roave-bc-check>
```
1 change: 1 addition & 0 deletions box.json.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"main": "bin/roave-backward-compatibility-check.php",
"output": "dist/roave-backward-compatibility-check.phar",
"files-bin": [
"resources/schema.xsd",
"LICENSE",
"vendor/composer/composer/LICENSE"
],
Expand Down
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
"description": "Tool to compare two revisions of a public API to check for BC breaks",
"require": {
"php": "~8.1.0 || ~8.2.0",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-simplexml": "*",
"azjezz/psl": "^2.3.1",
"composer/composer": "^2.5.1",
"nikic/php-parser": "^4.15.3",
Expand All @@ -26,9 +29,9 @@
"require-dev": {
"doctrine/coding-standard": "^11.0.0",
"php-standard-library/psalm-plugin": "^2.2.1",
"phpunit/phpunit": "^9.5.27",
"phpunit/phpunit": "^10.0.14",
Copy link
Member

Choose a reason for hiding this comment

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

Depends on #741 to be merged

"psalm/plugin-phpunit": "^0.18.4",
"roave/infection-static-analysis-plugin": "^1.27.0",
"roave/infection-static-analysis-plugin": "^1.29.0",
"roave/security-advisories": "dev-master",
"squizlabs/php_codesniffer": "^3.7.1",
"vimeo/psalm": "^5.4.0"
Expand Down
Loading