Download Latest Version PHP Depend 3.0.0 source code.zip (593.9 kB) Google Add to Preferred Sources
Home / 3.0.0
Name Modified Size InfoDownloads / Week
Parent folder
pdepend.phar 2026-10-01 4.0 MB
pdepend.phar.asc 2026-10-01 136 Bytes
PHP Depend 3.0.0 source code.tar.gz 2026-09-29 265.1 kB
PHP Depend 3.0.0 source code.zip 2026-09-29 593.9 kB
README.md 2026-09-29 9.8 kB
Totals: 5 Items   4.8 MB 0

New major release of PDepend. It requires PHP 8.1 or newer on a 64 bit build, parses files in parallel, moves the configuration file to YAML and adds native types to the whole public API.

This release contains breaking changes. See UPGRADE.md (github.com) for migration instructions.

Key Highlights

  • Parallel Parsing: Source files and rules are now parsed in parallel using one worker thread per CPU core.
  • PHP 8.4 & 8.5 Syntax Support: Property hooks, asymmetric property visibility, parentheses-free object instantiation, and pipe operators.
  • Modernized Configuration: Configuration has moved from XML to YAML (pdepend.yml). Easy migration commands (--migrate-configuration and --generate-configuration) are included.
  • Standardized Project Layout and clean up: The project now follows the standard PSR-4 structure and makes use of PHP 8.1 syntax.

Requirements

  • Changed #703: Drop support for PHP 5.3 through 7.4, PDepend now requires PHP 8.1 or newer.
  • Changed: A 64 bit PHP build is now required (php-64bit), NPath complexity no longer falls back to bcmath.
  • Changed #728: Dropped unsupported Symfony versions older than 5.4.
  • Changed #905: Add Symfony 8 support.
  • Changed #727: Upgrade the test suite to PHPUnit 10.
  • Added: New runtime dependencies fidry/cpu-core-counter, react/child-process and symfony/yaml, needed for parallel parsing and YAML configuration.

Added

  • Added: Parallel parsing of source files, enabled by default with one worker per detected core.
  • Added #945: --threads=<value> to make core usage configurable, use --threads=1 to parse in a single process.
  • Added: --generate-configuration to write a pdepend.yml through a short interactive wizard.
  • Added: --migrate-configuration to convert pdepend.xml to pdepend.yml. Only available with Symfony 7 or older, as Symfony 8 removed the XML loader.
  • Added: Engine::setMainScript(), Engine::setThreads(), Engine::setWorker() and Engine::setWorkerCommandName() so embedders can enable and control parallel parsing.
  • Added #905: YAML and PHP configuration files, pdepend.yml, pdepend.yml.dist and pdepend.php are now discovered before pdepend.xml.
  • Added #894: PHP 8.4 support for parentheses-free object instantiation.
  • Added #966: PHP 8.4 support for property hooks, exposed as ASTPropertyHook, including static and readonly hooks.
  • Added: PHP 8.4 support for asymmetric property visibility.
  • Added: PHP 8.5 support for the pipe operator, exposed as ASTPipe.
  • Added: Attributes are now part of the syntax tree as ASTAttribute, including attributes on promoted properties, closures and functions.
  • Added #949: Support for properties declared on interfaces.
  • Added #920: Windows CI, plus fixes for the cache directory and for running without ext-sockets.
  • Added #884: Support for large exclusion patterns.
  • Added: startParseProcess() now receives the total file count so process listeners can show progress.

Changed

  • Changed #885: Use the common directory structure, src/main/php/PDepend became src, src/bin became bin and src/test/php became tests/php.
  • Changed: Native parameter, property and return types were added throughout the code base. Every PDepend interface and abstract class changed signature.
  • Changed: ASTArtifact now extends ASTNode.
  • Changed: The visitor pattern is inverted. ASTNode::accept() and ASTVisitor::__call() are gone, use ASTVisitor::dispatch() and ASTVisitor::visit().
  • Changed: ProcessListener methods no longer receive the builder or tokenizer.
  • Changed #746: Seal up AbstractPHPParser, most previously protected methods are now private.
  • Changed: NPath complexity is reported as an int instead of a numeric string.
  • Changed #826: Improve and clean up getNodeMetrics() typing.
  • Changed: The default cache directory moved from ~/.pdepend to $XDG_CACHE_HOME/pdepend, falling back to ~/.cache/pdepend.
  • Changed: The default cache driver is always file, the PHP-build-dependent memory fallback was removed.
  • Changed #959: Sort the abstraction/instability chart draw order by volume so smaller bubbles stay visible.
  • Changed #731: Rewrite the PHAR build system.
  • Changed #515: Produce an out of bounds exception when fetching outside of the array bounds.
  • Changed: All Throwables raised while parsing are collected instead of only ParserException, so Engine::getExceptions() now returns Throwable[].
  • Changed: Marked the parallel parsing plumbing, the per version parser classes, the protected parser methods and the configuration generator/migrator @internal. They are not covered by the 3.x compatibility promise.

Removed

  • Removed: getName() on artifacts, use getImage() instead.
  • Removed: ASTCompilationUnit::free(), AbstractASTCallable::free(), getDocComment() and setDocComment().
  • Removed: AbstractPHPParser::throwUnexpectedTokenException(), use getUnexpectedTokenException().
  • Removed: The --optimization command line option, which had been a no-op since 2.0.
  • Removed: PDepend\Util\MathUtil and PDepend\Util\Workarounds.
  • Removed: PDepend\Metrics\AnalyzerIterator.
  • Removed: PDepend\Source\AST\ASTStringIndexExpression and Builder::buildAstStringIndexExpression(), the $string{0} syntax was removed in PHP 8.0.
  • Removed: PHPParserVersion53 through PHPParserVersion81, their behaviour is folded into AbstractPHPParser and PHPParserVersion82.
  • Removed: Engine::TOKEN_STORAGE and Engine::PARSER_STORAGE.
  • Removed #735: The symfony/polyfill-php80 dependency.
  • Removed #812: Remaining Symfony legacy compatibility code.
  • Removed: The XSD schema for the XML configuration file.

Fixed

  • Fixed #926: Improve parsing of fully qualified names.
  • Fixed #927: Allow modifiers on anonymous classes.
  • Fixed #937: Only apply traits once.
  • Fixed #940: Fix ASTNamedArgument serialization.
  • Fixed #942: Fix parsing nested alternate if/else/elseif.
  • Fixed #950: Fix parsing attributes on closures and functions, and const named fn.
  • Fixed: Fix parsing properties with disjunctive normal form type hints.
  • Fixed: Fix parsing static outside of a class, parenthesized instanceof types and namespace-prefixed scalar defaults.
  • Fixed #795: Protect against division by zero.
  • Fixed #734: Fulfil the ReturnTypeWillChange promise.
  • Fixed: Do not attempt to prepare the SVG report when the template file is missing.
  • Fixed #955: Fix parsing class constant fetches in attribute arguments outside a class body.
  • Fixed #961: Fix parsing backed enums whose backing type is not written in lowercase.
  • Fixed #873: Do not fail on a clover report that has no project element.
  • Fixed #824: Avoid an undefined index notice when a node has no stored complexity metrics.
  • Fixed #860: Keep the original exception as the previous exception when the runner rethrows.

New Contributors

Also thank you to all the returning contributors that helped us get over the finish line with this major release.

Full Changelog: https://github.com/pdepend/pdepend/compare/2.16.2...3.0.0

Source: README.md, updated 2026-09-29