Releases: phpmetrics/PhpMetrics
Releases · phpmetrics/PhpMetrics
v3.0.0rc6
v3.0.0rc5
v3.0.0rc4
[3.0.0-rc4] - 2023-09-15
New features
- Add cyclomatic complexity for each method in a class
- Complexity table slightly updated to more comfortable table width
Updates
- Upgrade to PHPUnit 10.3
- Upgrade to Psalm 5.15
- Upgrade to Qodana 2023.2-eap
v3.0.0rc3
v3.0.0rc2
[3.0.0-rc2] - 2023-04-17
New features
- Documentation: Fix #491 by adding the possibility of running PhpMetrics via
sh
rather thanphp
, for some OS.
Fixed
- Fatal error when analyzing snippets like
$a->$b()
or$c()
. - Special versions are now taken into account on
artefacts/bintray.json
when a new release comes out.
v3.0.0rc1
[3.0.0-rc1] - 2023-04-11
This new major version is containing lots of internal re-architecture processes in the source code, and upgrades the
internal quality of PhpMetrics to a new level. Nevertheless, it contains also some BC Breaks and some metrics are
remove. Please take a look at the detailed changelog below if you experiment any trouble.
BC Break
- PhpMetrics 3.0 is requiring PHP 8.1 minimum. To parse projects that are not yet in PHP 8.1, please use a docker
installation based on a PHP 8.1 Docker Image - Git and JUnit plugins are no longer allowed in the configuration file
Removed
- Installation and usage from Debian package. Please use the phar, composer, or docker instead
- Metric removed: Git related metrics
- Metric removed: PHPUnit related metrics
- Metric removed: PageRank metric
- Metric removed: On System Complexity, totalStructuralComplexity, totalDataComplexity and totalSystemComplexity.
- Metric removed: On class-method enumeration, nbGetters and nbSetters are removed as no particular metric needs them.
New features
- Internal: Install a real dedicated QA system to secure PhpMetrics as mch as possible
- Internal: QA System is composed of PHP_CodeSniffer, PHPUnit, PHP Infection, PHPStan, Psalm and Qodana
- Internal: Make possible to create releases with suffixed names
- Minor UX/UI improvements on the HTML report.
Fixed
- Internal: QA completely upgraded. PHPCS, PHPStan, Psalm and Qodana are no longer having errors except on baseline.
Coverage is very close to 100%. All unit tests are passing. Mutation Score >94%. Some improvements are yet to come - Metric calculations: Fix LCoM calculation that was not able to understand promoted properties in constructor.
- Metric calculations: Ignore PHP Attributes in the detection of getters and setters. This fixes LCoM calculation.
- Metric calculations: Improve calculation on Afferent Coupling and Efferent Coupling (+ related metrics) thanks to
enlarged context of external classes usages detection. - Metric calculations: Take NullSafeMethodCall (
$x?->y()
) into account for WeightMethodCount and Cyclomatic Complexity calculation. - Metric calculations: Take NullSafePropertyFetch (
$x?->y
) into account for WeightMethodCount and Cyclomatic Complexity calculation. - Metric calculations: Take newly introduced
match
structure into account for WeightMethodCount and Cyclomatic Complexity calculation. - Metric calculations: Improve KanDefect metrics as
match
are now took into account as number of selects, along with switches. - Metric calculations: On System Complexity, relative complexities are now calculated including NullSafeMethodCall (
$x?->y()
).
v2.8.1
v2.8.0
Major release with
New features
- allows to search patterns of code. Instead of providing our own rules, now we can add dynamic rules for violations.
- allows also to use yaml for configuration.
- adds a
--metrics
option - excludes getters and setters for ccn and lcom calculation
- adds a composer option
- adds a new
--report-summary-json
option
Fixes
- Issue with columns in HTML report