diff -pruN 4.0.1-4/.github/CONTRIBUTING.md 5.0.0-2/.github/CONTRIBUTING.md
--- 4.0.1-4/.github/CONTRIBUTING.md	1970-01-01 00:00:00.000000000 +0000
+++ 5.0.0-2/.github/CONTRIBUTING.md	2025-02-07 04:55:25.000000000 +0000
@@ -0,0 +1,75 @@
+# Contributing to `sebastian/complexity`
+
+## Welcome!
+
+We look forward to your contributions! Here are some examples how you can contribute:
+
+* [Report a bug](https://github.com/sebastianbergmann/complexity/issues/new)
+* [Send a pull request to fix a bug](https://github.com/sebastianbergmann/complexity/pulls)
+
+Please do not send pull requests that expand the scope of this project (see below).
+
+
+## Any contributions you make will be under the BSD-3-Clause License
+
+When you submit code changes, your submissions are understood to be under the same [BSD-3-Clause License](https://github.com/sebastianbergmann/complexity/blob/main/LICENSE) that covers the project. By contributing to this project, you agree that your contributions will be licensed under its BSD-3-Clause License.
+
+
+## Write bug reports with detail, background, and sample code
+
+[This is an example](https://github.com/sebastianbergmann/phpunit/issues/4376) of a bug report I wrote, and I think it's not too bad.
+
+In your bug report, please provide the following:
+
+* A quick summary and/or background
+* Steps to reproduce
+    * Be specific!
+    * Give sample code if you can.
+* What you expected would happen
+* What actually happens
+* Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
+
+Please post code and output as text ([using proper markup](https://guides.github.com/features/mastering-markdown/)). Do not post screenshots of code or output.
+
+
+## Workflow for Pull Requests
+
+1. Fork the repository.
+2. Create your branch from the oldest branch that is affected by the bug you plan to fix.
+3. Implement your change and add tests for it.
+4. Ensure the test suite passes.
+5. Ensure the code complies with our coding guidelines (see below).
+6. Send that pull request!
+
+Please make sure you have [set up your username and email address](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) for use with Git. Strings such as `silly nick name <root@localhost>` look really stupid in the commit history of a project.
+
+We encourage you to [sign your Git commits with your GPG key](https://docs.github.com/en/github/authenticating-to-github/signing-commits).
+
+
+## Development
+
+This project uses [PHPUnit](https://phpunit.de/) for testing:
+
+```shell
+./vendor/bin/phpunit
+```
+
+This project uses [PHPStan](https://phpstan.org/) for static analysis:
+
+```shell
+./tools/phpstan
+```
+
+This project uses [PHP-CS-Fixer](https://cs.symfony.com/) to enforce coding guidelines:
+
+```shell
+./tools/php-cs-fixer fix
+```
+
+The commands shown above require an autoloader script at `vendor/autoload.php`. This can be generated like so:
+
+```shell
+./tools/composer dump-autoload
+```
+
+Please understand that we will not accept a pull request when its changes violate this project's coding guidelines or break the test suite.
diff -pruN 4.0.1-4/.github/workflows/ci.yml 5.0.0-2/.github/workflows/ci.yml
--- 4.0.1-4/.github/workflows/ci.yml	2024-07-03 04:49:50.000000000 +0000
+++ 5.0.0-2/.github/workflows/ci.yml	2025-02-07 04:55:25.000000000 +0000
@@ -7,7 +7,7 @@ on:
 name: "CI"
 
 env:
-  COMPOSER_ROOT_VERSION: "4.0-dev"
+  COMPOSER_ROOT_VERSION: "5.0.x-dev"
 
 permissions:
   contents: read
@@ -61,9 +61,9 @@ jobs:
       fail-fast: false
       matrix:
         php-version:
-          - "8.2"
           - "8.3"
           - "8.4"
+          - "8.5"
 
     steps:
       - name: "Checkout"
@@ -73,16 +73,21 @@ jobs:
         uses: "shivammathur/setup-php@v2"
         with:
           php-version: "${{ matrix.php-version }}"
-          coverage: "pcov"
+          coverage: "xdebug"
 
       - name: "Install dependencies with Composer"
         run: "./tools/composer update --no-ansi --no-interaction --no-progress"
 
       - name: "Run tests with PHPUnit"
-        run: "vendor/bin/phpunit --coverage-clover=coverage.xml"
+        run: "vendor/bin/phpunit --log-junit junit.xml --coverage-clover=coverage.xml"
 
-      - name: "Send code coverage report to Codecov.io"
-        env:
-          CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
-        run: "bash <(curl -s https://codecov.io/bash) || true"
+      - name: Upload test results to Codecov.io
+        if: ${{ !cancelled() }}
+        uses: codecov/test-results-action@v1
+        with:
+          token: ${{ secrets.CODECOV_TOKEN }}
 
+      - name: Upload code coverage data to Codecov.io
+        uses: codecov/codecov-action@v4
+        with:
+          token: ${{ secrets.CODECOV_TOKEN }}
diff -pruN 4.0.1-4/.phive/phars.xml 5.0.0-2/.phive/phars.xml
--- 4.0.1-4/.phive/phars.xml	2024-07-03 04:49:50.000000000 +0000
+++ 5.0.0-2/.phive/phars.xml	2025-02-07 04:55:25.000000000 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <phive xmlns="https://phar.io/phive">
-  <phar name="php-cs-fixer" version="^3.59" installed="3.59.3" location="./tools/php-cs-fixer" copy="true"/>
-  <phar name="infection" version="^0.29" installed="0.29.6" location="./tools/infection" copy="true"/>
-  <phar name="composer" version="^2.7" installed="2.7.7" location="./tools/composer" copy="true"/>
-  <phar name="phpstan" version="^1.11" installed="1.11.5" location="./tools/phpstan" copy="true"/>
+  <phar name="php-cs-fixer" version="^3.64" installed="3.68.0" location="./tools/php-cs-fixer" copy="true"/>
+  <phar name="infection" version="^0.29" installed="0.29.10" location="./tools/infection" copy="true"/>
+  <phar name="composer" version="^2.8" installed="2.8.4" location="./tools/composer" copy="true"/>
+  <phar name="phpstan" version="^2.0" installed="2.1.1" location="./tools/phpstan" copy="true"/>
 </phive>
diff -pruN 4.0.1-4/.php-cs-fixer.dist.php 5.0.0-2/.php-cs-fixer.dist.php
--- 4.0.1-4/.php-cs-fixer.dist.php	2024-07-03 04:49:50.000000000 +0000
+++ 5.0.0-2/.php-cs-fixer.dist.php	2025-02-07 04:55:25.000000000 +0000
@@ -100,7 +100,7 @@ $config->setFinder($finder)
         'explicit_string_variable' => true,
         'fopen_flag_order' => true,
         'full_opening_tag' => true,
-        'fully_qualified_strict_types' => true,
+        'fully_qualified_strict_types' => ['import_symbols' => true],
         'function_declaration' => true,
         'function_to_constant' => true,
         'get_class_to_class_keyword' => true,
@@ -136,7 +136,7 @@ $config->setFinder($finder)
         'modernize_types_casting' => true,
         'multiline_comment_opening_closing' => true,
         'multiline_whitespace_before_semicolons' => true,
-        'native_constant_invocation' => false,
+        'native_constant_invocation' => true,
         'native_function_casing' => false,
         'native_function_invocation' => [
             'include' => [
@@ -159,7 +159,23 @@ $config->setFinder($finder)
         'no_empty_comment' => true,
         'no_empty_phpdoc' => true,
         'no_empty_statement' => true,
-        'no_extra_blank_lines' => true,
+        'no_extra_blank_lines' => [
+            'tokens' => [
+                'attribute',
+                'break',
+                'case',
+                'continue',
+                'curly_brace_block',
+                'default',
+                'extra',
+                'parenthesis_brace_block',
+                'return',
+                'square_brace_block',
+                'switch',
+                'throw',
+                'use',
+            ],
+        ],
         'no_homoglyph_names' => true,
         'no_leading_import_slash' => true,
         'no_leading_namespace_whitespace' => true,
@@ -198,6 +214,7 @@ $config->setFinder($finder)
         'no_whitespace_in_blank_line' => true,
         'non_printable_character' => true,
         'normalize_index_brace' => true,
+        'nullable_type_declaration_for_default_null_value' => true,
         'object_operator_without_whitespace' => true,
         'octal_notation' => true,
         'operator_linebreak' => [
@@ -341,6 +358,8 @@ $config->setFinder($finder)
         'whitespace_after_comma_in_array' => true,
     ]);
 
-$config->setCacheFile(__DIR__ . '/.php-cs-fixer.cache/' . sha1(@trim((string) @shell_exec('git rev-parse --abbrev-ref HEAD'))));
+$config->setCacheFile(__DIR__ . '/.php-cs-fixer.cache/' . json_decode((string) @file_get_contents('composer.json'), true)["extra"]["branch-alias"]["dev-main"] ?? 'unknown');
+
+$config->setParallelConfig(\PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect());
 
 return $config;
diff -pruN 4.0.1-4/ChangeLog.md 5.0.0-2/ChangeLog.md
--- 4.0.1-4/ChangeLog.md	2024-07-03 04:49:50.000000000 +0000
+++ 5.0.0-2/ChangeLog.md	2025-02-07 04:55:25.000000000 +0000
@@ -2,6 +2,12 @@
 
 All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
 
+## [5.0.0] - 2025-02-07
+
+### Removed
+
+* This component is no longer supported on PHP 8.2
+
 ## [4.0.1] - 2024-07-03
 
 ### Changed
@@ -72,6 +78,7 @@ All notable changes are documented in th
 
 * Initial release
 
+[5.0.0]: https://github.com/sebastianbergmann/complexity/compare/4.0...5.0.0
 [4.0.1]: https://github.com/sebastianbergmann/complexity/compare/4.0.0...4.0.1
 [4.0.0]: https://github.com/sebastianbergmann/complexity/compare/3.2...4.0.0
 [3.2.0]: https://github.com/sebastianbergmann/complexity/compare/3.1.0...3.2.0
diff -pruN 4.0.1-4/LICENSE 5.0.0-2/LICENSE
--- 4.0.1-4/LICENSE	2024-07-03 04:49:50.000000000 +0000
+++ 5.0.0-2/LICENSE	2025-02-07 04:55:25.000000000 +0000
@@ -1,6 +1,6 @@
 BSD 3-Clause License
 
-Copyright (c) 2020-2024, Sebastian Bergmann
+Copyright (c) 2020-2025, Sebastian Bergmann
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff -pruN 4.0.1-4/README.md 5.0.0-2/README.md
--- 4.0.1-4/README.md	2024-07-03 04:49:50.000000000 +0000
+++ 5.0.0-2/README.md	2025-02-07 04:55:25.000000000 +0000
@@ -1,4 +1,4 @@
-[![Latest Stable Version](https://poser.pugx.org/sebastian/complexity/v/stable.png)](https://packagist.org/packages/sebastian/complexity)
+[![Latest Stable Version](https://poser.pugx.org/sebastian/complexity/v)](https://packagist.org/packages/sebastian/complexity)
 [![CI Status](https://github.com/sebastianbergmann/complexity/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/complexity/actions)
 [![codecov](https://codecov.io/gh/sebastianbergmann/complexity/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/complexity)
 
diff -pruN 4.0.1-4/composer.json 5.0.0-2/composer.json
--- 4.0.1-4/composer.json	2024-07-03 04:49:50.000000000 +0000
+++ 5.0.0-2/composer.json	2025-02-07 04:55:25.000000000 +0000
@@ -17,15 +17,15 @@
     },
     "prefer-stable": true,
     "require": {
-        "php": ">=8.2",
+        "php": ">=8.3",
         "nikic/php-parser": "^5.0"
     },
     "require-dev": {
-        "phpunit/phpunit": "^11.0"
+        "phpunit/phpunit": "^12.0"
     },
     "config": {
         "platform": {
-            "php": "8.2.0"
+            "php": "8.3.0"
         },
         "optimize-autoloader": true,
         "sort-packages": true
@@ -37,7 +37,7 @@
     },
     "extra": {
         "branch-alias": {
-            "dev-main": "4.0-dev"
+            "dev-main": "5.0-dev"
         }
     }
 }
diff -pruN 4.0.1-4/debian/autoload.php.tpl 5.0.0-2/debian/autoload.php.tpl
--- 4.0.1-4/debian/autoload.php.tpl	2025-05-04 17:43:45.000000000 +0000
+++ 5.0.0-2/debian/autoload.php.tpl	1970-01-01 00:00:00.000000000 +0000
@@ -1,29 +0,0 @@
-<?php
-
-// Require
-require_once '/usr/share/php/PhpParser/autoload.php';
-
-// Suggest
-
-// @codingStandardsIgnoreFile
-// @codeCoverageIgnoreStart
-// this is an autogenerated file - do not edit
-spl_autoload_register(
-    function($class) {
-        static $classes = null;
-        if ($classes === null) {
-            $classes = array(
-                ___CLASSLIST___
-            );
-        }
-        $cn = strtolower($class);
-        if (isset($classes[$cn])) {
-            require ___BASEDIR___$classes[$cn];
-        }
-    },
-    ___EXCEPTION___,
-    ___PREPEND___
-);
-// @codeCoverageIgnoreEnd
-
-// Files
diff -pruN 4.0.1-4/debian/autoload.tests.php.tpl 5.0.0-2/debian/autoload.tests.php.tpl
--- 4.0.1-4/debian/autoload.tests.php.tpl	2025-05-04 17:43:45.000000000 +0000
+++ 5.0.0-2/debian/autoload.tests.php.tpl	1970-01-01 00:00:00.000000000 +0000
@@ -1,29 +0,0 @@
-<?php
-
-// Require
-require_once 'SebastianBergmann/Complexity/autoload.php';
-
-// Suggest
-
-// @codingStandardsIgnoreFile
-// @codeCoverageIgnoreStart
-// this is an autogenerated file - do not edit
-spl_autoload_register(
-    function($class) {
-        static $classes = null;
-        if ($classes === null) {
-            $classes = array(
-                ___CLASSLIST___
-            );
-        }
-        $cn = strtolower($class);
-        if (isset($classes[$cn])) {
-            require ___BASEDIR___$classes[$cn];
-        }
-    },
-    ___EXCEPTION___,
-    ___PREPEND___
-);
-// @codeCoverageIgnoreEnd
-
-// Files
diff -pruN 4.0.1-4/debian/changelog 5.0.0-2/debian/changelog
--- 4.0.1-4/debian/changelog	2025-05-04 17:45:50.000000000 +0000
+++ 5.0.0-2/debian/changelog	2025-09-29 06:29:47.000000000 +0000
@@ -1,10 +1,25 @@
-phpunit-complexity (4.0.1-4) unstable; urgency=medium
+phpunit-complexity (5.0.0-2) unstable; urgency=medium
 
-  * Upload for the reproducible effort
+  * Upload to unstable in sync with PHPunit
   * Update Standards-Version to 4.7.2
-  * Track version 4 for Trixie
+  * Remove Rules-Requires-Root
 
- -- David Prévot <taffit@debian.org>  Sun, 04 May 2025 19:45:50 +0200
+ -- David Prévot <taffit@debian.org>  Mon, 29 Sep 2025 08:29:47 +0200
+
+phpunit-complexity (5.0.0-1) experimental; urgency=medium
+
+  * Upload new major to experimental
+
+  [ Sebastian Bergmann ]
+  * Bump copyright year
+  * Prepare release
+
+  [ David Prévot ]
+  * Revert "Force system dependencies loading"
+  * Simplify build
+  * Update copyright (years)
+
+ -- David Prévot <taffit@debian.org>  Sat, 08 Feb 2025 19:37:39 +0100
 
 phpunit-complexity (4.0.1-3) unstable; urgency=medium
 
diff -pruN 4.0.1-4/debian/clean 5.0.0-2/debian/clean
--- 4.0.1-4/debian/clean	2025-05-04 17:43:45.000000000 +0000
+++ 5.0.0-2/debian/clean	2025-09-29 06:28:46.000000000 +0000
@@ -1,3 +1,4 @@
-.phpunit.result.cache
+.phpunit.cache/
+debian/autoload.php.tpl
+debian/autoload.tests.php.tpl
 src/autoload.php
-SebastianBergmann/
diff -pruN 4.0.1-4/debian/control 5.0.0-2/debian/control
--- 4.0.1-4/debian/control	2025-05-04 17:45:17.000000000 +0000
+++ 5.0.0-2/debian/control	2025-09-29 06:29:04.000000000 +0000
@@ -11,9 +11,8 @@ Build-Depends: debhelper-compat (= 13),
                phpunit <!nocheck>
 Standards-Version: 4.7.2
 Homepage: https://github.com/sebastianbergmann/complexity
-Vcs-Git: https://salsa.debian.org/php-team/pear/phpunit-complexity.git -b debian/4.x
+Vcs-Git: https://salsa.debian.org/php-team/pear/phpunit-complexity.git
 Vcs-Browser: https://salsa.debian.org/php-team/pear/phpunit-complexity
-Rules-Requires-Root: no
 
 Package: phpunit-complexity
 Architecture: all
diff -pruN 4.0.1-4/debian/copyright 5.0.0-2/debian/copyright
--- 4.0.1-4/debian/copyright	2025-05-04 17:43:45.000000000 +0000
+++ 5.0.0-2/debian/copyright	2025-09-29 06:29:04.000000000 +0000
@@ -4,7 +4,7 @@ Upstream-Contact: Sebastian Bergmann <se
 Source: https://github.com/sebastianbergmann/complexity
 
 Files: *
-Copyright: 2020-2024, Sebastian Bergmann <sebastian@phpunit.de>
+Copyright: 2020-2025, Sebastian Bergmann <sebastian@phpunit.de>
 License: BSD-3-clause
  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions
diff -pruN 4.0.1-4/debian/gbp.conf 5.0.0-2/debian/gbp.conf
--- 4.0.1-4/debian/gbp.conf	2025-05-04 17:45:23.000000000 +0000
+++ 5.0.0-2/debian/gbp.conf	2025-09-29 06:28:46.000000000 +0000
@@ -1,5 +1,5 @@
 [DEFAULT]
-debian-branch = debian/4.x
+debian-branch = debian/latest
 filter = [ '.gitattributes', 'tools' ]
 pristine-tar = True
 upstream-vcs-tag = %(version%~%-)s
diff -pruN 4.0.1-4/debian/pkg-php-tools-autoloaders 5.0.0-2/debian/pkg-php-tools-autoloaders
--- 4.0.1-4/debian/pkg-php-tools-autoloaders	2024-07-14 13:57:56.000000000 +0000
+++ 5.0.0-2/debian/pkg-php-tools-autoloaders	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-sebastian complexity SebastianBergmann/Complexity/autoload.php
diff -pruN 4.0.1-4/debian/pkg-php-tools-overrides 5.0.0-2/debian/pkg-php-tools-overrides
--- 4.0.1-4/debian/pkg-php-tools-overrides	2025-05-04 17:43:45.000000000 +0000
+++ 5.0.0-2/debian/pkg-php-tools-overrides	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-nikic	php-parser	php-parser
diff -pruN 4.0.1-4/debian/rules 5.0.0-2/debian/rules
--- 4.0.1-4/debian/rules	2025-05-04 17:43:45.000000000 +0000
+++ 5.0.0-2/debian/rules	2025-09-29 06:28:46.000000000 +0000
@@ -3,11 +3,14 @@
 	dh $@
 
 override_dh_auto_build:
+	phpabtpl composer.json > debian/autoload.php.tpl
 	phpab	--output src/autoload.php \
 		--template debian/autoload.php.tpl \
 		src
-	mkdir --parents SebastianBergmann vendor
-	ln -s ../src SebastianBergmann/Complexity
+	mkdir --parents vendor
+	phpabtpl \
+		--require ../src/autoload.php \
+		> debian/autoload.tests.php.tpl
 	phpab \
 		--output vendor/autoload.php \
 		--template debian/autoload.tests.php.tpl \
diff -pruN 4.0.1-4/debian/tests/control 5.0.0-2/debian/tests/control
--- 4.0.1-4/debian/tests/control	2025-05-04 17:44:12.000000000 +0000
+++ 5.0.0-2/debian/tests/control	2025-09-29 06:28:46.000000000 +0000
@@ -1,3 +1,3 @@
-Test-Command: mkdir -p vendor && phpab -o vendor/autoload.php -t debian/autoload.tests.php.tpl tests && phpunit
-Restrictions: rw-build-tree
-Depends: phpab, phpunit, @
+Test-Command: mkdir -p vendor && phpabtpl --require sebastian/complexity > debian/autoload.tests.php.tpl && phpab -o vendor/autoload.php -t debian/autoload.tests.php.tpl tests && phpunit
+Restrictions: allow-stderr, rw-build-tree
+Depends: phpab, phpunit, pkg-php-tools, @
diff -pruN 4.0.1-4/debian/watch 5.0.0-2/debian/watch
--- 4.0.1-4/debian/watch	2025-05-04 17:45:28.000000000 +0000
+++ 5.0.0-2/debian/watch	2025-09-29 06:28:46.000000000 +0000
@@ -2,4 +2,4 @@ version=4
 options=uversionmangle=s/-?([^\d.]+)/~$1/;tr/A-Z/a-z/,\
 mode=git,gitmode=full,gitexport=all,pgpmode=gittag \
 https://github.com/sebastianbergmann/complexity \
-refs/tags/v?(4.+)
+refs/tags/v?(\d.+)
diff -pruN 4.0.1-4/phpstan.neon 5.0.0-2/phpstan.neon
--- 4.0.1-4/phpstan.neon	2024-07-03 04:49:50.000000000 +0000
+++ 5.0.0-2/phpstan.neon	2025-02-07 04:55:25.000000000 +0000
@@ -1,52 +1,6 @@
 parameters:
-    level: 9
+    level: 10
     paths:
         - src
         - tests/unit
         - tests/integration
-
-    ignoreErrors:
-        -
-            message: "#^Parameter \\#1 \\$items of class SebastianBergmann\\\\Complexity\\\\ComplexityCollection constructor expects array\\<int, SebastianBergmann\\\\Complexity\\\\Complexity\\>, array\\<int\\|string, SebastianBergmann\\\\Complexity\\\\Complexity\\> given\\.$#"
-            count: 1
-            path: src/Complexity/ComplexityCollection.php
-
-        -
-            message: "#^Return type \\(void\\) of method SebastianBergmann\\\\Complexity\\\\CyclomaticComplexityCalculatingVisitor\\:\\:enterNode\\(\\) should be compatible with return type \\(array\\<PhpParser\\\\Node\\>\\|int\\|PhpParser\\\\Node\\|null\\) of method PhpParser\\\\NodeVisitor\\:\\:enterNode\\(\\)$#"
-            count: 1
-            path: src/Visitor/CyclomaticComplexityCalculatingVisitor.php
-
-        -
-            message: "#^Return type \\(void\\) of method SebastianBergmann\\\\Complexity\\\\CyclomaticComplexityCalculatingVisitor\\:\\:enterNode\\(\\) should be compatible with return type \\(array\\<PhpParser\\\\Node\\>\\|int\\|PhpParser\\\\Node\\|null\\) of method PhpParser\\\\NodeVisitorAbstract\\:\\:enterNode\\(\\)$#"
-            count: 1
-            path: src/Visitor/CyclomaticComplexityCalculatingVisitor.php
-
-        -
-            message: "#^Return type \\(void\\) of method class@anonymous/tests/unit/ComplexityCalculatingVisitorTest\\.php\\:106\\:\\:enterNode\\(\\) should be compatible with return type \\(array\\<PhpParser\\\\Node\\>\\|int\\|PhpParser\\\\Node\\|null\\) of method PhpParser\\\\NodeVisitor\\:\\:enterNode\\(\\)$#"
-            count: 1
-            path: tests/unit/ComplexityCalculatingVisitorTest.php
-
-        -
-            message: "#^Return type \\(void\\) of method class@anonymous/tests/unit/ComplexityCalculatingVisitorTest\\.php\\:106\\:\\:enterNode\\(\\) should be compatible with return type \\(array\\<PhpParser\\\\Node\\>\\|int\\|PhpParser\\\\Node\\|null\\) of method PhpParser\\\\NodeVisitorAbstract\\:\\:enterNode\\(\\)$#"
-            count: 1
-            path: tests/unit/ComplexityCalculatingVisitorTest.php
-
-        -
-            message: "#^Return type \\(void\\) of method class@anonymous/tests/unit/ComplexityCalculatingVisitorTest\\.php\\:153\\:\\:enterNode\\(\\) should be compatible with return type \\(array\\<PhpParser\\\\Node\\>\\|int\\|PhpParser\\\\Node\\|null\\) of method PhpParser\\\\NodeVisitor\\:\\:enterNode\\(\\)$#"
-            count: 1
-            path: tests/unit/ComplexityCalculatingVisitorTest.php
-
-        -
-            message: "#^Return type \\(void\\) of method class@anonymous/tests/unit/ComplexityCalculatingVisitorTest\\.php\\:153\\:\\:enterNode\\(\\) should be compatible with return type \\(array\\<PhpParser\\\\Node\\>\\|int\\|PhpParser\\\\Node\\|null\\) of method PhpParser\\\\NodeVisitorAbstract\\:\\:enterNode\\(\\)$#"
-            count: 1
-            path: tests/unit/ComplexityCalculatingVisitorTest.php
-
-        -
-            message: "#^Return type \\(void\\) of method class@anonymous/tests/unit/ComplexityCalculatingVisitorTest\\.php\\:59\\:\\:enterNode\\(\\) should be compatible with return type \\(array\\<PhpParser\\\\Node\\>\\|int\\|PhpParser\\\\Node\\|null\\) of method PhpParser\\\\NodeVisitor\\:\\:enterNode\\(\\)$#"
-            count: 1
-            path: tests/unit/ComplexityCalculatingVisitorTest.php
-
-        -
-            message: "#^Return type \\(void\\) of method class@anonymous/tests/unit/ComplexityCalculatingVisitorTest\\.php\\:59\\:\\:enterNode\\(\\) should be compatible with return type \\(array\\<PhpParser\\\\Node\\>\\|int\\|PhpParser\\\\Node\\|null\\) of method PhpParser\\\\NodeVisitorAbstract\\:\\:enterNode\\(\\)$#"
-            count: 1
-            path: tests/unit/ComplexityCalculatingVisitorTest.php
diff -pruN 4.0.1-4/phpunit.xml 5.0.0-2/phpunit.xml
--- 4.0.1-4/phpunit.xml	2024-07-03 04:49:50.000000000 +0000
+++ 5.0.0-2/phpunit.xml	2025-02-07 04:55:25.000000000 +0000
@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
-         bootstrap="vendor/autoload.php"
          cacheDirectory=".phpunit.cache"
          executionOrder="depends,defects"
          requireCoverageMetadata="true"
          beStrictAboutCoverageMetadata="true"
          beStrictAboutOutputDuringTests="true"
+         displayDetailsOnPhpunitDeprecations="true"
+         failOnPhpunitDeprecation="true"
          failOnRisky="true"
          failOnWarning="true"
          colors="true">
diff -pruN 4.0.1-4/src/Calculator.php 5.0.0-2/src/Calculator.php
--- 4.0.1-4/src/Calculator.php	2024-07-03 04:49:50.000000000 +0000
+++ 5.0.0-2/src/Calculator.php	2025-02-07 04:55:25.000000000 +0000
@@ -51,7 +51,6 @@ final class Calculator
             assert($nodes !== null);
 
             return $this->calculateForAbstractSyntaxTree($nodes);
-
             // @codeCoverageIgnoreStart
         } catch (Error $error) {
             throw new RuntimeException(
diff -pruN 4.0.1-4/src/Complexity/ComplexityCollection.php 5.0.0-2/src/Complexity/ComplexityCollection.php
--- 4.0.1-4/src/Complexity/ComplexityCollection.php	2024-07-03 04:49:50.000000000 +0000
+++ 5.0.0-2/src/Complexity/ComplexityCollection.php	2025-02-07 04:55:25.000000000 +0000
@@ -32,7 +32,7 @@ final readonly class ComplexityCollectio
 
     public static function fromList(Complexity ...$items): self
     {
-        return new self($items);
+        return new self(array_values($items));
     }
 
     /**
diff -pruN 4.0.1-4/src/Visitor/ComplexityCalculatingVisitor.php 5.0.0-2/src/Visitor/ComplexityCalculatingVisitor.php
--- 4.0.1-4/src/Visitor/ComplexityCalculatingVisitor.php	2024-07-03 04:49:50.000000000 +0000
+++ 5.0.0-2/src/Visitor/ComplexityCalculatingVisitor.php	2025-02-07 04:55:25.000000000 +0000
@@ -13,7 +13,6 @@ use function assert;
 use function is_array;
 use PhpParser\Node;
 use PhpParser\Node\Expr\New_;
-use PhpParser\Node\Name;
 use PhpParser\Node\Stmt;
 use PhpParser\Node\Stmt\Class_;
 use PhpParser\Node\Stmt\ClassMethod;
@@ -111,7 +110,6 @@ final class ComplexityCalculatingVisitor
         }
 
         assert(isset($parent->namespacedName));
-        assert($parent->namespacedName instanceof Name);
 
         return $parent->namespacedName->toString() . '::' . $node->name->toString();
     }
@@ -122,12 +120,7 @@ final class ComplexityCalculatingVisitor
     private function functionName(Function_ $node): string
     {
         assert(isset($node->namespacedName));
-        assert($node->namespacedName instanceof Name);
 
-        $functionName = $node->namespacedName->toString();
-
-        assert($functionName !== '');
-
-        return $functionName;
+        return $node->namespacedName->toString();
     }
 }
diff -pruN 4.0.1-4/src/Visitor/CyclomaticComplexityCalculatingVisitor.php 5.0.0-2/src/Visitor/CyclomaticComplexityCalculatingVisitor.php
--- 4.0.1-4/src/Visitor/CyclomaticComplexityCalculatingVisitor.php	2024-07-03 04:49:50.000000000 +0000
+++ 5.0.0-2/src/Visitor/CyclomaticComplexityCalculatingVisitor.php	2025-02-07 04:55:25.000000000 +0000
@@ -31,7 +31,7 @@ final class CyclomaticComplexityCalculat
      */
     private int $cyclomaticComplexity = 1;
 
-    public function enterNode(Node $node): void
+    public function enterNode(Node $node): null
     {
         switch ($node::class) {
             case BooleanAnd::class:
@@ -49,6 +49,8 @@ final class CyclomaticComplexityCalculat
             case While_::class:
                 $this->cyclomaticComplexity++;
         }
+
+        return null;
     }
 
     /**
diff -pruN 4.0.1-4/tests/unit/ComplexityCalculatingVisitorTest.php 5.0.0-2/tests/unit/ComplexityCalculatingVisitorTest.php
--- 4.0.1-4/tests/unit/ComplexityCalculatingVisitorTest.php	2024-07-03 04:49:50.000000000 +0000
+++ 5.0.0-2/tests/unit/ComplexityCalculatingVisitorTest.php	2025-02-07 04:55:25.000000000 +0000
@@ -60,9 +60,11 @@ final class ComplexityCalculatingVisitor
         {
             private int $numberOfNodesVisited = 0;
 
-            public function enterNode(Node $node): void
+            public function enterNode(Node $node): null
             {
                 $this->numberOfNodesVisited++;
+
+                return null;
             }
 
             public function numberOfNodesVisited(): int
@@ -107,9 +109,11 @@ final class ComplexityCalculatingVisitor
         {
             private int $numberOfNodesVisited = 0;
 
-            public function enterNode(Node $node): void
+            public function enterNode(Node $node): null
             {
                 $this->numberOfNodesVisited++;
+
+                return null;
             }
 
             public function numberOfNodesVisited(): int
@@ -154,9 +158,11 @@ final class ComplexityCalculatingVisitor
         {
             private int $numberOfNodesVisited = 0;
 
-            public function enterNode(Node $node): void
+            public function enterNode(Node $node): null
             {
                 $this->numberOfNodesVisited++;
+
+                return null;
             }
 
             public function numberOfNodesVisited(): int
Binary files 4.0.1-4/tools/composer and 5.0.0-2/tools/composer differ
Binary files 4.0.1-4/tools/infection and 5.0.0-2/tools/infection differ
Binary files 4.0.1-4/tools/php-cs-fixer and 5.0.0-2/tools/php-cs-fixer differ
Binary files 4.0.1-4/tools/phpstan and 5.0.0-2/tools/phpstan differ
