sebastian/complexity
Library for calculating the complexity of PHP code units
6.0.0
596M downloads/mo
#69 most downloaded on composer
sebastianbergmann/complexity
What this package is like to depend on
Last release 6 months ago
06 Feb 2026
Release timing varies
gaps range from 4 weeks to 2.3 years
Nearly every release is documented
notes for 12 of 13 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
13 releases · first in 2020
1 release in the last 12 months
see the full history below
Release timeline
13 releases · Jul 2020 to Feb 2026
2021
2022
2023
2024
2025
2026
Releases
latest 13-
6.0.006 Feb 2026 -
5.0.007 Feb 2025 -
4.0.103 Jul 2024Release notes
Open source →Changed
- This project now uses PHPStan instead of Psalm for static analysis
Release notes
Open source →Changed
- This project now uses PHPStan instead of Psalm for static analysis
-
4.0.002 Feb 2024Release notes
Open source →Removed
- This component now requires PHP-Parser 5
- This component is no longer supported on PHP 8.1
-
3.2.021 Dec 2023Release notes
Open source →Added
ComplexityCollection::sortByDescendingCyclomaticComplexity()- Support for
matcharms
Changed
- This component is now compatible with
nikic/php-parser5.0
-
3.1.028 Sep 2023Release notes
Open source →Added
Complexity::isFunction()andComplexity::isMethod()ComplexityCollection::isFunction()andComplexityCollection::isMethod()ComplexityCollection::mergeWith()
Fixed
- Anonymous classes are not processed correctly
-
3.0.131 Aug 2023Release notes
Open source →Fixed
- #7:
ComplexityCalculatingVisitortries to process interface methods
- #7:
-
3.0.003 Feb 2023Release notes
Open source →Removed
- This component is no longer supported on PHP 7.3, PHP 7.4 and PHP 8.0
-
2.0.322 Dec 2023Nothing published for this version
-
2.0.226 Oct 2020Release notes
Open source →Fixed
SebastianBergmann\Complexity\Exceptionnow correctly extends\Throwable
-
2.0.128 Sep 2020Release notes
Open source →Changed
- Changed PHP version constraint in
composer.jsonfrom^7.3 || ^8.0to>=7.3
- Changed PHP version constraint in
-
2.0.025 Jul 2020Release notes
Open source →Removed
- The
ParentConnectingVisitorhas been removed (it should have been marked as@internal)
- The
-
1.0.022 Jul 2020