diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..bc3ab5c
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,6 @@
+version: 2
+updates:
+ - package-ecosystem: "composer"
+ directory: "/"
+ schedule:
+ interval: "daily"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..1f7de1d
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,91 @@
+name: Continuous integration
+
+on: [push]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ continue-on-error: true
+ strategy:
+ fail-fast: true
+ matrix:
+ php: [8.1, 8.2, 8.3, 8.4]
+ stability: [prefer-lowest, prefer-stable]
+
+ name: PHP ${{ matrix.php }} - ${{ matrix.stability }}
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php }}
+ tools: composer:v2
+ coverage: xdebug
+
+ - name: Install dependencies
+ uses: nick-invision/retry@v2
+ with:
+ timeout_minutes: 5
+ max_attempts: 5
+ command: |
+ composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
+ # revert updated composer.lock
+ git checkout composer.lock
+
+ - name: Run tests
+ run: php vendor/bin/phpunit
+
+ - name: Submit code coverage
+ uses: codecov/codecov-action@v2
+
+ #- name: Evaluate semantic versioning
+ # run: |
+ # wget http://psvcg.coreteks.org/php-semver-checker-git.phar
+ # php php-semver-checker-git.phar suggest -vvv
+
+ phar:
+ runs-on: ubuntu-latest
+ name: Build PHAR
+ if: startsWith(github.ref, 'refs/tags/')
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: 8.4
+ tools: composer:v2
+
+ - name: Install dependencies
+ run: composer install --prefer-dist --no-interaction --no-progress
+
+ - name: Install Box
+ run: |
+ wget https://github.com/box-project/box/releases/latest/download/box.phar
+ chmod +x box.phar
+ sudo mv box.phar /usr/local/bin/box
+
+ - name: Build PHAR
+ run: box compile
+
+ - name: Upload PHAR artifact
+ uses: actions/upload-artifact@v5
+ with:
+ name: php-semver-checker-phar
+ path: php-semver-checker.phar
+
+ - name: Create Release
+ uses: softprops/action-gh-release@v1
+ with:
+ files: php-semver-checker.phar
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.scrutinizer.yml b/.scrutinizer.yml
deleted file mode 100644
index 980877e..0000000
--- a/.scrutinizer.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-filter:
- paths:
- - src/*
-tools:
- external_code_coverage:
- timeout: 1800
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 6ffeeba..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-language: php
-
-php:
- - 7.2
- - 7.3
- - 7.4
-
-sudo: false
-
-install:
- - composer self-update
- - composer install --no-interaction --prefer-dist
-
-script:
- - php vendor/bin/phpunit
-
-after_script:
- - wget https://scrutinizer-ci.com/ocular.phar
- - php ocular.phar code-coverage:upload --format=php-clover log/coverage.xml
- - wget http://psvcg.coreteks.org/php-semver-checker-git.phar
- - php php-semver-checker-git.phar suggest -vvv
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7779d10..d8eb308 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,8 +4,51 @@ This project follows [Semantic Versioning 2.0.0](http://semver.org/).
## Unreleased
+## v0.17.0 (2025-10-30)
+[Full Changelog](https://github.com/tomzx/php-semver-checker/compare/v0.16.0...v0.17.0)
+### Added
+* Build .phar with GitHub Actions
+
+### Changed
+* Bumped minimum PHP version to ^8.1
+* Bumped nikic/php-parser to ^5.2 to support PHP 8.4
+* Removed PHP 7.3/7.4 from CI check
+
+## v0.16.0 (2023-06-18)
+[Full Changelog](https://github.com/tomzx/php-semver-checker/compare/v0.15.1...v0.16.0)
+### Changed
+* Added strict typing
+* Bumped minimum PHP version to ^8.0
+* Added support for union type comparison
+* Bumped symfony/console to ^6.0
+* Bumped symfony/yaml to ^6.0
+
+## v0.15.1 (2021-12-30)
+[Full Changelog](https://github.com/tomzx/php-semver-checker/compare/v0.15.0...v0.15.1)
+### Changed
+* Bumped hassankhan/config to ^3.0.0
+
+### Fixed
+* Apply typing to `Report` class
+
+### Removed
+* Deprecation warnings suppression
+
+## v0.15.0 (2021-11-07)
+[Full Changelog](https://github.com/tomzx/php-semver-checker/compare/v0.14.0...v0.15.0)
+### Added
+* Add support for PHP 8.0, 8.1
+* Use of GitHub actions for CI
+
+### Changed
+* PHP minimum version from >=7.2.29 to >=7.3
+
+### Removed
+* Drop support for PHP 7.2
+* Use of travis-ci for CI
+
## v0.14.0 (2020-04-17)
-[Full Changelog](https://github.com/tomzx/php-semver-checker-git/compare/v0.13.0...v0.14.0)
+[Full Changelog](https://github.com/tomzx/php-semver-checker/compare/v0.13.0...v0.14.0)
### Added
* [#100] Add support for PHP 7.4
@@ -13,7 +56,7 @@ This project follows [Semantic Versioning 2.0.0](http://semver.org/).
* Drop support for PHP 5.6, 7.0, 7.1 and hhvm
## v0.13.0 (2019-04-19)
-[Full Changelog](https://github.com/tomzx/php-semver-checker-git/compare/v0.12.1...v0.13.0)
+[Full Changelog](https://github.com/tomzx/php-semver-checker/compare/v0.12.1...v0.13.0)
### Added
* [#99] Add support for class [V154], class method [V150, V156, V157, V151, V152, V158, V159], function [V160], interface [V153] and trait [V155] case change
@@ -24,7 +67,7 @@ This project follows [Semantic Versioning 2.0.0](http://semver.org/).
* [#94] PHP 7.1 nullable types not supported
## v0.12.1 (2018-02-08)
-[Full Changelog](https://github.com/tomzx/php-semver-checker-git/compare/v0.12.0...v0.12.1)
+[Full Changelog](https://github.com/tomzx/php-semver-checker/compare/v0.12.0...v0.12.1)
### Changed
* Remove dependency to herrera-io/phar-update in box.json
diff --git a/README.md b/README.md
index f442df5..37df68e 100644
--- a/README.md
+++ b/README.md
@@ -3,16 +3,22 @@
[](https://packagist.org/packages/tomzx/php-semver-checker)
[](https://packagist.org/packages/tomzx/php-semver-checker)
[](https://packagist.org/packages/tomzx/php-semver-checker)
-[](https://travis-ci.org/tomzx/php-semver-checker)
-[](https://scrutinizer-ci.com/g/tomzx/php-semver-checker/code-structure)
-[](https://scrutinizer-ci.com/g/tomzx/php-semver-checker)
+[](https://github.com/tomzx/php-semver-checker/actions?query=workflow%3A%22Continuous+integration%22)
+[](https://app.codecov.io/gh/tomzx/php-semver-checker/)
[](https://packagist.org/packages/tomzx/php-semver-checker)
PHP Semantic Versioning Checker is a console/library which allows you to inspect a set of before and after source code.
After the inspection is completed, you are given a list of changes that have occurred between the two changesets following [Semantic Versioning 2.0.0](https://semver.org/). For each of these changes, the level of the change (MAJOR, MINOR, PATCH) will be given, as well as the location of the change (file and line number) and a reason as to why this level change is suggested.
+## For continuous integration
+
+If you'd like to use `php-semver-checker` in your CI pipeline, we recommend you look at
+[`php-semver-checker-git`](https://github.com/tomzx/php-semver-checker-git) which integrates with Git and will compare
+your latest changes with the latest Git tag of your repository.
+
## Semantic Versioning 2.0.0 Overview
+
Given a version number MAJOR.MINOR.PATCH, increment the:
* MAJOR version when you make incompatible API changes,
@@ -30,6 +36,7 @@ As this is still an alpha package, it is not suggested to include `php-semver-ch
See the example section for examples of how to use the tool.
### Building `php-semver-checker.phar`
+
First, make sure you have [box](https://github.com/box-project/box2) installed. Then, in the base directory, you can run the following command which will generate the `php-semver-checker.phar` file.
```
@@ -136,6 +143,7 @@ Time: 1.43 seconds, Memory: 5.123 MB
## Contributing
### Adding new rules
+
* Add the rules to the `docs/Ruleset.md` document
* Run `php scripts/extract-rules-from-ruleset.php` to generate an up to date array to paste in the `Configuration/LevelMapping.php` file
* Update the documentation @ https://github.com/tomzx/php-semver-checker-docs
diff --git a/box.json b/box.json
index fb5f4ad..c4a0a32 100644
--- a/box.json
+++ b/box.json
@@ -1,7 +1,7 @@
{
"alias": "php-semver-checker.phar",
- "compactors": ["Herrera\\Box\\Compactor\\Php"],
- "compression": "GZ",
+ "compactors": ["KevinGH\\Box\\Compactor\\Php"],
+ "compression": "BZ2",
"directories": ["src"],
"files": ["LICENSE"],
"finder": [
@@ -11,7 +11,7 @@
"in": "vendor"
}
],
- "git-version": "package_version",
+ "git-tag": "package_version",
"main": "bin/php-semver-checker",
"output": "php-semver-checker.phar",
"stub": true
diff --git a/composer.json b/composer.json
index 0f0170e..d3bf347 100644
--- a/composer.json
+++ b/composer.json
@@ -13,24 +13,24 @@
{
"name": "Tom Rochette",
"email": "tom@tomrochette.com",
- "homepage": "http://www.tomrochette.com"
+ "homepage": "https://www.tomrochette.com"
}
],
"support": {
"issues": "https://github.com/tomzx/php-semver-checker/issues"
},
"require": {
- "php": ">=7.2.29",
+ "php": "^8.1",
- "hassankhan/config": "^2.0",
- "nikic/php-parser": "^4.0",
- "symfony/console": "^4.0",
- "symfony/yaml": "^4.0",
- "tomzx/finder": "^0.1"
+ "hassankhan/config": "^3.0",
+ "nikic/php-parser": "^5.2",
+ "symfony/console": "^6.0 || ^7.0",
+ "symfony/yaml": "^6.0 || ^7.0",
+ "tomzx/finder": "^0.2"
},
"require-dev": {
- "mockery/mockery": "^1.0",
- "phpunit/phpunit": "^7.0|^8.0"
+ "mockery/mockery": "^1.4.4",
+ "phpunit/phpunit": "^9.5.10"
},
"bin": [
"bin/php-semver-checker"
@@ -47,12 +47,12 @@
},
"config": {
"platform": {
- "php": "7.2.29"
+ "php": "8.1.0"
}
},
"extra": {
"branch-alias": {
- "dev-master": "0.14-dev"
+ "dev-master": "0.18-dev"
}
}
}
diff --git a/composer.lock b/composer.lock
index 46f67c3..6c455dc 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,33 +4,33 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "1e2643d099ed99079bf8cfcabb58b48e",
+ "content-hash": "f5e2ce2638fed11f5e957123a29fc8ce",
"packages": [
{
"name": "hassankhan/config",
- "version": "v2.1.0",
+ "version": "3.2.0",
"source": {
"type": "git",
"url": "https://github.com/hassankhan/config.git",
- "reference": "16fa4d3320ac9bb611dda0c8ea980edb58d227c9"
+ "reference": "cf63da451c4d226df983017932b9cef1b6d49db5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/hassankhan/config/zipball/16fa4d3320ac9bb611dda0c8ea980edb58d227c9",
- "reference": "16fa4d3320ac9bb611dda0c8ea980edb58d227c9",
+ "url": "https://api.github.com/repos/hassankhan/config/zipball/cf63da451c4d226df983017932b9cef1b6d49db5",
+ "reference": "cf63da451c4d226df983017932b9cef1b6d49db5",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": ">=7.4"
},
"require-dev": {
- "phpunit/phpunit": "~4.8 || ~5.7 || ~6.5 || ~7.5",
- "scrutinizer/ocular": "~1.1",
- "squizlabs/php_codesniffer": "~2.2",
- "symfony/yaml": "~3.4"
+ "phpunit/phpunit": "^9.5",
+ "scrutinizer/ocular": "^1.9",
+ "squizlabs/php_codesniffer": "^3.6",
+ "symfony/yaml": "^5.4"
},
"suggest": {
- "symfony/yaml": "~3.4"
+ "symfony/yaml": "^5.4"
},
"type": "library",
"autoload": {
@@ -62,29 +62,35 @@
"yaml",
"yml"
],
- "time": "2019-09-01T15:51:42+00:00"
+ "support": {
+ "issues": "https://github.com/hassankhan/config/issues",
+ "source": "https://github.com/hassankhan/config/tree/3.2.0"
+ },
+ "time": "2024-12-09T16:20:44+00:00"
},
{
"name": "nikic/php-parser",
- "version": "v4.4.0",
+ "version": "v5.6.2",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120"
+ "reference": "3a454ca033b9e06b63282ce19562e892747449bb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120",
- "reference": "bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/3a454ca033b9e06b63282ce19562e892747449bb",
+ "reference": "3a454ca033b9e06b63282ce19562e892747449bb",
"shasum": ""
},
"require": {
+ "ext-ctype": "*",
+ "ext-json": "*",
"ext-tokenizer": "*",
- "php": ">=7.0"
+ "php": ">=7.4"
},
"require-dev": {
- "ircmaxell/php-yacc": "0.0.5",
- "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0"
+ "ircmaxell/php-yacc": "^0.0.7",
+ "phpunit/phpunit": "^9.0"
},
"bin": [
"bin/php-parse"
@@ -92,7 +98,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.3-dev"
+ "dev-master": "5.x-dev"
}
},
"autoload": {
@@ -114,29 +120,33 @@
"parser",
"php"
],
- "time": "2020-04-10T16:34:50+00:00"
+ "support": {
+ "issues": "https://github.com/nikic/PHP-Parser/issues",
+ "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.2"
+ },
+ "time": "2025-10-21T19:32:17+00:00"
},
{
"name": "psr/container",
- "version": "1.0.0",
+ "version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
- "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
+ "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
- "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963",
+ "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963",
"shasum": ""
},
"require": {
- "php": ">=5.3.0"
+ "php": ">=7.4.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "2.0.x-dev"
}
},
"autoload": {
@@ -151,7 +161,7 @@
"authors": [
{
"name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
+ "homepage": "https://www.php-fig.org/"
}
],
"description": "Common Container Interface (PHP FIG PSR-11)",
@@ -163,58 +173,57 @@
"container-interop",
"psr"
],
- "time": "2017-02-14T16:28:37+00:00"
+ "support": {
+ "issues": "https://github.com/php-fig/container/issues",
+ "source": "https://github.com/php-fig/container/tree/2.0.2"
+ },
+ "time": "2021-11-05T16:47:00+00:00"
},
{
"name": "symfony/console",
- "version": "v4.4.7",
+ "version": "v6.4.27",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "10bb3ee3c97308869d53b3e3d03f6ac23ff985f7"
+ "reference": "13d3176cf8ad8ced24202844e9f95af11e2959fc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/10bb3ee3c97308869d53b3e3d03f6ac23ff985f7",
- "reference": "10bb3ee3c97308869d53b3e3d03f6ac23ff985f7",
+ "url": "https://api.github.com/repos/symfony/console/zipball/13d3176cf8ad8ced24202844e9f95af11e2959fc",
+ "reference": "13d3176cf8ad8ced24202844e9f95af11e2959fc",
"shasum": ""
},
"require": {
- "php": "^7.1.3",
+ "php": ">=8.1",
+ "symfony/deprecation-contracts": "^2.5|^3",
"symfony/polyfill-mbstring": "~1.0",
- "symfony/polyfill-php73": "^1.8",
- "symfony/service-contracts": "^1.1|^2"
+ "symfony/service-contracts": "^2.5|^3",
+ "symfony/string": "^5.4|^6.0|^7.0"
},
"conflict": {
- "symfony/dependency-injection": "<3.4",
- "symfony/event-dispatcher": "<4.3|>=5",
- "symfony/lock": "<4.4",
- "symfony/process": "<3.3"
+ "symfony/dependency-injection": "<5.4",
+ "symfony/dotenv": "<5.4",
+ "symfony/event-dispatcher": "<5.4",
+ "symfony/lock": "<5.4",
+ "symfony/process": "<5.4"
},
"provide": {
- "psr/log-implementation": "1.0"
+ "psr/log-implementation": "1.0|2.0|3.0"
},
"require-dev": {
- "psr/log": "~1.0",
- "symfony/config": "^3.4|^4.0|^5.0",
- "symfony/dependency-injection": "^3.4|^4.0|^5.0",
- "symfony/event-dispatcher": "^4.3",
- "symfony/lock": "^4.4|^5.0",
- "symfony/process": "^3.4|^4.0|^5.0",
- "symfony/var-dumper": "^4.3|^5.0"
- },
- "suggest": {
- "psr/log": "For using the console logger",
- "symfony/event-dispatcher": "",
- "symfony/lock": "",
- "symfony/process": ""
+ "psr/log": "^1|^2|^3",
+ "symfony/config": "^5.4|^6.0|^7.0",
+ "symfony/dependency-injection": "^5.4|^6.0|^7.0",
+ "symfony/event-dispatcher": "^5.4|^6.0|^7.0",
+ "symfony/http-foundation": "^6.4|^7.0",
+ "symfony/http-kernel": "^6.4|^7.0",
+ "symfony/lock": "^5.4|^6.0|^7.0",
+ "symfony/messenger": "^5.4|^6.0|^7.0",
+ "symfony/process": "^5.4|^6.0|^7.0",
+ "symfony/stopwatch": "^5.4|^6.0|^7.0",
+ "symfony/var-dumper": "^5.4|^6.0|^7.0"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "4.4-dev"
- }
- },
"autoload": {
"psr-4": {
"Symfony\\Component\\Console\\": ""
@@ -237,43 +246,141 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Console Component",
+ "description": "Eases the creation of beautiful and testable command line interfaces",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "cli",
+ "command-line",
+ "console",
+ "terminal"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/console/tree/v6.4.27"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2025-10-06T10:25:16+00:00"
+ },
+ {
+ "name": "symfony/deprecation-contracts",
+ "version": "v3.6.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/deprecation-contracts.git",
+ "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62",
+ "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.1"
+ },
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "url": "https://github.com/symfony/contracts",
+ "name": "symfony/contracts"
+ },
+ "branch-alias": {
+ "dev-main": "3.6-dev"
+ }
+ },
+ "autoload": {
+ "files": [
+ "function.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
- "time": "2020-03-30T11:41:10+00:00"
+ "support": {
+ "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-25T14:21:43+00:00"
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.15.0",
+ "version": "v1.33.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14"
+ "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14",
- "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638",
+ "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.2"
+ },
+ "provide": {
+ "ext-ctype": "*"
},
"suggest": {
"ext-ctype": "For best performance"
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-master": "1.15-dev"
+ "thanks": {
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
}
},
"autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Ctype\\": ""
- },
"files": [
"bootstrap.php"
- ]
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Ctype\\": ""
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -297,6 +404,9 @@
"polyfill",
"portable"
],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -306,46 +416,51 @@
"url": "https://github.com/fabpot",
"type": "github"
},
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
- "time": "2020-02-27T09:26:54+00:00"
+ "time": "2024-09-09T11:45:10+00:00"
},
{
- "name": "symfony/polyfill-mbstring",
- "version": "v1.15.0",
+ "name": "symfony/polyfill-intl-grapheme",
+ "version": "v1.33.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac"
+ "url": "https://github.com/symfony/polyfill-intl-grapheme.git",
+ "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac",
- "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70",
+ "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.2"
},
"suggest": {
- "ext-mbstring": "For best performance"
+ "ext-intl": "For best performance"
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-master": "1.15-dev"
+ "thanks": {
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
}
},
"autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Mbstring\\": ""
- },
"files": [
"bootstrap.php"
- ]
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Intl\\Grapheme\\": ""
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -361,15 +476,19 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony polyfill for the Mbstring extension",
+ "description": "Symfony polyfill for intl's grapheme_* functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
- "mbstring",
+ "grapheme",
+ "intl",
"polyfill",
"portable",
"shim"
],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.33.0"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -379,43 +498,51 @@
"url": "https://github.com/fabpot",
"type": "github"
},
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
- "time": "2020-03-09T19:04:49+00:00"
+ "time": "2025-06-27T09:58:17+00:00"
},
{
- "name": "symfony/polyfill-php73",
- "version": "v1.15.0",
+ "name": "symfony/polyfill-intl-normalizer",
+ "version": "v1.33.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/polyfill-php73.git",
- "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7"
+ "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
+ "reference": "3833d7255cc303546435cb650316bff708a1c75c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7",
- "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c",
+ "reference": "3833d7255cc303546435cb650316bff708a1c75c",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.2"
+ },
+ "suggest": {
+ "ext-intl": "For best performance"
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-master": "1.15-dev"
+ "thanks": {
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
}
},
"autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Php73\\": ""
- },
"files": [
"bootstrap.php"
],
+ "psr-4": {
+ "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
+ },
"classmap": [
"Resources/stubs"
]
@@ -434,14 +561,19 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
+ "description": "Symfony polyfill for intl's Normalizer class and related functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
+ "intl",
+ "normalizer",
"polyfill",
"portable",
"shim"
],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.33.0"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -451,43 +583,54 @@
"url": "https://github.com/fabpot",
"type": "github"
},
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
- "time": "2020-02-27T09:26:54+00:00"
+ "time": "2024-09-09T11:45:10+00:00"
},
{
- "name": "symfony/service-contracts",
- "version": "v2.0.1",
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.33.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/service-contracts.git",
- "reference": "144c5e51266b281231e947b51223ba14acf1a749"
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749",
- "reference": "144c5e51266b281231e947b51223ba14acf1a749",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493",
+ "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493",
"shasum": ""
},
"require": {
- "php": "^7.2.5",
- "psr/container": "^1.0"
+ "ext-iconv": "*",
+ "php": ">=7.2"
+ },
+ "provide": {
+ "ext-mbstring": "*"
},
"suggest": {
- "symfony/service-implementation": ""
+ "ext-mbstring": "For best performance"
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-master": "2.0-dev"
+ "thanks": {
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
}
},
"autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
"psr-4": {
- "Symfony\\Contracts\\Service\\": ""
+ "Symfony\\Polyfill\\Mbstring\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -504,57 +647,76 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Generic abstractions related to writing services",
+ "description": "Symfony polyfill for the Mbstring extension",
"homepage": "https://symfony.com",
"keywords": [
- "abstractions",
- "contracts",
- "decoupling",
- "interfaces",
- "interoperability",
- "standards"
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
],
- "time": "2019-11-18T17:27:11+00:00"
+ "time": "2024-12-23T08:48:59+00:00"
},
{
- "name": "symfony/yaml",
- "version": "v4.4.7",
+ "name": "symfony/service-contracts",
+ "version": "v3.6.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/yaml.git",
- "reference": "ef166890d821518106da3560086bfcbeb4fadfec"
+ "url": "https://github.com/symfony/service-contracts.git",
+ "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/ef166890d821518106da3560086bfcbeb4fadfec",
- "reference": "ef166890d821518106da3560086bfcbeb4fadfec",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4",
+ "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4",
"shasum": ""
},
"require": {
- "php": "^7.1.3",
- "symfony/polyfill-ctype": "~1.8"
+ "php": ">=8.1",
+ "psr/container": "^1.1|^2.0",
+ "symfony/deprecation-contracts": "^2.5|^3"
},
"conflict": {
- "symfony/console": "<3.4"
- },
- "require-dev": {
- "symfony/console": "^3.4|^4.0|^5.0"
- },
- "suggest": {
- "symfony/console": "For validating YAML files using the lint command"
+ "ext-psr": "<1.1|>=2"
},
"type": "library",
"extra": {
+ "thanks": {
+ "url": "https://github.com/symfony/contracts",
+ "name": "symfony/contracts"
+ },
"branch-alias": {
- "dev-master": "4.4-dev"
+ "dev-main": "3.6-dev"
}
},
"autoload": {
"psr-4": {
- "Symfony\\Component\\Yaml\\": ""
+ "Symfony\\Contracts\\Service\\": ""
},
"exclude-from-classmap": [
- "/Tests/"
+ "/Test/"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -563,48 +725,84 @@
],
"authors": [
{
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Yaml Component",
+ "description": "Generic abstractions related to writing services",
"homepage": "https://symfony.com",
- "time": "2020-03-30T11:41:10+00:00"
+ "keywords": [
+ "abstractions",
+ "contracts",
+ "decoupling",
+ "interfaces",
+ "interoperability",
+ "standards"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/service-contracts/tree/v3.6.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2025-04-25T09:37:31+00:00"
},
{
- "name": "tomzx/finder",
- "version": "v0.1.0",
+ "name": "symfony/string",
+ "version": "v6.4.26",
"source": {
"type": "git",
- "url": "https://github.com/tomzx/finder.git",
- "reference": "a8285e2d18eb825d3bc355202572f875da715c8e"
+ "url": "https://github.com/symfony/string.git",
+ "reference": "5621f039a71a11c87c106c1c598bdcd04a19aeea"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/tomzx/finder/zipball/a8285e2d18eb825d3bc355202572f875da715c8e",
- "reference": "a8285e2d18eb825d3bc355202572f875da715c8e",
+ "url": "https://api.github.com/repos/symfony/string/zipball/5621f039a71a11c87c106c1c598bdcd04a19aeea",
+ "reference": "5621f039a71a11c87c106c1c598bdcd04a19aeea",
"shasum": ""
},
"require": {
- "php": ">=5.4.0"
+ "php": ">=8.1",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-intl-grapheme": "~1.0",
+ "symfony/polyfill-intl-normalizer": "~1.0",
+ "symfony/polyfill-mbstring": "~1.0"
+ },
+ "conflict": {
+ "symfony/translation-contracts": "<2.5"
},
"require-dev": {
- "phpunit/phpunit": "~4"
+ "symfony/http-client": "^5.4|^6.0|^7.0",
+ "symfony/intl": "^6.2|^7.0",
+ "symfony/translation-contracts": "^2.5|^3.0",
+ "symfony/var-exporter": "^5.4|^6.0|^7.0"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "0.1-dev"
- }
- },
"autoload": {
+ "files": [
+ "Resources/functions.php"
+ ],
"psr-4": {
- "Finder\\": "src/Finder"
- }
+ "Symfony\\Component\\String\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -612,52 +810,206 @@
],
"authors": [
{
- "name": "Tom Rochette",
- "email": "tom@tomrochette.com",
- "homepage": "http://www.tomrochette.com"
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
- "description": "Improved, Symfony Finder compatible finder.",
- "homepage": "https://github.com/tomzx/finder",
+ "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way",
+ "homepage": "https://symfony.com",
"keywords": [
- "finder"
+ "grapheme",
+ "i18n",
+ "string",
+ "unicode",
+ "utf-8",
+ "utf8"
],
- "time": "2016-01-24T06:21:12+00:00"
- }
- ],
- "packages-dev": [
- {
- "name": "doctrine/instantiator",
- "version": "1.3.0",
- "source": {
- "type": "git",
- "url": "https://github.com/doctrine/instantiator.git",
- "reference": "ae466f726242e637cebdd526a7d991b9433bacf1"
+ "support": {
+ "source": "https://github.com/symfony/string/tree/v6.4.26"
},
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1",
- "reference": "ae466f726242e637cebdd526a7d991b9433bacf1",
- "shasum": ""
- },
- "require": {
- "php": "^7.1"
- },
- "require-dev": {
- "doctrine/coding-standard": "^6.0",
- "ext-pdo": "*",
- "ext-phar": "*",
- "phpbench/phpbench": "^0.13",
- "phpstan/phpstan-phpunit": "^0.11",
- "phpstan/phpstan-shim": "^0.11",
- "phpunit/phpunit": "^7.0"
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2025-09-11T14:32:46+00:00"
+ },
+ {
+ "name": "symfony/yaml",
+ "version": "v6.4.26",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/yaml.git",
+ "reference": "0fc8b966fd0dcaab544ae59bfc3a433f048c17b0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/0fc8b966fd0dcaab544ae59bfc3a433f048c17b0",
+ "reference": "0fc8b966fd0dcaab544ae59bfc3a433f048c17b0",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.1",
+ "symfony/deprecation-contracts": "^2.5|^3",
+ "symfony/polyfill-ctype": "^1.8"
+ },
+ "conflict": {
+ "symfony/console": "<5.4"
+ },
+ "require-dev": {
+ "symfony/console": "^5.4|^6.0|^7.0"
+ },
+ "bin": [
+ "Resources/bin/yaml-lint"
+ ],
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Yaml\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Loads and dumps YAML files",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/yaml/tree/v6.4.26"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2025-09-26T15:07:38+00:00"
+ },
+ {
+ "name": "tomzx/finder",
+ "version": "v0.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/tomzx/finder.git",
+ "reference": "dc6e79df0662a7a98a0461fef55f0fbd06d13b24"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/tomzx/finder/zipball/dc6e79df0662a7a98a0461fef55f0fbd06d13b24",
+ "reference": "dc6e79df0662a7a98a0461fef55f0fbd06d13b24",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.2.x-dev"
+ "dev-master": "0.2-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Finder\\": "src/Finder"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Tom Rochette",
+ "email": "tom@tomrochette.com",
+ "homepage": "https://www.tomrochette.com"
}
+ ],
+ "description": "Improved, Symfony Finder compatible finder.",
+ "homepage": "https://github.com/tomzx/finder",
+ "keywords": [
+ "finder"
+ ],
+ "support": {
+ "issues": "https://github.com/tomzx/finder/issues",
+ "source": "https://github.com/tomzx/finder/tree/v0.2.0"
+ },
+ "time": "2021-11-08T03:17:54+00:00"
+ }
+ ],
+ "packages-dev": [
+ {
+ "name": "doctrine/instantiator",
+ "version": "2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/instantiator.git",
+ "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
+ "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^8.1"
+ },
+ "require-dev": {
+ "doctrine/coding-standard": "^11",
+ "ext-pdo": "*",
+ "ext-phar": "*",
+ "phpbench/phpbench": "^1.2",
+ "phpstan/phpstan": "^1.9.4",
+ "phpstan/phpstan-phpunit": "^1.3",
+ "phpunit/phpunit": "^9.5.27",
+ "vimeo/psalm": "^5.4"
},
+ "type": "library",
"autoload": {
"psr-4": {
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
@@ -671,7 +1023,7 @@
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com",
- "homepage": "http://ocramius.github.com/"
+ "homepage": "https://ocramius.github.io/"
}
],
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
@@ -680,24 +1032,42 @@
"constructor",
"instantiate"
],
- "time": "2019-10-21T16:45:58+00:00"
+ "support": {
+ "issues": "https://github.com/doctrine/instantiator/issues",
+ "source": "https://github.com/doctrine/instantiator/tree/2.0.0"
+ },
+ "funding": [
+ {
+ "url": "https://www.doctrine-project.org/sponsorship.html",
+ "type": "custom"
+ },
+ {
+ "url": "https://www.patreon.com/phpdoctrine",
+ "type": "patreon"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-12-30T00:23:10+00:00"
},
{
"name": "hamcrest/hamcrest-php",
- "version": "v2.0.0",
+ "version": "v2.1.1",
"source": {
"type": "git",
"url": "https://github.com/hamcrest/hamcrest-php.git",
- "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad"
+ "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad",
- "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad",
+ "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487",
+ "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487",
"shasum": ""
},
"require": {
- "php": "^5.3|^7.0"
+ "php": "^7.4|^8.0"
},
"replace": {
"cordoval/hamcrest-php": "*",
@@ -705,14 +1075,13 @@
"kodova/hamcrest-php": "*"
},
"require-dev": {
- "phpunit/php-file-iterator": "1.3.3",
- "phpunit/phpunit": "~4.0",
- "satooshi/php-coveralls": "^1.0"
+ "phpunit/php-file-iterator": "^1.4 || ^2.0 || ^3.0",
+ "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0 || ^8.0 || ^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-master": "2.1-dev"
}
},
"autoload": {
@@ -722,45 +1091,52 @@
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "BSD"
+ "BSD-3-Clause"
],
"description": "This is the PHP port of Hamcrest Matchers",
"keywords": [
"test"
],
- "time": "2016-01-20T08:20:44+00:00"
+ "support": {
+ "issues": "https://github.com/hamcrest/hamcrest-php/issues",
+ "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.1.1"
+ },
+ "time": "2025-04-30T06:54:44+00:00"
},
{
"name": "mockery/mockery",
- "version": "1.3.1",
+ "version": "1.6.12",
"source": {
"type": "git",
"url": "https://github.com/mockery/mockery.git",
- "reference": "f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be"
+ "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/mockery/mockery/zipball/f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be",
- "reference": "f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be",
+ "url": "https://api.github.com/repos/mockery/mockery/zipball/1f4efdd7d3beafe9807b08156dfcb176d18f1699",
+ "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699",
"shasum": ""
},
"require": {
- "hamcrest/hamcrest-php": "~2.0",
+ "hamcrest/hamcrest-php": "^2.0.1",
"lib-pcre": ">=7.0",
- "php": ">=5.6.0"
+ "php": ">=7.3"
+ },
+ "conflict": {
+ "phpunit/phpunit": "<8.0"
},
"require-dev": {
- "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0"
+ "phpunit/phpunit": "^8.5 || ^9.6.17",
+ "symplify/easy-coding-standard": "^12.1.14"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.3.x-dev"
- }
- },
"autoload": {
- "psr-0": {
- "Mockery": "library/"
+ "files": [
+ "library/helpers.php",
+ "library/Mockery.php"
+ ],
+ "psr-4": {
+ "Mockery\\": "library/Mockery"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -771,12 +1147,20 @@
{
"name": "Pádraic Brady",
"email": "padraic.brady@gmail.com",
- "homepage": "http://blog.astrumfutura.com"
+ "homepage": "https://github.com/padraic",
+ "role": "Author"
},
{
"name": "Dave Marshall",
"email": "dave.marshall@atstsolutions.co.uk",
- "homepage": "http://davedevelopment.co.uk"
+ "homepage": "https://davedevelopment.co.uk",
+ "role": "Developer"
+ },
+ {
+ "name": "Nathanael Esayeas",
+ "email": "nathanael.esayeas@protonmail.com",
+ "homepage": "https://github.com/ghostwriter",
+ "role": "Lead Developer"
}
],
"description": "Mockery is a simple yet flexible PHP mock object framework",
@@ -793,41 +1177,50 @@
"test double",
"testing"
],
- "time": "2019-12-26T09:49:15+00:00"
+ "support": {
+ "docs": "https://docs.mockery.io/",
+ "issues": "https://github.com/mockery/mockery/issues",
+ "rss": "https://github.com/mockery/mockery/releases.atom",
+ "security": "https://github.com/mockery/mockery/security/advisories",
+ "source": "https://github.com/mockery/mockery"
+ },
+ "time": "2024-05-16T03:13:13+00:00"
},
{
"name": "myclabs/deep-copy",
- "version": "1.9.5",
+ "version": "1.13.4",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef"
+ "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef",
- "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a",
+ "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": "^7.1 || ^8.0"
},
- "replace": {
- "myclabs/deep-copy": "self.version"
+ "conflict": {
+ "doctrine/collections": "<1.6.8",
+ "doctrine/common": "<2.13.3 || >=3 <3.2.2"
},
"require-dev": {
- "doctrine/collections": "^1.0",
- "doctrine/common": "^2.6",
- "phpunit/phpunit": "^7.1"
+ "doctrine/collections": "^1.6.8",
+ "doctrine/common": "^2.13.3 || ^3.2.2",
+ "phpspec/prophecy": "^1.10",
+ "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
},
"type": "library",
"autoload": {
- "psr-4": {
- "DeepCopy\\": "src/DeepCopy/"
- },
"files": [
"src/DeepCopy/deep_copy.php"
- ]
+ ],
+ "psr-4": {
+ "DeepCopy\\": "src/DeepCopy/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -841,32 +1234,44 @@
"object",
"object graph"
],
- "time": "2020-01-17T21:11:47+00:00"
+ "support": {
+ "issues": "https://github.com/myclabs/DeepCopy/issues",
+ "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4"
+ },
+ "funding": [
+ {
+ "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2025-08-01T08:46:24+00:00"
},
{
"name": "phar-io/manifest",
- "version": "1.0.3",
+ "version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/phar-io/manifest.git",
- "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4"
+ "reference": "54750ef60c58e43759730615a392c31c80e23176"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4",
- "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4",
+ "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176",
+ "reference": "54750ef60c58e43759730615a392c31c80e23176",
"shasum": ""
},
"require": {
"ext-dom": "*",
+ "ext-libxml": "*",
"ext-phar": "*",
- "phar-io/version": "^2.0",
- "php": "^5.6 || ^7.0"
+ "ext-xmlwriter": "*",
+ "phar-io/version": "^3.0.1",
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "2.0.x-dev"
}
},
"autoload": {
@@ -896,24 +1301,34 @@
}
],
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
- "time": "2018-07-08T19:23:20+00:00"
+ "support": {
+ "issues": "https://github.com/phar-io/manifest/issues",
+ "source": "https://github.com/phar-io/manifest/tree/2.0.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/theseer",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-03T12:33:53+00:00"
},
{
"name": "phar-io/version",
- "version": "2.0.1",
+ "version": "3.2.1",
"source": {
"type": "git",
"url": "https://github.com/phar-io/version.git",
- "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6"
+ "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6",
- "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6",
+ "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
+ "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
"shasum": ""
},
"require": {
- "php": "^5.6 || ^7.0"
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"autoload": {
@@ -943,258 +1358,178 @@
}
],
"description": "Library for handling version information and constraints",
- "time": "2018-07-08T19:19:57+00:00"
+ "support": {
+ "issues": "https://github.com/phar-io/version/issues",
+ "source": "https://github.com/phar-io/version/tree/3.2.1"
+ },
+ "time": "2022-02-21T01:04:05+00:00"
},
{
- "name": "phpdocumentor/reflection-common",
- "version": "2.0.0",
+ "name": "phpunit/php-code-coverage",
+ "version": "9.2.32",
"source": {
"type": "git",
- "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
- "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a"
+ "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
+ "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a",
- "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5",
+ "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5",
"shasum": ""
},
"require": {
- "php": ">=7.1"
+ "ext-dom": "*",
+ "ext-libxml": "*",
+ "ext-xmlwriter": "*",
+ "nikic/php-parser": "^4.19.1 || ^5.1.0",
+ "php": ">=7.3",
+ "phpunit/php-file-iterator": "^3.0.6",
+ "phpunit/php-text-template": "^2.0.4",
+ "sebastian/code-unit-reverse-lookup": "^2.0.3",
+ "sebastian/complexity": "^2.0.3",
+ "sebastian/environment": "^5.1.5",
+ "sebastian/lines-of-code": "^1.0.4",
+ "sebastian/version": "^3.0.2",
+ "theseer/tokenizer": "^1.2.3"
},
"require-dev": {
- "phpunit/phpunit": "~6"
+ "phpunit/phpunit": "^9.6"
+ },
+ "suggest": {
+ "ext-pcov": "PHP extension that provides line coverage",
+ "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.x-dev"
+ "dev-main": "9.2.x-dev"
}
},
"autoload": {
- "psr-4": {
- "phpDocumentor\\Reflection\\": "src/"
- }
+ "classmap": [
+ "src/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "MIT"
+ "BSD-3-Clause"
],
"authors": [
{
- "name": "Jaap van Otterdijk",
- "email": "opensource@ijaap.nl"
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
}
],
- "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
- "homepage": "http://www.phpdoc.org",
+ "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
+ "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
"keywords": [
- "FQSEN",
- "phpDocumentor",
- "phpdoc",
- "reflection",
- "static analysis"
+ "coverage",
+ "testing",
+ "xunit"
],
- "time": "2018-08-07T13:53:10+00:00"
- },
- {
- "name": "phpdocumentor/reflection-docblock",
- "version": "5.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e",
- "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e",
- "shasum": ""
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
+ "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32"
},
- "require": {
- "ext-filter": "^7.1",
- "php": "^7.2",
- "phpdocumentor/reflection-common": "^2.0",
- "phpdocumentor/type-resolver": "^1.0",
- "webmozart/assert": "^1"
- },
- "require-dev": {
- "doctrine/instantiator": "^1",
- "mockery/mockery": "^1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "5.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "phpDocumentor\\Reflection\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Mike van Riel",
- "email": "me@mikevanriel.com"
- },
+ "funding": [
{
- "name": "Jaap van Otterdijk",
- "email": "account@ijaap.nl"
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
}
],
- "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
- "time": "2020-02-22T12:28:44+00:00"
+ "time": "2024-08-22T04:23:01+00:00"
},
{
- "name": "phpdocumentor/type-resolver",
- "version": "1.1.0",
+ "name": "phpunit/php-file-iterator",
+ "version": "3.0.6",
"source": {
"type": "git",
- "url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "7462d5f123dfc080dfdf26897032a6513644fc95"
+ "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
+ "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95",
- "reference": "7462d5f123dfc080dfdf26897032a6513644fc95",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
+ "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
"shasum": ""
},
"require": {
- "php": "^7.2",
- "phpdocumentor/reflection-common": "^2.0"
+ "php": ">=7.3"
},
"require-dev": {
- "ext-tokenizer": "^7.2",
- "mockery/mockery": "~1"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.x-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
- "psr-4": {
- "phpDocumentor\\Reflection\\": "src"
- }
+ "classmap": [
+ "src/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "MIT"
+ "BSD-3-Clause"
],
"authors": [
{
- "name": "Mike van Riel",
- "email": "me@mikevanriel.com"
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
}
],
- "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
- "time": "2020-02-18T18:59:58+00:00"
- },
- {
- "name": "phpspec/prophecy",
- "version": "v1.10.3",
- "source": {
- "type": "git",
- "url": "https://github.com/phpspec/prophecy.git",
- "reference": "451c3cd1418cf640de218914901e51b064abb093"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093",
- "reference": "451c3cd1418cf640de218914901e51b064abb093",
- "shasum": ""
- },
- "require": {
- "doctrine/instantiator": "^1.0.2",
- "php": "^5.3|^7.0",
- "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
- "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0",
- "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0"
- },
- "require-dev": {
- "phpspec/phpspec": "^2.5 || ^3.2",
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.10.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Prophecy\\": "src/Prophecy"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
+ "description": "FilterIterator implementation that filters files based on a list of suffixes.",
+ "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
+ "keywords": [
+ "filesystem",
+ "iterator"
],
- "authors": [
- {
- "name": "Konstantin Kudryashov",
- "email": "ever.zet@gmail.com",
- "homepage": "http://everzet.com"
- },
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6"
+ },
+ "funding": [
{
- "name": "Marcello Duarte",
- "email": "marcello.duarte@gmail.com"
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
}
],
- "description": "Highly opinionated mocking framework for PHP 5.3+",
- "homepage": "https://github.com/phpspec/prophecy",
- "keywords": [
- "Double",
- "Dummy",
- "fake",
- "mock",
- "spy",
- "stub"
- ],
- "time": "2020-03-05T15:02:03+00:00"
+ "time": "2021-12-02T12:48:52+00:00"
},
{
- "name": "phpunit/php-code-coverage",
- "version": "7.0.10",
+ "name": "phpunit/php-invoker",
+ "version": "3.1.1",
"source": {
"type": "git",
- "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf"
+ "url": "https://github.com/sebastianbergmann/php-invoker.git",
+ "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf",
- "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
+ "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
"shasum": ""
},
"require": {
- "ext-dom": "*",
- "ext-xmlwriter": "*",
- "php": "^7.2",
- "phpunit/php-file-iterator": "^2.0.2",
- "phpunit/php-text-template": "^1.2.1",
- "phpunit/php-token-stream": "^3.1.1",
- "sebastian/code-unit-reverse-lookup": "^1.0.1",
- "sebastian/environment": "^4.2.2",
- "sebastian/version": "^2.0.1",
- "theseer/tokenizer": "^1.1.3"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^8.2.2"
+ "ext-pcntl": "*",
+ "phpunit/phpunit": "^9.3"
},
"suggest": {
- "ext-xdebug": "^2.7.2"
+ "ext-pcntl": "*"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "7.0-dev"
+ "dev-master": "3.1-dev"
}
},
"autoload": {
@@ -1213,39 +1548,47 @@
"role": "lead"
}
],
- "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
- "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
+ "description": "Invoke callables with a timeout",
+ "homepage": "https://github.com/sebastianbergmann/php-invoker/",
"keywords": [
- "coverage",
- "testing",
- "xunit"
+ "process"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-invoker/issues",
+ "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
],
- "time": "2019-11-20T13:55:58+00:00"
+ "time": "2020-09-28T05:58:55+00:00"
},
{
- "name": "phpunit/php-file-iterator",
- "version": "2.0.2",
+ "name": "phpunit/php-text-template",
+ "version": "2.0.4",
"source": {
"type": "git",
- "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "050bedf145a257b1ff02746c31894800e5122946"
+ "url": "https://github.com/sebastianbergmann/php-text-template.git",
+ "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946",
- "reference": "050bedf145a257b1ff02746c31894800e5122946",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
+ "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^7.1"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -1264,32 +1607,49 @@
"role": "lead"
}
],
- "description": "FilterIterator implementation that filters files based on a list of suffixes.",
- "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
+ "description": "Simple template engine.",
+ "homepage": "https://github.com/sebastianbergmann/php-text-template/",
"keywords": [
- "filesystem",
- "iterator"
+ "template"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-text-template/issues",
+ "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
],
- "time": "2018-09-13T20:33:42+00:00"
+ "time": "2020-10-26T05:33:50+00:00"
},
{
- "name": "phpunit/php-text-template",
- "version": "1.2.1",
+ "name": "phpunit/php-timer",
+ "version": "5.0.3",
"source": {
"type": "git",
- "url": "https://github.com/sebastianbergmann/php-text-template.git",
- "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
+ "url": "https://github.com/sebastianbergmann/php-timer.git",
+ "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
- "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
+ "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.0-dev"
+ }
+ },
"autoload": {
"classmap": [
"src/"
@@ -1306,40 +1666,83 @@
"role": "lead"
}
],
- "description": "Simple template engine.",
- "homepage": "https://github.com/sebastianbergmann/php-text-template/",
+ "description": "Utility class for timing",
+ "homepage": "https://github.com/sebastianbergmann/php-timer/",
"keywords": [
- "template"
+ "timer"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-timer/issues",
+ "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
],
- "time": "2015-06-21T13:50:34+00:00"
+ "time": "2020-10-26T13:16:10+00:00"
},
{
- "name": "phpunit/php-timer",
- "version": "2.1.2",
+ "name": "phpunit/phpunit",
+ "version": "9.6.29",
"source": {
"type": "git",
- "url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "1038454804406b0b5f5f520358e78c1c2f71501e"
+ "url": "https://github.com/sebastianbergmann/phpunit.git",
+ "reference": "9ecfec57835a5581bc888ea7e13b51eb55ab9dd3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e",
- "reference": "1038454804406b0b5f5f520358e78c1c2f71501e",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9ecfec57835a5581bc888ea7e13b51eb55ab9dd3",
+ "reference": "9ecfec57835a5581bc888ea7e13b51eb55ab9dd3",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "doctrine/instantiator": "^1.5.0 || ^2",
+ "ext-dom": "*",
+ "ext-json": "*",
+ "ext-libxml": "*",
+ "ext-mbstring": "*",
+ "ext-xml": "*",
+ "ext-xmlwriter": "*",
+ "myclabs/deep-copy": "^1.13.4",
+ "phar-io/manifest": "^2.0.4",
+ "phar-io/version": "^3.2.1",
+ "php": ">=7.3",
+ "phpunit/php-code-coverage": "^9.2.32",
+ "phpunit/php-file-iterator": "^3.0.6",
+ "phpunit/php-invoker": "^3.1.1",
+ "phpunit/php-text-template": "^2.0.4",
+ "phpunit/php-timer": "^5.0.3",
+ "sebastian/cli-parser": "^1.0.2",
+ "sebastian/code-unit": "^1.0.8",
+ "sebastian/comparator": "^4.0.9",
+ "sebastian/diff": "^4.0.6",
+ "sebastian/environment": "^5.1.5",
+ "sebastian/exporter": "^4.0.8",
+ "sebastian/global-state": "^5.0.8",
+ "sebastian/object-enumerator": "^4.0.4",
+ "sebastian/resource-operations": "^3.0.4",
+ "sebastian/type": "^3.2.1",
+ "sebastian/version": "^3.0.2"
},
- "require-dev": {
- "phpunit/phpunit": "^7.0"
+ "suggest": {
+ "ext-soap": "To be able to generate mocks based on WSDL files",
+ "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage"
},
+ "bin": [
+ "phpunit"
+ ],
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.1-dev"
+ "dev-master": "9.6-dev"
}
},
"autoload": {
+ "files": [
+ "src/Framework/Assert/Functions.php"
+ ],
"classmap": [
"src/"
]
@@ -1355,38 +1758,66 @@
"role": "lead"
}
],
- "description": "Utility class for timing",
- "homepage": "https://github.com/sebastianbergmann/php-timer/",
+ "description": "The PHP Unit Testing framework.",
+ "homepage": "https://phpunit.de/",
"keywords": [
- "timer"
+ "phpunit",
+ "testing",
+ "xunit"
],
- "time": "2019-06-07T04:22:29+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/phpunit/issues",
+ "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.29"
+ },
+ "funding": [
+ {
+ "url": "https://phpunit.de/sponsors.html",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ },
+ {
+ "url": "https://liberapay.com/sebastianbergmann",
+ "type": "liberapay"
+ },
+ {
+ "url": "https://thanks.dev/u/gh/sebastianbergmann",
+ "type": "thanks_dev"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2025-09-24T06:29:11+00:00"
},
{
- "name": "phpunit/php-token-stream",
- "version": "3.1.1",
+ "name": "sebastian/cli-parser",
+ "version": "1.0.2",
"source": {
"type": "git",
- "url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff"
+ "url": "https://github.com/sebastianbergmann/cli-parser.git",
+ "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff",
- "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff",
+ "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b",
+ "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b",
"shasum": ""
},
"require": {
- "ext-tokenizer": "*",
- "php": "^7.1"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^7.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1-dev"
+ "dev-master": "1.0-dev"
}
},
"autoload": {
@@ -1401,72 +1832,48 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
}
],
- "description": "Wrapper around PHP's tokenizer extension.",
- "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
- "keywords": [
- "tokenizer"
+ "description": "Library for parsing CLI options",
+ "homepage": "https://github.com/sebastianbergmann/cli-parser",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/cli-parser/issues",
+ "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
],
- "time": "2019-09-17T06:23:10+00:00"
+ "time": "2024-03-02T06:27:43+00:00"
},
{
- "name": "phpunit/phpunit",
- "version": "8.5.3",
+ "name": "sebastian/code-unit",
+ "version": "1.0.8",
"source": {
"type": "git",
- "url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "67750516bc02f300e2742fed2f50177f8f37bedf"
+ "url": "https://github.com/sebastianbergmann/code-unit.git",
+ "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/67750516bc02f300e2742fed2f50177f8f37bedf",
- "reference": "67750516bc02f300e2742fed2f50177f8f37bedf",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120",
+ "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120",
"shasum": ""
},
"require": {
- "doctrine/instantiator": "^1.2.0",
- "ext-dom": "*",
- "ext-json": "*",
- "ext-libxml": "*",
- "ext-mbstring": "*",
- "ext-xml": "*",
- "ext-xmlwriter": "*",
- "myclabs/deep-copy": "^1.9.1",
- "phar-io/manifest": "^1.0.3",
- "phar-io/version": "^2.0.1",
- "php": "^7.2",
- "phpspec/prophecy": "^1.8.1",
- "phpunit/php-code-coverage": "^7.0.7",
- "phpunit/php-file-iterator": "^2.0.2",
- "phpunit/php-text-template": "^1.2.1",
- "phpunit/php-timer": "^2.1.2",
- "sebastian/comparator": "^3.0.2",
- "sebastian/diff": "^3.0.2",
- "sebastian/environment": "^4.2.2",
- "sebastian/exporter": "^3.1.1",
- "sebastian/global-state": "^3.0.0",
- "sebastian/object-enumerator": "^3.0.3",
- "sebastian/resource-operations": "^2.0.1",
- "sebastian/type": "^1.1.3",
- "sebastian/version": "^2.0.1"
+ "php": ">=7.3"
},
"require-dev": {
- "ext-pdo": "*"
- },
- "suggest": {
- "ext-soap": "*",
- "ext-xdebug": "*",
- "phpunit/php-invoker": "^2.0.0"
+ "phpunit/phpunit": "^9.3"
},
- "bin": [
- "phpunit"
- ],
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "8.5-dev"
+ "dev-master": "1.0-dev"
}
},
"autoload": {
@@ -1485,39 +1892,44 @@
"role": "lead"
}
],
- "description": "The PHP Unit Testing framework.",
- "homepage": "https://phpunit.de/",
- "keywords": [
- "phpunit",
- "testing",
- "xunit"
- ],
- "time": "2020-03-31T08:52:04+00:00"
+ "description": "Collection of value objects that represent the PHP code units",
+ "homepage": "https://github.com/sebastianbergmann/code-unit",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/code-unit/issues",
+ "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-26T13:08:54+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
- "version": "1.0.1",
+ "version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
+ "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
- "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
+ "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
"shasum": ""
},
"require": {
- "php": "^5.6 || ^7.0"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^5.7 || ^6.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -1537,34 +1949,44 @@
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
- "time": "2017-03-04T06:30:41+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
+ "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-09-28T05:30:19+00:00"
},
{
"name": "sebastian/comparator",
- "version": "3.0.2",
+ "version": "4.0.9",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da"
+ "reference": "67a2df3a62639eab2cc5906065e9805d4fd5dfc5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da",
- "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/67a2df3a62639eab2cc5906065e9805d4fd5dfc5",
+ "reference": "67a2df3a62639eab2cc5906065e9805d4fd5dfc5",
"shasum": ""
},
"require": {
- "php": "^7.1",
- "sebastian/diff": "^3.0",
- "sebastian/exporter": "^3.1"
+ "php": ">=7.3",
+ "sebastian/diff": "^4.0",
+ "sebastian/exporter": "^4.0"
},
"require-dev": {
- "phpunit/phpunit": "^7.1"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.0-dev"
+ "dev-master": "4.0-dev"
}
},
"autoload": {
@@ -1577,6 +1999,10 @@
"BSD-3-Clause"
],
"authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
@@ -1588,10 +2014,6 @@
{
"name": "Bernhard Schussek",
"email": "bschussek@2bepublished.at"
- },
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
}
],
"description": "Provides the functionality to compare PHP values for equality",
@@ -1601,33 +2023,112 @@
"compare",
"equality"
],
- "time": "2018-07-12T15:12:46+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/comparator/issues",
+ "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.9"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ },
+ {
+ "url": "https://liberapay.com/sebastianbergmann",
+ "type": "liberapay"
+ },
+ {
+ "url": "https://thanks.dev/u/gh/sebastianbergmann",
+ "type": "thanks_dev"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2025-08-10T06:51:50+00:00"
+ },
+ {
+ "name": "sebastian/complexity",
+ "version": "2.0.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/complexity.git",
+ "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a",
+ "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a",
+ "shasum": ""
+ },
+ "require": {
+ "nikic/php-parser": "^4.18 || ^5.0",
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library for calculating the complexity of PHP code units",
+ "homepage": "https://github.com/sebastianbergmann/complexity",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/complexity/issues",
+ "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2023-12-22T06:19:30+00:00"
},
{
"name": "sebastian/diff",
- "version": "3.0.2",
+ "version": "4.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29"
+ "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29",
- "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc",
+ "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^7.5 || ^8.0",
- "symfony/process": "^2 || ^3.3 || ^4"
+ "phpunit/phpunit": "^9.3",
+ "symfony/process": "^4.2 || ^5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.0-dev"
+ "dev-master": "4.0-dev"
}
},
"autoload": {
@@ -1640,13 +2141,13 @@
"BSD-3-Clause"
],
"authors": [
- {
- "name": "Kore Nordmann",
- "email": "mail@kore-nordmann.de"
- },
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Kore Nordmann",
+ "email": "mail@kore-nordmann.de"
}
],
"description": "Diff implementation",
@@ -1657,27 +2158,37 @@
"unidiff",
"unified diff"
],
- "time": "2019-02-04T06:01:07+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/diff/issues",
+ "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-02T06:30:58+00:00"
},
{
"name": "sebastian/environment",
- "version": "4.2.3",
+ "version": "5.1.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368"
+ "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368",
- "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
+ "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^7.5"
+ "phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-posix": "*"
@@ -1685,7 +2196,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.2-dev"
+ "dev-master": "5.1-dev"
}
},
"autoload": {
@@ -1710,34 +2221,44 @@
"environment",
"hhvm"
],
- "time": "2019-11-20T08:46:58+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/environment/issues",
+ "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2023-02-03T06:03:51+00:00"
},
{
"name": "sebastian/exporter",
- "version": "3.1.2",
+ "version": "4.0.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e"
+ "reference": "14c6ba52f95a36c3d27c835d65efc7123c446e8c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e",
- "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/14c6ba52f95a36c3d27c835d65efc7123c446e8c",
+ "reference": "14c6ba52f95a36c3d27c835d65efc7123c446e8c",
"shasum": ""
},
"require": {
- "php": "^7.0",
- "sebastian/recursion-context": "^3.0"
+ "php": ">=7.3",
+ "sebastian/recursion-context": "^4.0"
},
"require-dev": {
"ext-mbstring": "*",
- "phpunit/phpunit": "^6.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1.x-dev"
+ "dev-master": "4.0-dev"
}
},
"autoload": {
@@ -1772,35 +2293,57 @@
}
],
"description": "Provides the functionality to export PHP variables for visualization",
- "homepage": "http://www.github.com/sebastianbergmann/exporter",
+ "homepage": "https://www.github.com/sebastianbergmann/exporter",
"keywords": [
"export",
"exporter"
],
- "time": "2019-09-14T09:02:43+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/exporter/issues",
+ "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.8"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ },
+ {
+ "url": "https://liberapay.com/sebastianbergmann",
+ "type": "liberapay"
+ },
+ {
+ "url": "https://thanks.dev/u/gh/sebastianbergmann",
+ "type": "thanks_dev"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2025-09-24T06:03:27+00:00"
},
{
"name": "sebastian/global-state",
- "version": "3.0.0",
+ "version": "5.0.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4"
+ "reference": "b6781316bdcd28260904e7cc18ec983d0d2ef4f6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4",
- "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/b6781316bdcd28260904e7cc18ec983d0d2ef4f6",
+ "reference": "b6781316bdcd28260904e7cc18ec983d0d2ef4f6",
"shasum": ""
},
"require": {
- "php": "^7.2",
- "sebastian/object-reflector": "^1.1.1",
- "sebastian/recursion-context": "^3.0"
+ "php": ">=7.3",
+ "sebastian/object-reflector": "^2.0",
+ "sebastian/recursion-context": "^4.0"
},
"require-dev": {
"ext-dom": "*",
- "phpunit/phpunit": "^8.0"
+ "phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-uopz": "*"
@@ -1808,7 +2351,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.0-dev"
+ "dev-master": "5.0-dev"
}
},
"autoload": {
@@ -1831,34 +2374,113 @@
"keywords": [
"global state"
],
- "time": "2019-02-01T05:30:01+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/global-state/issues",
+ "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.8"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ },
+ {
+ "url": "https://liberapay.com/sebastianbergmann",
+ "type": "liberapay"
+ },
+ {
+ "url": "https://thanks.dev/u/gh/sebastianbergmann",
+ "type": "thanks_dev"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/sebastian/global-state",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2025-08-10T07:10:35+00:00"
+ },
+ {
+ "name": "sebastian/lines-of-code",
+ "version": "1.0.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/lines-of-code.git",
+ "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5",
+ "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5",
+ "shasum": ""
+ },
+ "require": {
+ "nikic/php-parser": "^4.18 || ^5.0",
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library for counting the lines of code in PHP source code",
+ "homepage": "https://github.com/sebastianbergmann/lines-of-code",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
+ "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2023-12-22T06:20:34+00:00"
},
{
"name": "sebastian/object-enumerator",
- "version": "3.0.3",
+ "version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5"
+ "reference": "5c9eeac41b290a3712d88851518825ad78f45c71"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5",
- "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71",
+ "reference": "5c9eeac41b290a3712d88851518825ad78f45c71",
"shasum": ""
},
"require": {
- "php": "^7.0",
- "sebastian/object-reflector": "^1.1.1",
- "sebastian/recursion-context": "^3.0"
+ "php": ">=7.3",
+ "sebastian/object-reflector": "^2.0",
+ "sebastian/recursion-context": "^4.0"
},
"require-dev": {
- "phpunit/phpunit": "^6.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.0.x-dev"
+ "dev-master": "4.0-dev"
}
},
"autoload": {
@@ -1878,32 +2500,42 @@
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
- "time": "2017-08-03T12:35:26+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
+ "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-26T13:12:34+00:00"
},
{
"name": "sebastian/object-reflector",
- "version": "1.1.1",
+ "version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git",
- "reference": "773f97c67f28de00d397be301821b06708fca0be"
+ "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be",
- "reference": "773f97c67f28de00d397be301821b06708fca0be",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
+ "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
"shasum": ""
},
"require": {
- "php": "^7.0"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^6.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.1-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -1923,32 +2555,42 @@
],
"description": "Allows reflection of object attributes, including inherited and non-public ones",
"homepage": "https://github.com/sebastianbergmann/object-reflector/",
- "time": "2017-03-29T09:07:27+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/object-reflector/issues",
+ "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-26T13:14:26+00:00"
},
{
"name": "sebastian/recursion-context",
- "version": "3.0.0",
+ "version": "4.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8"
+ "reference": "539c6691e0623af6dc6f9c20384c120f963465a0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
- "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/539c6691e0623af6dc6f9c20384c120f963465a0",
+ "reference": "539c6691e0623af6dc6f9c20384c120f963465a0",
"shasum": ""
},
"require": {
- "php": "^7.0"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^6.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.0.x-dev"
+ "dev-master": "4.0-dev"
}
},
"autoload": {
@@ -1961,44 +2603,69 @@
"BSD-3-Clause"
],
"authors": [
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
+ {
+ "name": "Jeff Welch",
+ "email": "whatthejeff@gmail.com"
+ },
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
}
],
"description": "Provides functionality to recursively process PHP variables",
- "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
- "time": "2017-03-03T06:23:57+00:00"
+ "homepage": "https://github.com/sebastianbergmann/recursion-context",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/recursion-context/issues",
+ "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.6"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ },
+ {
+ "url": "https://liberapay.com/sebastianbergmann",
+ "type": "liberapay"
+ },
+ {
+ "url": "https://thanks.dev/u/gh/sebastianbergmann",
+ "type": "thanks_dev"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2025-08-10T06:57:39+00:00"
},
{
"name": "sebastian/resource-operations",
- "version": "2.0.1",
+ "version": "3.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/resource-operations.git",
- "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9"
+ "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9",
- "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9",
+ "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e",
+ "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-main": "3.0-dev"
}
},
"autoload": {
@@ -2018,32 +2685,41 @@
],
"description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
- "time": "2018-10-04T04:07:39+00:00"
+ "support": {
+ "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-14T16:00:52+00:00"
},
{
"name": "sebastian/type",
- "version": "1.1.3",
+ "version": "3.2.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
- "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3"
+ "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3",
- "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
+ "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
"shasum": ""
},
"require": {
- "php": "^7.2"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^8.2"
+ "phpunit/phpunit": "^9.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.1-dev"
+ "dev-master": "3.2-dev"
}
},
"autoload": {
@@ -2064,29 +2740,39 @@
],
"description": "Collection of value objects that represent the types of the PHP type system",
"homepage": "https://github.com/sebastianbergmann/type",
- "time": "2019-07-02T08:10:15+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/type/issues",
+ "source": "https://github.com/sebastianbergmann/type/tree/3.2.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2023-02-03T06:13:03+00:00"
},
{
"name": "sebastian/version",
- "version": "2.0.1",
+ "version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/version.git",
- "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
+ "reference": "c6c1022351a901512170118436c764e473f6de8c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
- "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c",
+ "reference": "c6c1022351a901512170118436c764e473f6de8c",
"shasum": ""
},
"require": {
- "php": ">=5.6"
+ "php": ">=7.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
@@ -2107,27 +2793,37 @@
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
- "time": "2016-10-03T07:35:21+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/version/issues",
+ "source": "https://github.com/sebastianbergmann/version/tree/3.0.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-09-28T06:39:44+00:00"
},
{
"name": "theseer/tokenizer",
- "version": "1.1.3",
+ "version": "1.2.3",
"source": {
"type": "git",
"url": "https://github.com/theseer/tokenizer.git",
- "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9"
+ "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
- "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
+ "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2",
+ "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
- "php": "^7.0"
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"autoload": {
@@ -2147,68 +2843,30 @@
}
],
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
- "time": "2019-06-13T22:48:21+00:00"
- },
- {
- "name": "webmozart/assert",
- "version": "1.7.0",
- "source": {
- "type": "git",
- "url": "https://github.com/webmozart/assert.git",
- "reference": "aed98a490f9a8f78468232db345ab9cf606cf598"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598",
- "reference": "aed98a490f9a8f78468232db345ab9cf606cf598",
- "shasum": ""
- },
- "require": {
- "php": "^5.3.3 || ^7.0",
- "symfony/polyfill-ctype": "^1.8"
- },
- "conflict": {
- "vimeo/psalm": "<3.6.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^4.8.36 || ^7.5.13"
+ "support": {
+ "issues": "https://github.com/theseer/tokenizer/issues",
+ "source": "https://github.com/theseer/tokenizer/tree/1.2.3"
},
- "type": "library",
- "autoload": {
- "psr-4": {
- "Webmozart\\Assert\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
+ "funding": [
{
- "name": "Bernhard Schussek",
- "email": "bschussek@gmail.com"
+ "url": "https://github.com/theseer",
+ "type": "github"
}
],
- "description": "Assertions to validate method input/output with nice error messages.",
- "keywords": [
- "assert",
- "check",
- "validate"
- ],
- "time": "2020-02-14T12:15:55+00:00"
+ "time": "2024-03-03T12:36:25+00:00"
}
],
"aliases": [],
"minimum-stability": "stable",
- "stability-flags": [],
+ "stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
- "php": ">=7.2.29"
+ "php": "^8.1"
},
- "platform-dev": [],
+ "platform-dev": {},
"platform-overrides": {
- "php": "7.2.29"
+ "php": "8.1.0"
},
- "plugin-api-version": "1.1.0"
+ "plugin-api-version": "2.6.0"
}
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 3466e2b..864fd74 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -1,18 +1,19 @@
-
-
- ./tests
-
-
-
-
- ./src
-
-
-
-
-
-
-
-
-
+
+
+
+
+ ./src
+
+
+
+
+
+
+
+
+ ./tests
+
+
+
+
diff --git a/src/PHPSemVerChecker/Analyzer/Analyzer.php b/src/PHPSemVerChecker/Analyzer/Analyzer.php
index e8f35a5..34e8c3a 100644
--- a/src/PHPSemVerChecker/Analyzer/Analyzer.php
+++ b/src/PHPSemVerChecker/Analyzer/Analyzer.php
@@ -1,4 +1,5 @@
context = $context;
$this->fileBefore = $fileBefore;
@@ -52,7 +53,7 @@ public function __construct($context, $fileBefore = null, $fileAfter = null)
* @param \PhpParser\Node\Stmt $contextAfter
* @return \PHPSemVerChecker\Report\Report
*/
- public function analyze(Stmt $contextBefore, Stmt $contextAfter)
+ public function analyze(Stmt $contextBefore, Stmt $contextAfter): Report
{
$report = new Report();
@@ -61,12 +62,12 @@ public function analyze(Stmt $contextBefore, Stmt $contextAfter)
$methodsBeforeKeyed = [];
foreach ($methodsBefore as $method) {
- $methodsBeforeKeyed[strtolower($method->name)] = $method;
+ $methodsBeforeKeyed[$method->name->toLowerString()] = $method;
}
$methodsAfterKeyed = [];
foreach ($methodsAfter as $method) {
- $methodsAfterKeyed[strtolower($method->name)] = $method;
+ $methodsAfterKeyed[$method->name->toLowerString()] = $method;
}
$methodNamesBefore = array_keys($methodsBeforeKeyed);
diff --git a/src/PHPSemVerChecker/Analyzer/FunctionAnalyzer.php b/src/PHPSemVerChecker/Analyzer/FunctionAnalyzer.php
index 3d8fc60..2559da2 100644
--- a/src/PHPSemVerChecker/Analyzer/FunctionAnalyzer.php
+++ b/src/PHPSemVerChecker/Analyzer/FunctionAnalyzer.php
@@ -1,4 +1,5 @@
context = $context;
$this->fileBefore = $fileBefore;
@@ -40,7 +41,7 @@ public function __construct($context, $fileBefore = null, $fileAfter = null)
* @param \PhpParser\Node\Stmt $contextAfter
* @return \PHPSemVerChecker\Report\Report
*/
- public function analyze(Stmt $contextBefore, Stmt $contextAfter)
+ public function analyze(Stmt $contextBefore, Stmt $contextAfter): Report
{
$report = new Report();
@@ -82,7 +83,7 @@ public function analyze(Stmt $contextBefore, Stmt $contextAfter)
* @param \PhpParser\Node\Stmt $context
* @return array
*/
- protected function getProperties(Stmt $context)
+ protected function getProperties(Stmt $context): array
{
$properties = [];
foreach ($context->stmts as $stmt) {
@@ -97,7 +98,7 @@ protected function getProperties(Stmt $context)
* @param \PhpParser\Node\Stmt\Property $property
* @return string
*/
- protected function getName(Property $property)
+ protected function getName(Property $property): string
{
return $property->props[0]->name->toString();
}
diff --git a/src/PHPSemVerChecker/Analyzer/TraitAnalyzer.php b/src/PHPSemVerChecker/Analyzer/TraitAnalyzer.php
index b81e53d..e5761b5 100644
--- a/src/PHPSemVerChecker/Analyzer/TraitAnalyzer.php
+++ b/src/PHPSemVerChecker/Analyzer/TraitAnalyzer.php
@@ -1,4 +1,5 @@
getType() !== $nodeB->getType()) {
return false;
diff --git a/src/PHPSemVerChecker/Comparator/Signature.php b/src/PHPSemVerChecker/Comparator/Signature.php
index 81a9b2f..f66e950 100644
--- a/src/PHPSemVerChecker/Comparator/Signature.php
+++ b/src/PHPSemVerChecker/Comparator/Signature.php
@@ -1,4 +1,5 @@
false,
diff --git a/src/PHPSemVerChecker/Comparator/Type.php b/src/PHPSemVerChecker/Comparator/Type.php
index 3c1062a..ee08512 100644
--- a/src/PHPSemVerChecker/Comparator/Type.php
+++ b/src/PHPSemVerChecker/Comparator/Type.php
@@ -1,8 +1,10 @@
type);
+ return '?' . static::get($type->type);
+ }
+
+ if ($type instanceof UnionType) {
+ $types = [];
+ foreach ($type->types as $unionType) {
+ $types[] = static::get($unionType);
+ }
+ // Sort to ensure consistent comparison even with different order of types
+ sort($types);
+ return implode('|', $types);
}
return $type->toString();
diff --git a/src/PHPSemVerChecker/Configuration/Configuration.php b/src/PHPSemVerChecker/Configuration/Configuration.php
index 81d1202..0ff122e 100644
--- a/src/PHPSemVerChecker/Configuration/Configuration.php
+++ b/src/PHPSemVerChecker/Configuration/Configuration.php
@@ -1,4 +1,5 @@
mapping;
}
/**
- * @see \Noodlehaus\Config::get
* @param string $key
* @param mixed|null $default
* @return array|mixed|null
+ *@see \Noodlehaus\Config::get
*/
- public function get($key, $default = null)
+ public function get(string $key, $default = null)
{
return $this->config->get($key, $default);
}
/**
- * @see \Noodlehaus\Config::set
* @param string $key
* @param mixed $value
+ *@see \Noodlehaus\Config::set
*/
- public function set($key, $value)
+ public function set(string $key, $value)
{
$this->config->set($key, $value);
}
@@ -93,7 +94,7 @@ public function set($key, $value)
*
* @param array $data
*/
- public function merge($data)
+ public function merge(array $data)
{
foreach ($data as $key => $value) {
$this->set($key, $value);
diff --git a/src/PHPSemVerChecker/Configuration/LevelMapping.php b/src/PHPSemVerChecker/Configuration/LevelMapping.php
index 5bd98ad..f2806e1 100644
--- a/src/PHPSemVerChecker/Configuration/LevelMapping.php
+++ b/src/PHPSemVerChecker/Configuration/LevelMapping.php
@@ -1,4 +1,5 @@
add(new CompareCommand());
return $commands;
}
diff --git a/src/PHPSemVerChecker/Console/Command/BaseCommand.php b/src/PHPSemVerChecker/Console/Command/BaseCommand.php
index ff3364e..4050863 100644
--- a/src/PHPSemVerChecker/Console/Command/BaseCommand.php
+++ b/src/PHPSemVerChecker/Console/Command/BaseCommand.php
@@ -1,4 +1,5 @@
analyze($registryBefore, $registryAfter);
$reporter = new Reporter($report);
- $reporter->setFullPath($this->config->get('full-path'));
+ $reporter->setFullPath((bool)$this->config->get('full-path'));
$reporter->output($output);
$toJson = $this->config->get('to-json');
@@ -88,5 +89,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->writeln('');
$output->writeln('[Scanned files] Before: ' . count($sourceBefore) . ', After: ' . count($sourceAfter) . ', Identical: ' . $identicalCount);
$output->writeln('Time: ' . round($duration, 3) . ' seconds, Memory: ' . round(memory_get_peak_usage() / 1024 / 1024, 3) . ' MB');
+
+ return 0;
}
}
diff --git a/src/PHPSemVerChecker/Console/InputMerger.php b/src/PHPSemVerChecker/Console/InputMerger.php
index cec8b0f..3f5d3aa 100644
--- a/src/PHPSemVerChecker/Console/InputMerger.php
+++ b/src/PHPSemVerChecker/Console/InputMerger.php
@@ -1,4 +1,5 @@
arguments[$name]);
}
@@ -25,7 +26,7 @@ public function hasArgumentSet($name)
*
* @return bool true if the option is set (not a default value)
*/
- public function hasOptionSet($name)
+ public function hasOptionSet(string $name): bool
{
return isset($this->options[$name]);
}
diff --git a/src/PHPSemVerChecker/Filter/SourceFilter.php b/src/PHPSemVerChecker/Filter/SourceFilter.php
index 47a4f08..58b42f8 100644
--- a/src/PHPSemVerChecker/Filter/SourceFilter.php
+++ b/src/PHPSemVerChecker/Filter/SourceFilter.php
@@ -1,4 +1,5 @@
ignoreDotFiles(true)
@@ -37,23 +38,23 @@ public function find($path, array $includes, array $excludes = [])
}
/**
- * @param string $path
- * @param string $includes
- * @param string $excludes
+ * @param string $path
+ * @param string|null $includes
+ * @param string|null $excludes
* @return array
*/
- public function findFromString($path, $includes, $excludes)
+ public function findFromString(string $path, ?string $includes, ?string $excludes): array
{
- if ($includes === '*') {
+ if ($includes === '*' || $includes === null) {
$includes = [];
} else {
- $includes = preg_split('@(?:\s*,\s*|^\s*|\s*$)@', $includes, null, PREG_SPLIT_NO_EMPTY);
+ $includes = preg_split('@(?:\s*,\s*|^\s*|\s*$)@', $includes, -1, PREG_SPLIT_NO_EMPTY);
}
- if ($excludes === '*') {
+ if ($excludes === '*' || $excludes === null) {
$excludes = [];
} else {
- $excludes = preg_split('@(?:\s*,\s*|^\s*|\s*$)@', $excludes, null, PREG_SPLIT_NO_EMPTY);
+ $excludes = preg_split('@(?:\s*,\s*|^\s*|\s*$)@', $excludes, -1, PREG_SPLIT_NO_EMPTY);
}
return $this->find($path, $includes, $excludes);
diff --git a/src/PHPSemVerChecker/Node/Statement/ClassMethod.php b/src/PHPSemVerChecker/Node/Statement/ClassMethod.php
index 6cdbbed..0e00156 100644
--- a/src/PHPSemVerChecker/Node/Statement/ClassMethod.php
+++ b/src/PHPSemVerChecker/Node/Statement/ClassMethod.php
@@ -1,4 +1,5 @@
name->toString();
if (isset($context->namespacedName)) {
diff --git a/src/PHPSemVerChecker/Node/Statement/Class_.php b/src/PHPSemVerChecker/Node/Statement/Class_.php
index 94f74bb..ce88457 100644
--- a/src/PHPSemVerChecker/Node/Statement/Class_.php
+++ b/src/PHPSemVerChecker/Node/Statement/Class_.php
@@ -1,4 +1,5 @@
namespacedName)) {
return $class->namespacedName->toString();
diff --git a/src/PHPSemVerChecker/Node/Statement/Function_.php b/src/PHPSemVerChecker/Node/Statement/Function_.php
index 2774da1..062d01a 100644
--- a/src/PHPSemVerChecker/Node/Statement/Function_.php
+++ b/src/PHPSemVerChecker/Node/Statement/Function_.php
@@ -1,4 +1,5 @@
namespacedName)) {
return $function->namespacedName->toString() . '::' . $function->name->toString();
diff --git a/src/PHPSemVerChecker/Node/Statement/Interface_.php b/src/PHPSemVerChecker/Node/Statement/Interface_.php
index 032c0ad..a505dce 100644
--- a/src/PHPSemVerChecker/Node/Statement/Interface_.php
+++ b/src/PHPSemVerChecker/Node/Statement/Interface_.php
@@ -1,4 +1,5 @@
namespacedName)) {
return $interface->namespacedName->toString();
diff --git a/src/PHPSemVerChecker/Node/Statement/Property.php b/src/PHPSemVerChecker/Node/Statement/Property.php
index c55ab84..33479bd 100644
--- a/src/PHPSemVerChecker/Node/Statement/Property.php
+++ b/src/PHPSemVerChecker/Node/Statement/Property.php
@@ -1,4 +1,5 @@
name;
if (isset($context->namespacedName)) {
diff --git a/src/PHPSemVerChecker/Node/Statement/Trait_.php b/src/PHPSemVerChecker/Node/Statement/Trait_.php
index bd09d8b..667c43b 100644
--- a/src/PHPSemVerChecker/Node/Statement/Trait_.php
+++ b/src/PHPSemVerChecker/Node/Statement/Trait_.php
@@ -1,4 +1,5 @@
namespacedName)) {
return $trait->namespacedName->toString();
diff --git a/src/PHPSemVerChecker/Operation/ClassAdded.php b/src/PHPSemVerChecker/Operation/ClassAdded.php
index ce33eed..7b03cf2 100644
--- a/src/PHPSemVerChecker/Operation/ClassAdded.php
+++ b/src/PHPSemVerChecker/Operation/ClassAdded.php
@@ -1,4 +1,5 @@
context = $context;
@@ -71,7 +72,7 @@ public function __construct($context,
/**
* @return string
*/
- public function getLocation()
+ public function getLocation(): string
{
return $this->fileAfter;
}
@@ -79,7 +80,7 @@ public function getLocation()
/**
* @return int
*/
- public function getLine()
+ public function getLine(): int
{
return $this->classMethodAfter->getLine();
}
@@ -87,7 +88,7 @@ public function getLine()
/**
* @return string
*/
- public function getTarget()
+ public function getTarget(): string
{
return PClassMethod::getFullyQualifiedName($this->contextAfter, $this->classMethodAfter);
}
@@ -95,7 +96,7 @@ public function getTarget()
/**
* @return string
*/
- public function getCode()
+ public function getCode(): string
{
return $this->code[$this->context][Visibility::get($this->visibility)];
}
@@ -103,7 +104,7 @@ public function getCode()
/**
* @return string
*/
- public function getReason()
+ public function getReason(): string
{
return '[' . Visibility::toString($this->visibility) . '] ' . $this->reason;
}
@@ -112,7 +113,7 @@ public function getReason()
* @param mixed $context
* @return int
*/
- protected function getVisibility($context)
+ protected function getVisibility($context): int
{
return Visibility::getForContext($context);
}
diff --git a/src/PHPSemVerChecker/Operation/ClassMethodOperationUnary.php b/src/PHPSemVerChecker/Operation/ClassMethodOperationUnary.php
index 548e0ff..f93012b 100644
--- a/src/PHPSemVerChecker/Operation/ClassMethodOperationUnary.php
+++ b/src/PHPSemVerChecker/Operation/ClassMethodOperationUnary.php
@@ -1,4 +1,5 @@
context = $context;
$this->visibility = $this->getVisibility($classMethod);
@@ -47,7 +48,7 @@ public function __construct($context, $file, Stmt $contextValue, ClassMethod $cl
/**
* @return string
*/
- public function getLocation()
+ public function getLocation(): string
{
return $this->file;
}
@@ -55,7 +56,7 @@ public function getLocation()
/**
* @return int
*/
- public function getLine()
+ public function getLine(): int
{
return $this->classMethod->getLine();
}
@@ -63,7 +64,7 @@ public function getLine()
/**
* @return string
*/
- public function getTarget()
+ public function getTarget(): string
{
return PClassMethod::getFullyQualifiedName($this->contextValue, $this->classMethod);
}
@@ -71,7 +72,7 @@ public function getTarget()
/**
* @return string
*/
- public function getCode()
+ public function getCode(): string
{
return $this->code[$this->context][Visibility::get($this->visibility)];
}
@@ -79,7 +80,7 @@ public function getCode()
/**
* @return string
*/
- public function getReason()
+ public function getReason(): string
{
return '[' . Visibility::toString($this->visibility) . '] ' . $this->reason;
}
@@ -88,7 +89,7 @@ public function getReason()
* @param mixed $context
* @return int
*/
- protected function getVisibility($context)
+ protected function getVisibility($context): int
{
return Visibility::getForContext($context);
}
diff --git a/src/PHPSemVerChecker/Operation/ClassMethodParameterAdded.php b/src/PHPSemVerChecker/Operation/ClassMethodParameterAdded.php
index 5cabc3f..f121b15 100644
--- a/src/PHPSemVerChecker/Operation/ClassMethodParameterAdded.php
+++ b/src/PHPSemVerChecker/Operation/ClassMethodParameterAdded.php
@@ -1,4 +1,5 @@
fileAfter;
}
@@ -47,7 +48,7 @@ public function getLocation()
/**
* @return int
*/
- public function getLine()
+ public function getLine(): int
{
return $this->classAfter->getLine();
}
@@ -55,7 +56,7 @@ public function getLine()
/**
* @return string
*/
- public function getTarget()
+ public function getTarget(): string
{
return PClass::getFullyQualifiedName($this->classAfter);
}
diff --git a/src/PHPSemVerChecker/Operation/ClassOperationUnary.php b/src/PHPSemVerChecker/Operation/ClassOperationUnary.php
index 47bed1d..3b8e550 100644
--- a/src/PHPSemVerChecker/Operation/ClassOperationUnary.php
+++ b/src/PHPSemVerChecker/Operation/ClassOperationUnary.php
@@ -1,4 +1,5 @@
file = $file;
$this->class = $class;
@@ -29,7 +30,7 @@ public function __construct($file, Class_ $class)
/**
* @return string
*/
- public function getLocation()
+ public function getLocation(): string
{
return $this->file;
}
@@ -37,7 +38,7 @@ public function getLocation()
/**
* @return int
*/
- public function getLine()
+ public function getLine(): int
{
return $this->class->getLine();
}
@@ -45,7 +46,7 @@ public function getLine()
/**
* @return string
*/
- public function getTarget()
+ public function getTarget(): string
{
return PClass::getFullyQualifiedName($this->class);
}
diff --git a/src/PHPSemVerChecker/Operation/ClassRemoved.php b/src/PHPSemVerChecker/Operation/ClassRemoved.php
index 8859e08..cb89bc1 100644
--- a/src/PHPSemVerChecker/Operation/ClassRemoved.php
+++ b/src/PHPSemVerChecker/Operation/ClassRemoved.php
@@ -1,4 +1,5 @@
fileBefore = $fileBefore;
$this->functionBefore = $functionBefore;
@@ -41,7 +42,7 @@ public function __construct($fileBefore, Function_ $functionBefore, $fileAfter,
/**
* @return string
*/
- public function getLocation()
+ public function getLocation(): string
{
return $this->fileBefore;
}
@@ -49,7 +50,7 @@ public function getLocation()
/**
* @return int
*/
- public function getLine()
+ public function getLine(): int
{
return $this->functionAfter->getLine();
}
@@ -57,7 +58,7 @@ public function getLine()
/**
* @return string
*/
- public function getTarget()
+ public function getTarget(): string
{
return PFunction::getFullyQualifiedName($this->functionAfter);
}
diff --git a/src/PHPSemVerChecker/Operation/FunctionOperationUnary.php b/src/PHPSemVerChecker/Operation/FunctionOperationUnary.php
index 9787e4d..e080c44 100644
--- a/src/PHPSemVerChecker/Operation/FunctionOperationUnary.php
+++ b/src/PHPSemVerChecker/Operation/FunctionOperationUnary.php
@@ -1,4 +1,5 @@
file = $file;
$this->function = $function;
@@ -29,7 +30,7 @@ public function __construct($file, Function_ $function)
/**
* @return string
*/
- public function getLocation()
+ public function getLocation(): string
{
return $this->file;
}
@@ -37,7 +38,7 @@ public function getLocation()
/**
* @return int
*/
- public function getLine()
+ public function getLine(): int
{
return $this->function->getLine();
}
@@ -45,7 +46,7 @@ public function getLine()
/**
* @return string
*/
- public function getTarget()
+ public function getTarget(): string
{
return PFunction::getFullyQualifiedName($this->function);
}
diff --git a/src/PHPSemVerChecker/Operation/FunctionParameterAdded.php b/src/PHPSemVerChecker/Operation/FunctionParameterAdded.php
index 1789dbc..4dd7cc7 100644
--- a/src/PHPSemVerChecker/Operation/FunctionParameterAdded.php
+++ b/src/PHPSemVerChecker/Operation/FunctionParameterAdded.php
@@ -1,4 +1,5 @@
fileBefore = $fileBefore;
$this->interfaceBefore = $interfaceBefore;
@@ -39,7 +42,7 @@ public function __construct($fileBefore, Interface_ $interfaceBefore, $fileAfter
/**
* @return string
*/
- public function getLocation()
+ public function getLocation(): string
{
return $this->fileAfter;
}
@@ -47,7 +50,7 @@ public function getLocation()
/**
* @return int
*/
- public function getLine()
+ public function getLine(): int
{
return $this->interfaceAfter->getLine();
}
@@ -55,7 +58,7 @@ public function getLine()
/**
* @return string
*/
- public function getTarget()
+ public function getTarget(): string
{
return PInterface::getFullyQualifiedName($this->interfaceAfter);
}
diff --git a/src/PHPSemVerChecker/Operation/InterfaceOperationUnary.php b/src/PHPSemVerChecker/Operation/InterfaceOperationUnary.php
index 3e844cf..267f63f 100644
--- a/src/PHPSemVerChecker/Operation/InterfaceOperationUnary.php
+++ b/src/PHPSemVerChecker/Operation/InterfaceOperationUnary.php
@@ -1,4 +1,5 @@
file = $fileAfter;
$this->interface = $interface;
@@ -29,7 +30,7 @@ public function __construct($fileAfter, Interface_ $interface)
/**
* @return string
*/
- public function getLocation()
+ public function getLocation(): string
{
return $this->file;
}
@@ -37,7 +38,7 @@ public function getLocation()
/**
* @return int
*/
- public function getLine()
+ public function getLine(): int
{
return $this->interface->getLine();
}
@@ -45,7 +46,7 @@ public function getLine()
/**
* @return string
*/
- public function getTarget()
+ public function getTarget(): string
{
return PInterface::getFullyQualifiedName($this->interface);
}
diff --git a/src/PHPSemVerChecker/Operation/InterfaceRemoved.php b/src/PHPSemVerChecker/Operation/InterfaceRemoved.php
index 61d3fc3..436c082 100644
--- a/src/PHPSemVerChecker/Operation/InterfaceRemoved.php
+++ b/src/PHPSemVerChecker/Operation/InterfaceRemoved.php
@@ -1,4 +1,5 @@
code;
}
@@ -31,7 +32,7 @@ public function getCode()
* @param string $code
* @return $this
*/
- public function setCode($code)
+ public function setCode(string $code): Operation
{
$this->code = $code;
@@ -41,7 +42,7 @@ public function setCode($code)
/**
* @return int
*/
- public function getLevel()
+ public function getLevel(): int
{
return LevelMapping::getLevelForCode($this->getCode());
}
@@ -49,7 +50,7 @@ public function getLevel()
/**
* @return string
*/
- public function getReason()
+ public function getReason(): string
{
return $this->reason;
}
@@ -58,7 +59,7 @@ public function getReason()
* @param string $reason
* @return $this
*/
- public function setReason($reason)
+ public function setReason(string $reason): Operation
{
$this->reason = $reason;
@@ -68,17 +69,17 @@ public function setReason($reason)
/**
* @return string
*/
- public abstract function getLocation();
+ public abstract function getLocation(): string;
/**
* @return int
*/
- public abstract function getLine();
+ public abstract function getLine(): int;
/**
* @return string
*/
- public function getTarget()
+ public function getTarget(): string
{
return $this->target;
}
@@ -87,7 +88,7 @@ public function getTarget()
* @param string $target
* @return $this
*/
- public function setTarget($target)
+ public function setTarget(string $target): Operation
{
$this->target = $target;
diff --git a/src/PHPSemVerChecker/Operation/PropertyAdded.php b/src/PHPSemVerChecker/Operation/PropertyAdded.php
index 73da034..f243469 100644
--- a/src/PHPSemVerChecker/Operation/PropertyAdded.php
+++ b/src/PHPSemVerChecker/Operation/PropertyAdded.php
@@ -1,4 +1,5 @@
code[$this->context][Visibility::get($this->visibility)];
}
@@ -26,7 +27,7 @@ public function getCode()
/**
* @return string
*/
- public function getReason()
+ public function getReason(): string
{
return '[' . Visibility::toString($this->visibility) . '] ' . $this->reason;
}
@@ -35,7 +36,7 @@ public function getReason()
* @param \PhpParser\Node\Stmt $context
* @return int
*/
- protected function getVisibility(Stmt $context)
+ protected function getVisibility(Stmt $context): int
{
return Visibility::getForContext($context);
}
diff --git a/src/PHPSemVerChecker/Operation/PropertyOperationUnary.php b/src/PHPSemVerChecker/Operation/PropertyOperationUnary.php
index cfc7c1c..af3b3ac 100644
--- a/src/PHPSemVerChecker/Operation/PropertyOperationUnary.php
+++ b/src/PHPSemVerChecker/Operation/PropertyOperationUnary.php
@@ -1,4 +1,5 @@
context = $context;
$this->visibility = $this->getVisibility($property);
@@ -39,7 +40,7 @@ public function __construct($context, $file, Stmt $propertyContext, Property $pr
/**
* @return string
*/
- public function getLocation()
+ public function getLocation(): string
{
return $this->file;
}
@@ -47,7 +48,7 @@ public function getLocation()
/**
* @return int
*/
- public function getLine()
+ public function getLine(): int
{
return $this->property->getLine();
}
@@ -55,7 +56,7 @@ public function getLine()
/**
* @return string
*/
- public function getTarget()
+ public function getTarget(): string
{
return PProperty::getFullyQualifiedName($this->propertyContext, $this->property);
}
diff --git a/src/PHPSemVerChecker/Operation/PropertyRemoved.php b/src/PHPSemVerChecker/Operation/PropertyRemoved.php
index d00aab2..70bb5d7 100644
--- a/src/PHPSemVerChecker/Operation/PropertyRemoved.php
+++ b/src/PHPSemVerChecker/Operation/PropertyRemoved.php
@@ -1,4 +1,5 @@
fileAfter;
}
@@ -43,7 +44,7 @@ public function getLocation()
/**
* @return int
*/
- public function getLine()
+ public function getLine(): int
{
return $this->traitAfter->getLine();
}
@@ -51,7 +52,7 @@ public function getLine()
/**
* @return string
*/
- public function getTarget()
+ public function getTarget(): string
{
return PTrait::getFullyQualifiedName($this->traitAfter);
}
diff --git a/src/PHPSemVerChecker/Operation/TraitOperationUnary.php b/src/PHPSemVerChecker/Operation/TraitOperationUnary.php
index c828b37..156d9f3 100644
--- a/src/PHPSemVerChecker/Operation/TraitOperationUnary.php
+++ b/src/PHPSemVerChecker/Operation/TraitOperationUnary.php
@@ -1,4 +1,5 @@
file = $file;
$this->trait = $trait;
@@ -29,7 +30,7 @@ public function __construct($file, Trait_ $trait)
/**
* @return string
*/
- public function getLocation()
+ public function getLocation(): string
{
return $this->file;
}
@@ -37,7 +38,7 @@ public function getLocation()
/**
* @return int
*/
- public function getLine()
+ public function getLine(): int
{
return $this->trait->getLine();
}
@@ -45,7 +46,7 @@ public function getLine()
/**
* @return string
*/
- public function getTarget()
+ public function getTarget(): string
{
return PTrait::getFullyQualifiedName($this->trait);
}
diff --git a/src/PHPSemVerChecker/Operation/TraitRemoved.php b/src/PHPSemVerChecker/Operation/TraitRemoved.php
index 8d8f7cd..3f05f62 100644
--- a/src/PHPSemVerChecker/Operation/TraitRemoved.php
+++ b/src/PHPSemVerChecker/Operation/TraitRemoved.php
@@ -1,4 +1,5 @@
fileBefore = $fileBefore;
$this->fileAfter = $fileAfter;
@@ -34,7 +35,7 @@ public function __construct($fileBefore = null, $fileAfter = null)
/**
* @return string
*/
- public function getLocation()
+ public function getLocation(): string
{
return $this->fileBefore . ' ' . $this->fileAfter;
}
@@ -42,7 +43,7 @@ public function getLocation()
/**
* @return int
*/
- public function getLine()
+ public function getLine(): int
{
return 0;
}
diff --git a/src/PHPSemVerChecker/Operation/Visibility.php b/src/PHPSemVerChecker/Operation/Visibility.php
index 67533bf..0e13b35 100644
--- a/src/PHPSemVerChecker/Operation/Visibility.php
+++ b/src/PHPSemVerChecker/Operation/Visibility.php
@@ -1,4 +1,5 @@
0,
@@ -23,7 +24,7 @@ public static function getMapping()
* @param int $visibility
* @return int
*/
- public static function get($visibility)
+ public static function get(int $visibility): int
{
$mapping = self::getMapping();
return $mapping[$visibility];
@@ -33,7 +34,7 @@ public static function get($visibility)
* @param \PhpParser\Node\Stmt $context
* @return int
*/
- public static function getForContext(Stmt $context)
+ public static function getForContext(Stmt $context): int
{
if ($context->isPublic()) {
return Class_::MODIFIER_PUBLIC;
@@ -48,7 +49,7 @@ public static function getForContext(Stmt $context)
* @param string $visibility
* @return int
*/
- public static function getModifier($visibility)
+ public static function getModifier(string $visibility): int
{
if ($visibility === 'public') {
return Class_::MODIFIER_PUBLIC;
@@ -63,7 +64,7 @@ public static function getModifier($visibility)
* @param int $visibility
* @return string
*/
- public static function toString($visibility)
+ public static function toString(int $visibility): string
{
if ($visibility === Class_::MODIFIER_PUBLIC) {
return 'public';
diff --git a/src/PHPSemVerChecker/Registry/Registry.php b/src/PHPSemVerChecker/Registry/Registry.php
index 2985fe8..5413177 100644
--- a/src/PHPSemVerChecker/Registry/Registry.php
+++ b/src/PHPSemVerChecker/Registry/Registry.php
@@ -1,4 +1,5 @@
fullyQualifiedName($node);
$this->data[$context][$fullyQualifiedName] = $node;
@@ -89,7 +90,7 @@ protected function addNode($context, Stmt $node)
* @param Stmt $node
* @return string
*/
- protected function fullyQualifiedName(Stmt $node)
+ protected function fullyQualifiedName(Stmt $node): string
{
return isset($node->namespacedName) ? $node->namespacedName->toString() : $node->name->toString();
}
@@ -97,15 +98,15 @@ protected function fullyQualifiedName(Stmt $node)
/**
* @param string $file
*/
- public function setCurrentFile($file)
+ public function setCurrentFile(string $file)
{
$this->currentFile = realpath($file);
}
/**
- * @return string
+ * @return string|null
*/
- public function getCurrentFile()
+ public function getCurrentFile(): ?string
{
return $this->currentFile;
}
diff --git a/src/PHPSemVerChecker/Report/Report.php b/src/PHPSemVerChecker/Report/Report.php
index 8de0ef2..ae83caa 100644
--- a/src/PHPSemVerChecker/Report/Report.php
+++ b/src/PHPSemVerChecker/Report/Report.php
@@ -1,4 +1,5 @@
add('class', $classOperation);
}
@@ -40,7 +41,7 @@ public function addClass(Operation $classOperation)
* @param \PHPSemVerChecker\Operation\Operation $functionOperation
* @return \PHPSemVerChecker\Report\Report
*/
- public function addFunction(Operation $functionOperation)
+ public function addFunction(Operation $functionOperation): Report
{
return $this->add('function', $functionOperation);
}
@@ -49,7 +50,7 @@ public function addFunction(Operation $functionOperation)
* @param \PHPSemVerChecker\Operation\Operation $interfaceOperation
* @return \PHPSemVerChecker\Report\Report
*/
- public function addInterface(Operation $interfaceOperation)
+ public function addInterface(Operation $interfaceOperation): Report
{
return $this->add('interface', $interfaceOperation);
}
@@ -58,7 +59,7 @@ public function addInterface(Operation $interfaceOperation)
* @param \PHPSemVerChecker\Operation\Operation $traitOperation
* @return \PHPSemVerChecker\Report\Report
*/
- public function addTrait(Operation $traitOperation)
+ public function addTrait(Operation $traitOperation): Report
{
return $this->add('trait', $traitOperation);
}
@@ -68,7 +69,7 @@ public function addTrait(Operation $traitOperation)
* @param \PHPSemVerChecker\Operation\Operation $operation
* @return $this
*/
- public function add($context, Operation $operation)
+ public function add(string $context, Operation $operation): Report
{
$level = $operation->getLevel();
$this->differences[$context][$level][] = $operation;
@@ -80,7 +81,7 @@ public function add($context, Operation $operation)
* @param \PHPSemVerChecker\Report\Report $report
* @return $this
*/
- public function merge(Report $report)
+ public function merge(Report $report): Report
{
foreach ($report->differences as $context => $levels) {
foreach ($levels as $level => $differences) {
@@ -94,7 +95,7 @@ public function merge(Report $report)
/**
* @return array
*/
- public function getDifferences()
+ public function getDifferences(): array
{
return $this->differences;
}
@@ -104,7 +105,7 @@ public function getDifferences()
* @param string|array|null $level
* @return bool
*/
- public function hasDifferences($context = null, $level = null)
+ public function hasDifferences($context = null, $level = null): bool
{
$queriedContexts = $context ? (array)$context : array_keys($this->differences);
$queriedLevels = $level ? (array)$level : Level::asList('desc');
@@ -122,7 +123,7 @@ public function hasDifferences($context = null, $level = null)
* @param string|array|null $context
* @return int
*/
- public function getLevelForContext($context = null)
+ public function getLevelForContext($context = null): int
{
$queriedContexts = $context ? (array)$context : array_keys($this->differences);
$levels = Level::asList('desc');
@@ -139,7 +140,7 @@ public function getLevelForContext($context = null)
/**
* @return int
*/
- public function getSuggestedLevel()
+ public function getSuggestedLevel(): int
{
foreach (Level::asList('desc') as $level) {
foreach ($this->differences as $context => $levels) {
@@ -158,7 +159,7 @@ public function getSuggestedLevel()
* @param string $offset
* @return bool
*/
- public function offsetExists($offset)
+ public function offsetExists($offset): bool
{
return isset($this->differences[$offset]);
}
@@ -167,7 +168,8 @@ public function offsetExists($offset)
* @param string $offset
* @return array
*/
- public function offsetGet($offset)
+ #[\ReturnTypeWillChange]
+ public function offsetGet($offset): array
{
return $this->differences[$offset];
}
@@ -176,7 +178,7 @@ public function offsetGet($offset)
* @param string $offset
* @param mixed $value
*/
- public function offsetSet($offset, $value)
+ public function offsetSet($offset, $value): void
{
if ($offset === null) {
$this->differences[] = $value;
@@ -188,7 +190,7 @@ public function offsetSet($offset, $value)
/**
* @param string $offset
*/
- public function offsetUnset($offset)
+ public function offsetUnset($offset): void
{
unset($this->differences[$offset]);
}
@@ -196,7 +198,7 @@ public function offsetUnset($offset)
/**
* @return \ArrayIterator|\Traversable
*/
- public function getIterator()
+ public function getIterator(): \Traversable
{
return new ArrayIterator($this->differences);
}
diff --git a/src/PHPSemVerChecker/Reporter/JsonReporter.php b/src/PHPSemVerChecker/Reporter/JsonReporter.php
index 2862a1c..fdd1f5a 100644
--- a/src/PHPSemVerChecker/Reporter/JsonReporter.php
+++ b/src/PHPSemVerChecker/Reporter/JsonReporter.php
@@ -1,4 +1,5 @@
report = $report;
$this->path = $path;
@@ -36,7 +37,7 @@ public function __construct(Report $report, $path, Filesystem $filesystem = null
/**
* @return array
*/
- public function getOutput()
+ public function getOutput(): array
{
$output = [];
$output['level'] = Level::toString($this->report->getSuggestedLevel());
diff --git a/src/PHPSemVerChecker/Reporter/Reporter.php b/src/PHPSemVerChecker/Reporter/Reporter.php
index a318def..1b3b7cf 100644
--- a/src/PHPSemVerChecker/Reporter/Reporter.php
+++ b/src/PHPSemVerChecker/Reporter/Reporter.php
@@ -1,4 +1,5 @@
fullPath = $fullPath;
@@ -70,7 +71,7 @@ public function output(OutputInterface $output)
* @param \PHPSemVerChecker\Report\Report $report
* @param string $context
*/
- protected function outputReport(OutputInterface $output, Report $report, $context)
+ protected function outputReport(OutputInterface $output, Report $report, string $context)
{
if ( ! $report->hasDifferences($context)) {
return;
@@ -86,7 +87,7 @@ protected function outputReport(OutputInterface $output, Report $report, $contex
* @param \PHPSemVerChecker\Report\Report $report
* @param string $context
*/
- protected function outputTable(OutputInterface $output, Report $report, $context)
+ protected function outputTable(OutputInterface $output, Report $report, string $context)
{
$table = new Table($output);
$table->setHeaders(['Level', 'Location', 'Target', 'Reason', 'Code']);
@@ -104,7 +105,7 @@ protected function outputTable(OutputInterface $output, Report $report, $context
* @param \PHPSemVerChecker\Operation\Operation $operation
* @return string
*/
- protected function getLocation(Operation $operation)
+ protected function getLocation(Operation $operation): string
{
$isFullPath = $this->fullPath;
if ($isFullPath) {
diff --git a/src/PHPSemVerChecker/Scanner/ProgressScanner.php b/src/PHPSemVerChecker/Scanner/ProgressScanner.php
index 23d5b5f..4f109f9 100644
--- a/src/PHPSemVerChecker/Scanner/ProgressScanner.php
+++ b/src/PHPSemVerChecker/Scanner/ProgressScanner.php
@@ -1,4 +1,5 @@
fileLists[$name] = $fileList;
$this->scanners[$name] = $scanner;
@@ -61,7 +62,7 @@ public function runJobs()
*
* @param string $jobName
*/
- public function runJob($jobName)
+ public function runJob(string $jobName)
{
$progress = $this->getProgressBar();
$progress->setMessage('Scanning ' . $jobName);
@@ -78,7 +79,7 @@ public function runJob($jobName)
/**
* @return int
*/
- private function getFileCount()
+ private function getFileCount(): int
{
return array_sum(array_map('count', $this->fileLists));
}
@@ -86,7 +87,7 @@ private function getFileCount()
/**
* @return \Symfony\Component\Console\Helper\ProgressBar
*/
- private function getProgressBar()
+ private function getProgressBar(): ProgressBar
{
if ($this->progressBar === null) {
$this->progressBar = new ProgressBar($this->output, $this->getFileCount());
diff --git a/src/PHPSemVerChecker/Scanner/Scanner.php b/src/PHPSemVerChecker/Scanner/Scanner.php
index 0fe9cf2..9fd527d 100644
--- a/src/PHPSemVerChecker/Scanner/Scanner.php
+++ b/src/PHPSemVerChecker/Scanner/Scanner.php
@@ -1,4 +1,5 @@
registry = new Registry();
- $this->parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7);
+ $this->parser = (new ParserFactory())->createForNewestSupportedVersion();
$this->traverser = new NodeTraverser();
$visitors = [
@@ -50,7 +51,7 @@ public function __construct()
/**
* @param string $file
*/
- public function scan($file)
+ public function scan(string $file)
{
// Set the current file used by the registry so that we can tell where the change was scanned.
$this->registry->setCurrentFile($file);
@@ -68,7 +69,7 @@ public function scan($file)
/**
* @return \PHPSemVerChecker\Registry\Registry
*/
- public function getRegistry()
+ public function getRegistry(): Registry
{
return $this->registry;
}
diff --git a/src/PHPSemVerChecker/SemanticVersioning/Level.php b/src/PHPSemVerChecker/SemanticVersioning/Level.php
index 0f50e7d..2faf376 100644
--- a/src/PHPSemVerChecker/SemanticVersioning/Level.php
+++ b/src/PHPSemVerChecker/SemanticVersioning/Level.php
@@ -1,4 +1,5 @@
'NONE',
@@ -48,7 +49,7 @@ public static function toString($level)
* @param string $level
* @return int
*/
- public static function fromString($level)
+ public static function fromString(string $level): int
{
$mapping = [
'NONE' => self::NONE,
diff --git a/src/PHPSemVerChecker/Visitor/ClassVisitor.php b/src/PHPSemVerChecker/Visitor/ClassVisitor.php
index 617e0d5..4aefa7e 100644
--- a/src/PHPSemVerChecker/Visitor/ClassVisitor.php
+++ b/src/PHPSemVerChecker/Visitor/ClassVisitor.php
@@ -1,4 +1,5 @@
Visibility::getModifier($visibility),
'params' => [
- new Param(new Variable('a'), null, 'A'),
+ new Param(new Variable('a'), null, new Name('A')),
],
]),
],
@@ -269,8 +270,8 @@ public function testCompareSimilarClassMethodWithParameterAdded($context, $visib
new ClassMethod('tmpMethod', [
'type' => Visibility::getModifier($visibility),
'params' => [
- new Param(new Variable('a'), null, 'A'),
- new Param(new Variable('b'), null, 'B'),
+ new Param(new Variable('a'), null, new Name('A')),
+ new Param(new Variable('b'), null, new Name('B')),
],
]),
],
@@ -310,8 +311,8 @@ public function testCompareSimilarClassMethodWithParameterRemoved($context, $vis
new ClassMethod('tmpMethod', [
'type' => Visibility::getModifier($visibility),
'params' => [
- new Param(new Variable('a'), null, 'A'),
- new Param(new Variable('b'), null, 'B'),
+ new Param(new Variable('a'), null, new Name('A')),
+ new Param(new Variable('b'), null, new Name('B')),
],
]),
],
@@ -322,7 +323,7 @@ public function testCompareSimilarClassMethodWithParameterRemoved($context, $vis
new ClassMethod('tmpMethod', [
'type' => Visibility::getModifier($visibility),
'params' => [
- new Param(new Variable('a'), null, 'A'),
+ new Param(new Variable('a'), null, new Name('A')),
],
]),
],
@@ -373,7 +374,7 @@ public function testCompareSimilarClassMethodWithParameterTypehintAdded($context
new ClassMethod('tmpMethod', [
'type' => Visibility::getModifier($visibility),
'params' => [
- new Param(new Variable('a'), null, 'A'),
+ new Param(new Variable('a'), null, new Name('A')),
],
]),
],
@@ -413,7 +414,7 @@ public function testCompareSimilarClassMethodWithParameterTypehintRemoved($conte
new ClassMethod('tmpMethod', [
'type' => Visibility::getModifier($visibility),
'params' => [
- new Param(new Variable('a'), null, 'A'),
+ new Param(new Variable('a'), null, new Name('A')),
],
]),
],
@@ -464,8 +465,8 @@ public function testCompareSimilarClassMethodWithDefaultParameterAdded($context,
new ClassMethod('tmpMethod', [
'type' => Visibility::getModifier($visibility),
'params' => [
- new Param(new Variable('a'), null, 'A'),
- new Param(new Variable('b'), null, 'B'),
+ new Param(new Variable('a'), null, new Name('A')),
+ new Param(new Variable('b'), null, new Name('B')),
],
]),
],
@@ -476,8 +477,8 @@ public function testCompareSimilarClassMethodWithDefaultParameterAdded($context,
new ClassMethod('tmpMethod', [
'type' => Visibility::getModifier($visibility),
'params' => [
- new Param(new Variable('a'), null, 'A'),
- new Param(new Variable('b'), new String_('someDefaultValue'), 'B'),
+ new Param(new Variable('a'), null, new Name('A')),
+ new Param(new Variable('b'), new String_('someDefaultValue'), new Name('B')),
],
]),
],
@@ -517,8 +518,8 @@ public function testCompareSimilarClassMethodWithDefaultParameterRemoved($contex
new ClassMethod('tmpMethod', [
'type' => Visibility::getModifier($visibility),
'params' => [
- new Param(new Variable('a'), null, 'A'),
- new Param(new Variable('b'), new String_('someDefaultValue'), 'B'),
+ new Param(new Variable('a'), null, new Name('A')),
+ new Param(new Variable('b'), new String_('someDefaultValue'), new Name('B')),
],
]),
],
@@ -529,8 +530,8 @@ public function testCompareSimilarClassMethodWithDefaultParameterRemoved($contex
new ClassMethod('tmpMethod', [
'type' => Visibility::getModifier($visibility),
'params' => [
- new Param(new Variable('a'), null, 'A'),
- new Param(new Variable('b'), null, 'B'),
+ new Param(new Variable('a'), null, new Name('A')),
+ new Param(new Variable('b'), null, new Name('B')),
],
]),
],
@@ -570,8 +571,8 @@ public function testCompareSimilarClassMethodWithDefaultParameterValueChanged($c
new ClassMethod('tmpMethod', [
'type' => Visibility::getModifier($visibility),
'params' => [
- new Param(new Variable('a'), null, 'A'),
- new Param(new Variable('b'), new String_('someDefaultValue'), 'B'),
+ new Param(new Variable('a'), null, new Name('A')),
+ new Param(new Variable('b'), new String_('someDefaultValue'), new Name('B')),
],
]),
],
@@ -582,8 +583,8 @@ public function testCompareSimilarClassMethodWithDefaultParameterValueChanged($c
new ClassMethod('tmpMethod', [
'type' => Visibility::getModifier($visibility),
'params' => [
- new Param(new Variable('a'), null, 'A'),
- new Param(new Variable('b'), new String_('someNewDefaultValue'), 'B'),
+ new Param(new Variable('a'), null, new Name('A')),
+ new Param(new Variable('b'), new String_('someNewDefaultValue'), new Name('B')),
],
]),
],
diff --git a/tests/PHPSemVerChecker/Analyzer/FunctionAnalyzerTest.php b/tests/PHPSemVerChecker/Analyzer/FunctionAnalyzerTest.php
index 1bbd2f3..29ab1da 100644
--- a/tests/PHPSemVerChecker/Analyzer/FunctionAnalyzerTest.php
+++ b/tests/PHPSemVerChecker/Analyzer/FunctionAnalyzerTest.php
@@ -121,14 +121,14 @@ public function testSimilarFunctionWithParameterAdded()
$before->addFunction(new Function_('tmp', [
'params' => [
- new Param(new Variable('a'), null, 'A'),
+ new Param(new Variable('a'), null, new Name('A')),
],
]));
$after->addFunction(new Function_('tmp', [
'params' => [
- new Param(new Variable('a'), null, 'A'),
- new Param(new Variable('b'), null, 'B'),
+ new Param(new Variable('a'), null, new Name('A')),
+ new Param(new Variable('b'), null, new Name('B')),
],
]));
@@ -149,14 +149,14 @@ public function testSimilarFunctionWithParameterRemoved()
$before->addFunction(new Function_('tmp', [
'params' => [
- new Param(new Variable('a'), null, 'A'),
- new Param(new Variable('b'), null, 'B'),
+ new Param(new Variable('a'), null, new Name('A')),
+ new Param(new Variable('b'), null, new Name('B')),
],
]));
$after->addFunction(new Function_('tmp', [
'params' => [
- new Param(new Variable('a'), null, 'A'),
+ new Param(new Variable('a'), null, new Name('A')),
],
]));
@@ -184,7 +184,7 @@ public function testSimilarFunctionWithParameterTypehintAdded()
$after->addFunction(new Function_('tmp', [
'params' => [
- new Param(new Variable('a'), null, 'A'),
+ new Param(new Variable('a'), null, new Name('A')),
],
]));
@@ -205,7 +205,7 @@ public function testSimilarFunctionWithParameterTypehintRemoved()
$before->addFunction(new Function_('tmp', [
'params' => [
- new Param(new Variable('a'), null, 'A'),
+ new Param(new Variable('a'), null, new Name('A')),
],
]));
@@ -232,15 +232,15 @@ public function testSimilarFunctionWithDefaultParameterAdded()
$before->addFunction(new Function_('tmp', [
'params' => [
- new Param(new Variable('a'), null, 'A'),
- new Param(new Variable('b'), null, 'B'),
+ new Param(new Variable('a'), null, new Name('A')),
+ new Param(new Variable('b'), null, new Name('B')),
],
]));
$after->addFunction(new Function_('tmp', [
'params' => [
- new Param(new Variable('a'), null, 'A'),
- new Param(new Variable('b'), new String_('someDefaultValue'), 'B'),
+ new Param(new Variable('a'), null, new Name('A')),
+ new Param(new Variable('b'), new String_('someDefaultValue'), new Name('B')),
],
]));
@@ -261,15 +261,15 @@ public function testSimilarFunctionWithDefaultParameterRemoved()
$before->addFunction(new Function_('tmp', [
'params' => [
- new Param(new Variable('a'), null, 'A'),
- new Param(new Variable('b'), new String_('someDefaultValue'), 'B'),
+ new Param(new Variable('a'), null, new Name('A')),
+ new Param(new Variable('b'), new String_('someDefaultValue'), new Name('B')),
],
]));
$after->addFunction(new Function_('tmp', [
'params' => [
- new Param(new Variable('a'), null, 'A'),
- new Param(new Variable('a'), null, 'B'),
+ new Param(new Variable('a'), null, new Name('A')),
+ new Param(new Variable('a'), null, new Name('B')),
],
]));
@@ -290,15 +290,15 @@ public function testSimilarFunctionWithDefaultParameterValueChanged()
$before->addFunction(new Function_('tmp', [
'params' => [
- new Param(new Variable('a'), null, 'A'),
- new Param(new Variable('b'), new String_('someDefaultValue'), 'B'),
+ new Param(new Variable('a'), null, new Name('A')),
+ new Param(new Variable('b'), new String_('someDefaultValue'), new Name('B')),
],
]));
$after->addFunction(new Function_('tmp', [
'params' => [
- new Param(new Variable('a'), null, 'A'),
- new Param(new Variable('a'), new String_('someNewDefaultValue'), 'B'),
+ new Param(new Variable('a'), null, new Name('A')),
+ new Param(new Variable('a'), new String_('someNewDefaultValue'), new Name('B')),
],
]));
@@ -319,14 +319,14 @@ public function testSimilarFunctionWithParameterAddedWithDefault()
$before->addFunction(new Function_('tmp', [
'params' => [
- new Param(new Variable('a'), null, 'A'),
+ new Param(new Variable('a'), null, new Name('A')),
],
]));
$after->addFunction(new Function_('tmp', [
'params' => [
- new Param(new Variable('a'), null, 'A'),
- new Param(new Variable('a'), new String_('someDefaultValue'), 'B'),
+ new Param(new Variable('a'), null, new Name('A')),
+ new Param(new Variable('a'), new String_('someDefaultValue'), new Name('B')),
],
]));
@@ -350,13 +350,13 @@ public function testSimilarFunctionImplementation()
$before->addFunction(new Function_('tmp', [
'stmts' => [
- new FuncCall('someFunction'),
+ new FuncCall(new Name('someFunction')),
],
]));
$after->addFunction(new Function_('tmp', [
'stmts' => [
- new FuncCall('someFunction'),
+ new FuncCall(new Name('someFunction')),
],
]));
@@ -373,13 +373,13 @@ public function testFunctionImplementationChanged()
$before->addFunction(new Function_('tmp', [
'stmts' => [
- new FuncCall('someFunction'),
+ new FuncCall(new Name('someFunction')),
],
]));
$after->addFunction(new Function_('tmp', [
'stmts' => [
- new FuncCall('someOtherFunction'),
+ new FuncCall(new Name('someOtherFunction')),
],
]));
@@ -400,13 +400,13 @@ public function testFunctionCaseChanged()
$before->addFunction(new Function_('somefunctionname', [
'stmts' => [
- new FuncCall('someFunctionCall'),
+ new FuncCall(new Name('someFunctionCall')),
],
]));
$after->addFunction(new Function_('someFunctionName', [
'stmts' => [
- new FuncCall('someFunctionCall'),
+ new FuncCall(new Name('someFunctionCall')),
],
]));
diff --git a/tests/PHPSemVerChecker/Comparator/TypeComparatorTest.php b/tests/PHPSemVerChecker/Comparator/TypeComparatorTest.php
index 894c970..1740925 100644
--- a/tests/PHPSemVerChecker/Comparator/TypeComparatorTest.php
+++ b/tests/PHPSemVerChecker/Comparator/TypeComparatorTest.php
@@ -2,8 +2,10 @@
namespace PHPSemVerChecker\Test\Comparator;
+use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
use PhpParser\Node\NullableType;
+use PhpParser\Node\UnionType;
use PHPSemVerChecker\Comparator\Type;
use PHPSemVerChecker\Test\TestCase;
@@ -22,7 +24,8 @@ public function isSameProvider()
return [
[Name::concat(null, 'test'), Name::concat(null, 'test')],
['test', 'test'],
- [null, null]
+ [null, null],
+ [new UnionType([new Identifier('self'), new Identifier('array')]), new UnionType([new Identifier('array'), new Identifier('self')])],
];
}
@@ -39,7 +42,8 @@ public function isNotSameProvider()
return [
[Name::concat(null, 'test'), Name::concat(null, 'test1')],
['test', 'test1'],
- [null, 'test']
+ [null, 'test'],
+ [new UnionType([new Identifier('self'), new Identifier('array')]), null],
];
}
@@ -57,8 +61,9 @@ public function getProvider()
[null, null],
['test', 'test'],
[Name::concat('namespaced', 'test'), 'namespaced\test'],
- [new NullableType('test'), '?test'],
+ [new NullableType(new Identifier('test')), '?test'],
[new NullableType(Name::concat('namespaced', 'test')), '?namespaced\test'],
+ [new UnionType([new Identifier('self'), new Identifier('array')]), 'array|self'],
];
}
}
diff --git a/tests/PHPSemVerChecker/Reporter/JsonReporterTest.php b/tests/PHPSemVerChecker/Reporter/JsonReporterTest.php
index 88820e5..f6d1f41 100644
--- a/tests/PHPSemVerChecker/Reporter/JsonReporterTest.php
+++ b/tests/PHPSemVerChecker/Reporter/JsonReporterTest.php
@@ -48,7 +48,7 @@ public function testOutput()
$operation = $data['changes']['class'][0];
return $operation['level'] === Level::toString(Level::MAJOR) &&
- $operation['line'] === 'test-line' &&
+ $operation['line'] === 1 &&
$operation['location'] === 'test-location' &&
$operation['target'] === 'test-target' &&
$operation['reason'] === 'test-reason' &&
@@ -56,7 +56,7 @@ public function testOutput()
}));
$operation->shouldReceive('getLocation')->once()->andReturn('test-location')
- ->shouldReceive('getLine')->once()->andReturn('test-line')
+ ->shouldReceive('getLine')->once()->andReturn(1)
->shouldReceive('getTarget')->once()->andReturn('test-target')
->shouldReceive('getReason')->once()->andReturn('test-reason')
->shouldReceive('getCode')->once()->andReturn('test-code');
diff --git a/tests/PHPSemVerChecker/Reporter/ReporterTest.php b/tests/PHPSemVerChecker/Reporter/ReporterTest.php
index 2499574..126b113 100644
--- a/tests/PHPSemVerChecker/Reporter/ReporterTest.php
+++ b/tests/PHPSemVerChecker/Reporter/ReporterTest.php
@@ -6,7 +6,6 @@
use PHPSemVerChecker\Reporter\Reporter;
use PHPSemVerChecker\SemanticVersioning\Level;
use PHPSemVerChecker\Test\TestCase;
-use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\NullOutput;
class ReporterTest extends TestCase {
@@ -43,7 +42,7 @@ public function testOutput()
->shouldReceive('getLevelForContext')->andReturn(Level::MAJOR);
$operation->shouldReceive('getLocation')->once()->andReturn('test-location')
- ->shouldReceive('getLine')->once()->andReturn('test-line')
+ ->shouldReceive('getLine')->once()->andReturn(1)
->shouldReceive('getTarget')->once()->andReturn('test-target')
->shouldReceive('getReason')->once()->andReturn('test-reason')
->shouldReceive('getCode')->once()->andReturn('test-code');
diff --git a/tests/PHPSemVerChecker/Scanner/ScannerTest.php b/tests/PHPSemVerChecker/Scanner/ScannerTest.php
index 314eb16..89ed081 100644
--- a/tests/PHPSemVerChecker/Scanner/ScannerTest.php
+++ b/tests/PHPSemVerChecker/Scanner/ScannerTest.php
@@ -44,4 +44,60 @@ public function testPHP72()
$this->assertTrue(true);
}
+
+ public function testPHP73()
+ {
+ $scanner = new Scanner();
+ $scanner->scan(__DIR__.'/../../fixtures/general/PHP7.3.php');
+
+ $this->assertTrue(true);
+ }
+
+ public function testPHP74()
+ {
+ $scanner = new Scanner();
+ $scanner->scan(__DIR__.'/../../fixtures/general/PHP7.4.php');
+
+ $this->assertTrue(true);
+ }
+
+ public function testPHP80()
+ {
+ $scanner = new Scanner();
+ $scanner->scan(__DIR__.'/../../fixtures/general/PHP8.0.php');
+
+ $this->assertTrue(true);
+ }
+
+ public function testPHP81()
+ {
+ $scanner = new Scanner();
+ $scanner->scan(__DIR__.'/../../fixtures/general/PHP8.1.php');
+
+ $this->assertTrue(true);
+ }
+
+ public function testPHP82()
+ {
+ $scanner = new Scanner();
+ $scanner->scan(__DIR__.'/../../fixtures/general/PHP8.2.php');
+
+ $this->assertTrue(true);
+ }
+
+ public function testPHP83()
+ {
+ $scanner = new Scanner();
+ $scanner->scan(__DIR__.'/../../fixtures/general/PHP8.3.php');
+
+ $this->assertTrue(true);
+ }
+
+ public function testPHP84()
+ {
+ $scanner = new Scanner();
+ $scanner->scan(__DIR__.'/../../fixtures/general/PHP8.4.php');
+
+ $this->assertTrue(true);
+ }
}
diff --git a/tests/fixtures/general/PHP7.3.php b/tests/fixtures/general/PHP7.3.php
new file mode 100644
index 0000000..5e9aa72
--- /dev/null
+++ b/tests/fixtures/general/PHP7.3.php
@@ -0,0 +1,79 @@
+add(
+ 10,
+ 20,
+ 30, // Trailing comma
+);
+
+// is_countable function
+function checkCountable($value): bool
+{
+ return is_countable($value);
+}
+
+// array_key_first and array_key_last
+function arrayKeyFunctions(): void
+{
+ $array = ['a' => 1, 'b' => 2, 'c' => 3];
+
+ $firstKey = array_key_first($array);
+ $lastKey = array_key_last($array);
+}
+
+// JSON_THROW_ON_ERROR flag
+function jsonWithException(string $json): array
+{
+ return json_decode($json, true, 512, JSON_THROW_ON_ERROR);
+}
+
+// Flexible Heredoc and Nowdoc syntax
+function heredocExample(): string
+{
+ $html = <<
+ Indented content
+
+ HTML;
+
+ return $html;
+}
+
+// PCRE2 pattern support
+function regexFeatures(string $text): bool
+{
+ return preg_match('/pattern/u', $text) === 1;
+}
+
+// Multibyte string case mapping
+function mbStringFeatures(): void
+{
+ $text = "Hello World";
+ $lower = mb_convert_case($text, MB_CASE_LOWER);
+ $upper = mb_convert_case($text, MB_CASE_UPPER);
+}
diff --git a/tests/fixtures/general/PHP7.4.php b/tests/fixtures/general/PHP7.4.php
new file mode 100644
index 0000000..817bf02
--- /dev/null
+++ b/tests/fixtures/general/PHP7.4.php
@@ -0,0 +1,127 @@
+id = $id;
+ $this->name = $name;
+ }
+}
+
+// Arrow functions
+$numbers = [1, 2, 3, 4, 5];
+
+$squared = array_map(fn($n) => $n * $n, $numbers);
+$doubled = array_map(fn($n) => $n * 2, $numbers);
+
+$multiply = fn($a, $b) => $a * $b;
+$result = $multiply(5, 10);
+
+// Null coalescing assignment operator
+class Config
+{
+ private array $data = [];
+
+ public function get(string $key): mixed
+ {
+ $this->data[$key] ??= $this->loadDefault($key);
+ return $this->data[$key];
+ }
+
+ private function loadDefault(string $key): string
+ {
+ return 'default';
+ }
+}
+
+// Spread operator in array expression
+function spreadInArrays(): array
+{
+ $array1 = [1, 2, 3];
+ $array2 = [4, 5, 6];
+
+ $merged = [...$array1, ...$array2];
+
+ return $merged;
+}
+
+// Numeric literal separator
+function numericLiterals(): void
+{
+ $million = 1_000_000;
+ $binary = 0b1010_1011;
+ $hex = 0xFF_FF_FF;
+ $float = 1_234.567_890;
+}
+
+// Weak references
+class WeakReferenceExample
+{
+ private object $object;
+
+ public function __construct(object $obj)
+ {
+ $this->object = $obj;
+ }
+
+ public function createWeakRef(): \WeakReference
+ {
+ return \WeakReference::create($this->object);
+ }
+}
+
+// Covariant returns and contravariant parameters
+interface Animal
+{
+ public function food(): Food;
+}
+
+interface Food {}
+
+class Dog implements Animal
+{
+ // Covariant return type
+ public function food(): DogFood
+ {
+ return new DogFood();
+ }
+}
+
+class DogFood implements Food {}
+
+// __serialize and __unserialize magic methods
+class CustomSerializable
+{
+ private string $data;
+
+ public function __construct(string $data)
+ {
+ $this->data = $data;
+ }
+
+ public function __serialize(): array
+ {
+ return ['data' => $this->data];
+ }
+
+ public function __unserialize(array $data): void
+ {
+ $this->data = $data['data'];
+ }
+}
+
+// strip_tags with array of allowed tags
+function stripTagsArray(string $html): string
+{
+ return strip_tags($html, ['p', 'a', 'strong']);
+}
diff --git a/tests/fixtures/general/PHP8.0.php b/tests/fixtures/general/PHP8.0.php
new file mode 100644
index 0000000..fc54eb5
--- /dev/null
+++ b/tests/fixtures/general/PHP8.0.php
@@ -0,0 +1,176 @@
+name;
+ }
+}
+
+// Attributes (Annotations)
+#[Attribute]
+class Route
+{
+ public function __construct(
+ public string $path,
+ public string $method = 'GET',
+ ) {}
+}
+
+#[Route('/api/users', method: 'POST')]
+class UserController
+{
+ #[Route('/api/users/{id}', method: 'GET')]
+ public function show(int $id): array
+ {
+ return ['id' => $id];
+ }
+}
+
+// Match expression
+function getStatusMessage(int $code): string
+{
+ return match($code) {
+ 200 => 'OK',
+ 404 => 'Not Found',
+ 500 => 'Internal Server Error',
+ default => 'Unknown Status',
+ };
+}
+
+function calculate(string $operator, int $a, int $b): int
+{
+ return match($operator) {
+ '+' => $a + $b,
+ '-' => $a - $b,
+ '*' => $a * $b,
+ '/' => $a / $b,
+ };
+}
+
+// Nullsafe operator
+class Address
+{
+ public function __construct(public ?string $street = null) {}
+}
+
+class Customer
+{
+ public function __construct(public ?Address $address = null) {}
+}
+
+function getStreet(Customer $customer): ?string
+{
+ return $customer?->address?->street;
+}
+
+// Mixed type
+function handleAny(mixed $value): mixed
+{
+ return $value;
+}
+
+// Static return type
+class Factory
+{
+ public static function create(): static
+ {
+ return new static();
+ }
+}
+
+// throw as expression
+function getConfigValue(string $key): string
+{
+ return $_ENV[$key] ?? throw new \Exception('Config key not found');
+}
+
+// str_contains, str_starts_with, str_ends_with
+function stringFunctions(string $text): void
+{
+ $hasWord = str_contains($text, 'word');
+ $startsWithHello = str_starts_with($text, 'Hello');
+ $endsWithWorld = str_ends_with($text, 'World');
+}
+
+// WeakMap
+class WeakMapExample
+{
+ private \WeakMap $cache;
+
+ public function __construct()
+ {
+ $this->cache = new \WeakMap();
+ }
+
+ public function cache(object $key, mixed $value): void
+ {
+ $this->cache[$key] = $value;
+ }
+}
+
+// Non-capturing catches
+function handleException(): void
+{
+ try {
+ throw new \Exception('Error');
+ } catch (\Exception) {
+ // No variable needed
+ echo 'Caught exception';
+ }
+}
+
+// Allow trailing comma in parameter lists
+function multipleParams(
+ string $a,
+ string $b,
+ string $c,
+): void {
+ // Function body
+}
diff --git a/tests/fixtures/general/PHP8.1.php b/tests/fixtures/general/PHP8.1.php
new file mode 100644
index 0000000..1c4da42
--- /dev/null
+++ b/tests/fixtures/general/PHP8.1.php
@@ -0,0 +1,80 @@
+add(...);
+
+// New in initializers
+class ServiceContainer
+{
+ public function __construct(
+ private Logger $logger = new Logger(),
+ ) {}
+}
+
+class Logger
+{
+ public function log(string $message): void
+ {
+ echo $message;
+ }
+}
+
+// Final class constants
+class Config
+{
+ final public const APP_NAME = 'MyApp';
+}
diff --git a/tests/fixtures/general/PHP8.2.php b/tests/fixtures/general/PHP8.2.php
new file mode 100644
index 0000000..5f91199
--- /dev/null
+++ b/tests/fixtures/general/PHP8.2.php
@@ -0,0 +1,74 @@
+getBytes(16);
+ $int = $randomizer->getInt(1, 100);
+}
diff --git a/tests/fixtures/general/PHP8.4.php b/tests/fixtures/general/PHP8.4.php
new file mode 100644
index 0000000..0c15b98
--- /dev/null
+++ b/tests/fixtures/general/PHP8.4.php
@@ -0,0 +1,105 @@
+ $this->firstName . ' ' . $this->lastName;
+ }
+
+ // Property with set hook
+ private string $_email;
+ public string $email {
+ set {
+ if (!filter_var($value, FILTER_VALIDATE_EMAIL)) {
+ throw new \ValueError('Invalid email');
+ }
+ $this->_email = $value;
+ }
+ get => $this->_email;
+ }
+
+ public function __construct(
+ public string $firstName,
+ public string $lastName,
+ ) {}
+}
+
+// Asymmetric visibility
+class BankAccount
+{
+ public private(set) float $balance = 0.0;
+
+ public function deposit(float $amount): void
+ {
+ $this->balance += $amount;
+ }
+
+ public function getBalance(): float
+ {
+ return $this->balance;
+ }
+}
+
+class Document
+{
+ public protected(set) string $status = 'draft';
+
+ protected function updateStatus(string $newStatus): void
+ {
+ $this->status = $newStatus;
+ }
+}
+
+// New array functions
+function arrayFunctions(): void
+{
+ $array = [1, 2, 3, 4, 5];
+
+ // array_find
+ $first = array_find($array, fn($v) => $v > 2);
+
+ // array_find_key
+ $key = array_find_key($array, fn($v) => $v > 2);
+
+ // array_all
+ $allPositive = array_all($array, fn($v) => $v > 0);
+
+ // array_any
+ $hasEven = array_any($array, fn($v) => $v % 2 === 0);
+}
+
+// New without parentheses
+class Service
+{
+ public function getInstance(): static
+ {
+ return new static;
+ }
+
+ public function createNew(): self
+ {
+ return new self;
+ }
+}
+
+// Lazy objects
+class ExpensiveResource
+{
+ public function __construct(
+ private string $data,
+ ) {
+ // Expensive initialization
+ }
+}
+
+function createLazyObject(): object
+{
+ $reflector = new \ReflectionClass(ExpensiveResource::class);
+ return $reflector->newLazyGhost(function ($object) {
+ // Initialize when first accessed
+ });
+}