diff --git a/.github/workflows/backward-compatibility-check.yml b/.github/workflows/backward-compatibility-check.yml index eb0a370a3..04c46e8f0 100644 --- a/.github/workflows/backward-compatibility-check.yml +++ b/.github/workflows/backward-compatibility-check.yml @@ -27,18 +27,18 @@ jobs: fetch-depth: 0 - name: "Install PHP" - uses: "shivammathur/setup-php@2.36.0" + uses: "shivammathur/setup-php@2.37.0" with: coverage: "pcov" php-version: "${{ matrix.php-version }}" ini-values: memory_limit=-1 extensions: pdo_sqlite, bcmath, intl, sodium - - uses: ramsey/composer-install@3.1.1 + - uses: ramsey/composer-install@4.0.0 with: dependency-versions: ${{ matrix.dependencies }} - - uses: ramsey/composer-install@3.1.1 + - uses: ramsey/composer-install@4.0.0 with: dependency-versions: ${{ matrix.dependencies }} working-directory: 'tools' diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 0ac814fc7..fbf52c424 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -14,7 +14,7 @@ jobs: services: postgres: # Docker Hub image - image: "postgres:18.2" + image: "postgres:18.3" # Provide the password for postgres env: POSTGRES_PASSWORD: postgres @@ -38,7 +38,7 @@ jobs: steps: - name: "Install PHP" - uses: "shivammathur/setup-php@2.36.0" + uses: "shivammathur/setup-php@2.37.0" with: coverage: none php-version: "${{ matrix.php-version }}" @@ -50,7 +50,7 @@ jobs: with: ref: ${{ github.base_ref }} - - uses: ramsey/composer-install@3.1.1 + - uses: ramsey/composer-install@4.0.0 with: dependency-versions: ${{ matrix.dependencies }} @@ -62,7 +62,7 @@ jobs: with: clean: false - - uses: ramsey/composer-install@3.1.1 + - uses: ramsey/composer-install@4.0.0 with: dependency-versions: ${{ matrix.dependencies }} diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml index bdb62784f..f64b7670a 100644 --- a/.github/workflows/coding-standard.yml +++ b/.github/workflows/coding-standard.yml @@ -29,14 +29,13 @@ jobs: uses: actions/checkout@v6 - name: "Install PHP" - uses: "shivammathur/setup-php@2.36.0" + uses: "shivammathur/setup-php@2.37.0" with: coverage: none php-version: "${{ matrix.php-version }}" ini-values: memory_limit=-1, opcache.enable_cli=1 - extensions: pdo_sqlite - - uses: ramsey/composer-install@3.1.1 + - uses: ramsey/composer-install@4.0.0 with: dependency-versions: ${{ matrix.dependencies }} diff --git a/.github/workflows/deptrac.yml b/.github/workflows/deptrac.yml index ea0419496..d7b74fe02 100644 --- a/.github/workflows/deptrac.yml +++ b/.github/workflows/deptrac.yml @@ -29,18 +29,17 @@ jobs: uses: actions/checkout@v6 - name: "Install PHP" - uses: "shivammathur/setup-php@2.36.0" + uses: "shivammathur/setup-php@2.37.0" with: coverage: "pcov" php-version: "${{ matrix.php-version }}" ini-values: memory_limit=-1 - extensions: pdo_sqlite - - uses: ramsey/composer-install@3.1.1 + - uses: ramsey/composer-install@4.0.0 with: dependency-versions: ${{ matrix.dependencies }} - - uses: ramsey/composer-install@3.1.1 + - uses: ramsey/composer-install@4.0.0 with: dependency-versions: ${{ matrix.dependencies }} working-directory: 'tools' diff --git a/.github/workflows/docs-check.yml b/.github/workflows/docs-check.yml index e6b5ca295..429fd9190 100644 --- a/.github/workflows/docs-check.yml +++ b/.github/workflows/docs-check.yml @@ -28,13 +28,13 @@ jobs: uses: actions/checkout@v6 - name: "Install PHP" - uses: "shivammathur/setup-php@2.36.0" + uses: "shivammathur/setup-php@2.37.0" with: coverage: none php-version: "${{ matrix.php-version }}" ini-values: memory_limit=-1, opcache.enable_cli=1 - - uses: ramsey/composer-install@3.1.1 + - uses: ramsey/composer-install@4.0.0 with: dependency-versions: ${{ matrix.dependencies }} diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 97379be06..5abfba81a 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -51,14 +51,14 @@ jobs: uses: actions/checkout@v6 - name: "Install PHP" - uses: "shivammathur/setup-php@2.36.0" + uses: "shivammathur/setup-php@2.37.0" with: coverage: "pcov" php-version: "${{ matrix.php-version }}" ini-values: memory_limit=-1 extensions: pdo_pgsql - - uses: ramsey/composer-install@3.1.1 + - uses: ramsey/composer-install@4.0.0 with: dependency-versions: ${{ matrix.dependencies }} composer-options: ${{ matrix.composer-options }} @@ -106,14 +106,14 @@ jobs: uses: actions/checkout@v6 - name: "Install PHP" - uses: "shivammathur/setup-php@2.36.0" + uses: "shivammathur/setup-php@2.37.0" with: coverage: "pcov" php-version: "${{ matrix.php-version }}" ini-values: memory_limit=-1 extensions: pdo_mysql - - uses: ramsey/composer-install@3.1.1 + - uses: ramsey/composer-install@4.0.0 with: dependency-versions: ${{ matrix.dependencies }} composer-options: ${{ matrix.composer-options }} @@ -160,14 +160,14 @@ jobs: uses: actions/checkout@v6 - name: "Install PHP" - uses: "shivammathur/setup-php@2.36.0" + uses: "shivammathur/setup-php@2.37.0" with: coverage: "pcov" php-version: "${{ matrix.php-version }}" ini-values: memory_limit=-1 extensions: pdo_mysql - - uses: ramsey/composer-install@3.1.1 + - uses: ramsey/composer-install@4.0.0 with: dependency-versions: ${{ matrix.dependencies }} composer-options: ${{ matrix.composer-options }} @@ -194,14 +194,14 @@ jobs: uses: actions/checkout@v6 - name: "Install PHP" - uses: "shivammathur/setup-php@2.36.0" + uses: "shivammathur/setup-php@2.37.0" with: coverage: "pcov" php-version: "${{ matrix.php-version }}" ini-values: memory_limit=-1 extensions: pdo_sqlite - - uses: ramsey/composer-install@3.1.1 + - uses: ramsey/composer-install@4.0.0 with: dependency-versions: ${{ matrix.dependencies }} composer-options: ${{ matrix.composer-options }} diff --git a/.github/workflows/mutation-tests-diff.yml b/.github/workflows/mutation-tests-diff.yml index d01b57fee..c615f1202 100644 --- a/.github/workflows/mutation-tests-diff.yml +++ b/.github/workflows/mutation-tests-diff.yml @@ -27,14 +27,14 @@ jobs: fetch-depth: 0 - name: "Install PHP" - uses: "shivammathur/setup-php@2.36.0" + uses: "shivammathur/setup-php@2.37.0" with: coverage: "pcov" php-version: "${{ matrix.php-version }}" ini-values: memory_limit=-1 - extensions: pdo_sqlite + extensions: pdo_sqlite, pdo_pgsql - - uses: ramsey/composer-install@3.1.1 + - uses: ramsey/composer-install@4.0.0 with: dependency-versions: ${{ matrix.dependencies }} diff --git a/.github/workflows/mutation-tests.yml b/.github/workflows/mutation-tests.yml index 379d868f7..f152731e4 100644 --- a/.github/workflows/mutation-tests.yml +++ b/.github/workflows/mutation-tests.yml @@ -29,14 +29,14 @@ jobs: uses: actions/checkout@v6 - name: "Install PHP" - uses: "shivammathur/setup-php@2.36.0" + uses: "shivammathur/setup-php@2.37.0" with: coverage: "pcov" php-version: "${{ matrix.php-version }}" ini-values: memory_limit=-1 - extensions: pdo_sqlite + extensions: pdo_sqlite, pdo_pgsql - - uses: ramsey/composer-install@3.1.1 + - uses: ramsey/composer-install@4.0.0 with: dependency-versions: ${{ matrix.dependencies }} diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index a1fb6c325..a0887de83 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -29,14 +29,13 @@ jobs: uses: actions/checkout@v6 - name: "Install PHP" - uses: "shivammathur/setup-php@2.36.0" + uses: "shivammathur/setup-php@2.37.0" with: coverage: none php-version: "${{ matrix.php-version }}" ini-values: memory_limit=-1, opcache.enable_cli=1 - extensions: pdo_sqlite - - uses: ramsey/composer-install@3.1.1 + - uses: ramsey/composer-install@4.0.0 with: dependency-versions: ${{ matrix.dependencies }} diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 0776f96c2..8e6a0811a 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -41,14 +41,14 @@ jobs: uses: actions/checkout@v6 - name: "Install PHP" - uses: "shivammathur/setup-php@2.36.0" + uses: "shivammathur/setup-php@2.37.0" with: coverage: "pcov" php-version: "${{ matrix.php-version }}" ini-values: memory_limit=-1 - extensions: pdo_sqlite + extensions: pdo_sqlite, pdo_pgsql - - uses: ramsey/composer-install@3.1.1 + - uses: ramsey/composer-install@4.0.0 with: dependency-versions: ${{ matrix.dependencies }} composer-options: ${{ matrix.composer-options }} diff --git a/composer.json b/composer.json index 89b479ea5..2aeb68832 100644 --- a/composer.json +++ b/composer.json @@ -4,8 +4,20 @@ "license": "MIT", "description": "A lightweight but also all-inclusive event sourcing library with a focus on developer experience", "keywords": [ + "events", + "aggregates", + "messages", "event-sourcing", - "ddd" + "domain driven design", + "ddd", + "cqrs", + "projection", + "processor", + "event driven", + "message driven", + "dcb", + "dynamic consistency boundary", + "patchlevel" ], "homepage": "https://event-sourcing.patchlevel.io", "authors": [ @@ -20,7 +32,7 @@ ], "require": { "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0", - "doctrine/dbal": "^4.0.0", + "doctrine/dbal": "^4.4.0", "doctrine/migrations": "^3.3.2", "patchlevel/hydrator": "^1.8.0", "patchlevel/worker": "^1.4.0", diff --git a/composer.lock b/composer.lock index 4e3dabfad..9f80463f2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "eaaa35929b4073dbe5946b8486ca1a64", + "content-hash": "040555186133771a1ea827cd0aade8d4", "packages": [ { "name": "brick/math", - "version": "0.14.1", + "version": "0.14.8", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "f05858549e5f9d7bb45875a75583240a38a281d0" + "reference": "63422359a44b7f06cae63c3b429b59e8efcc0629" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/f05858549e5f9d7bb45875a75583240a38a281d0", - "reference": "f05858549e5f9d7bb45875a75583240a38a281d0", + "url": "https://api.github.com/repos/brick/math/zipball/63422359a44b7f06cae63c3b429b59e8efcc0629", + "reference": "63422359a44b7f06cae63c3b429b59e8efcc0629", "shasum": "" }, "require": { @@ -56,7 +56,7 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.14.1" + "source": "https://github.com/brick/math/tree/0.14.8" }, "funding": [ { @@ -64,20 +64,20 @@ "type": "github" } ], - "time": "2025-11-24T14:40:29+00:00" + "time": "2026-02-10T14:33:43+00:00" }, { "name": "doctrine/dbal", - "version": "4.4.1", + "version": "4.4.3", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "3d544473fb93f5c25b483ea4f4ce99f8c4d9d44c" + "reference": "61e730f1658814821a85f2402c945f3883407dec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/3d544473fb93f5c25b483ea4f4ce99f8c4d9d44c", - "reference": "3d544473fb93f5c25b483ea4f4ce99f8c4d9d44c", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/61e730f1658814821a85f2402c945f3883407dec", + "reference": "61e730f1658814821a85f2402c945f3883407dec", "shasum": "" }, "require": { @@ -93,9 +93,9 @@ "phpstan/phpstan": "2.1.30", "phpstan/phpstan-phpunit": "2.0.7", "phpstan/phpstan-strict-rules": "^2", - "phpunit/phpunit": "11.5.23", - "slevomat/coding-standard": "8.24.0", - "squizlabs/php_codesniffer": "4.0.0", + "phpunit/phpunit": "11.5.50", + "slevomat/coding-standard": "8.27.1", + "squizlabs/php_codesniffer": "4.0.1", "symfony/cache": "^6.3.8|^7.0|^8.0", "symfony/console": "^5.4|^6.3|^7.0|^8.0" }, @@ -154,7 +154,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/4.4.1" + "source": "https://github.com/doctrine/dbal/tree/4.4.3" }, "funding": [ { @@ -170,33 +170,33 @@ "type": "tidelift" } ], - "time": "2025-12-04T10:11:03+00:00" + "time": "2026-03-20T08:52:12+00:00" }, { "name": "doctrine/deprecations", - "version": "1.1.5", + "version": "1.1.6", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38" + "reference": "d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38", - "reference": "459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca", + "reference": "d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "conflict": { - "phpunit/phpunit": "<=7.5 || >=13" + "phpunit/phpunit": "<=7.5 || >=14" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^12 || ^13", - "phpstan/phpstan": "1.4.10 || 2.1.11", + "doctrine/coding-standard": "^9 || ^12 || ^14", + "phpstan/phpstan": "1.4.10 || 2.1.30", "phpstan/phpstan-phpunit": "^1.0 || ^2", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6 || ^10.5 || ^11.5 || ^12", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6 || ^10.5 || ^11.5 || ^12.4 || ^13.0", "psr/log": "^1 || ^2 || ^3" }, "suggest": { @@ -216,22 +216,22 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.5" + "source": "https://github.com/doctrine/deprecations/tree/1.1.6" }, - "time": "2025-04-07T20:06:18+00:00" + "time": "2026-02-07T07:09:04+00:00" }, { "name": "doctrine/event-manager", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/doctrine/event-manager.git", - "reference": "c07799fcf5ad362050960a0fd068dded40b1e312" + "reference": "dda33921b198841ca8dbad2eaa5d4d34769d18cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/event-manager/zipball/c07799fcf5ad362050960a0fd068dded40b1e312", - "reference": "c07799fcf5ad362050960a0fd068dded40b1e312", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/dda33921b198841ca8dbad2eaa5d4d34769d18cf", + "reference": "dda33921b198841ca8dbad2eaa5d4d34769d18cf", "shasum": "" }, "require": { @@ -293,7 +293,7 @@ ], "support": { "issues": "https://github.com/doctrine/event-manager/issues", - "source": "https://github.com/doctrine/event-manager/tree/2.1.0" + "source": "https://github.com/doctrine/event-manager/tree/2.1.1" }, "funding": [ { @@ -309,20 +309,20 @@ "type": "tidelift" } ], - "time": "2026-01-17T22:40:21+00:00" + "time": "2026-01-29T07:11:08+00:00" }, { "name": "doctrine/migrations", - "version": "3.9.5", + "version": "3.9.6", "source": { "type": "git", "url": "https://github.com/doctrine/migrations.git", - "reference": "1b823afbc40f932dae8272574faee53f2755eac5" + "reference": "ffd8355cdd8505fc650d9604f058bf62aedd80a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/migrations/zipball/1b823afbc40f932dae8272574faee53f2755eac5", - "reference": "1b823afbc40f932dae8272574faee53f2755eac5", + "url": "https://api.github.com/repos/doctrine/migrations/zipball/ffd8355cdd8505fc650d9604f058bf62aedd80a1", + "reference": "ffd8355cdd8505fc650d9604f058bf62aedd80a1", "shasum": "" }, "require": { @@ -396,7 +396,7 @@ ], "support": { "issues": "https://github.com/doctrine/migrations/issues", - "source": "https://github.com/doctrine/migrations/tree/3.9.5" + "source": "https://github.com/doctrine/migrations/tree/3.9.6" }, "funding": [ { @@ -412,20 +412,20 @@ "type": "tidelift" } ], - "time": "2025-11-20T11:15:36+00:00" + "time": "2026-02-11T06:46:11+00:00" }, { "name": "patchlevel/hydrator", - "version": "1.13.0", + "version": "1.19.0", "source": { "type": "git", "url": "https://github.com/patchlevel/hydrator.git", - "reference": "dc6fe9a835edaa2d6972ad148738eaeb95a6cb35" + "reference": "5b79db6c2089cd3ddb5f08666179d85bda3160d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/patchlevel/hydrator/zipball/dc6fe9a835edaa2d6972ad148738eaeb95a6cb35", - "reference": "dc6fe9a835edaa2d6972ad148738eaeb95a6cb35", + "url": "https://api.github.com/repos/patchlevel/hydrator/zipball/5b79db6c2089cd3ddb5f08666179d85bda3160d7", + "reference": "5b79db6c2089cd3ddb5f08666179d85bda3160d7", "shasum": "" }, "require": { @@ -437,13 +437,13 @@ "symfony/type-info": "^7.3.0 || ^8.0.0" }, "require-dev": { - "infection/infection": "^0.31.9", + "infection/infection": "^0.32.4", "patchlevel/coding-standard": "^1.3.0", - "phpat/phpat": "^0.12.0", - "phpbench/phpbench": "^1.2.15", - "phpstan/phpstan": "^2.1.32", - "phpstan/phpstan-phpunit": "^2.0.8", - "phpunit/phpunit": "^11.5.17", + "phpat/phpat": "^0.12.2", + "phpbench/phpbench": "^1.4.3", + "phpstan/phpstan": "^2.1.39", + "phpstan/phpstan-phpunit": "^2.0.15", + "phpunit/phpunit": "^11.5.53", "symfony/var-dumper": "^5.4.29 || ^6.4.0 || ^7.0.0 || ^8.0.0" }, "type": "library", @@ -474,9 +474,9 @@ ], "support": { "issues": "https://github.com/patchlevel/hydrator/issues", - "source": "https://github.com/patchlevel/hydrator/tree/1.13.0" + "source": "https://github.com/patchlevel/hydrator/tree/1.19.0" }, - "time": "2025-11-27T16:58:40+00:00" + "time": "2026-03-29T12:04:47+00:00" }, { "name": "patchlevel/worker", @@ -995,16 +995,16 @@ }, { "name": "symfony/console", - "version": "v8.0.3", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "6145b304a5c1ea0bdbd0b04d297a5864f9a7d587" + "reference": "5b66d385dc58f69652e56f78a4184615e3f2b7f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/6145b304a5c1ea0bdbd0b04d297a5864f9a7d587", - "reference": "6145b304a5c1ea0bdbd0b04d297a5864f9a7d587", + "url": "https://api.github.com/repos/symfony/console/zipball/5b66d385dc58f69652e56f78a4184615e3f2b7f7", + "reference": "5b66d385dc58f69652e56f78a4184615e3f2b7f7", "shasum": "" }, "require": { @@ -1061,7 +1061,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v8.0.3" + "source": "https://github.com/symfony/console/tree/v8.0.8" }, "funding": [ { @@ -1081,7 +1081,7 @@ "type": "tidelift" } ], - "time": "2025-12-23T14:52:06+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/deprecation-contracts", @@ -1152,16 +1152,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v8.0.0", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "573f95783a2ec6e38752979db139f09fec033f03" + "reference": "f662acc6ab22a3d6d716dcb44c381c6002940df6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/573f95783a2ec6e38752979db139f09fec033f03", - "reference": "573f95783a2ec6e38752979db139f09fec033f03", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f662acc6ab22a3d6d716dcb44c381c6002940df6", + "reference": "f662acc6ab22a3d6d716dcb44c381c6002940df6", "shasum": "" }, "require": { @@ -1213,7 +1213,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.0" + "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.8" }, "funding": [ { @@ -1233,7 +1233,7 @@ "type": "tidelift" } ], - "time": "2025-10-30T14:17:19+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -1313,16 +1313,16 @@ }, { "name": "symfony/finder", - "version": "v8.0.3", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "dd3a2953570a283a2ba4e17063bb98c734cf5b12" + "reference": "8da41214757b87d97f181e3d14a4179286151007" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/dd3a2953570a283a2ba4e17063bb98c734cf5b12", - "reference": "dd3a2953570a283a2ba4e17063bb98c734cf5b12", + "url": "https://api.github.com/repos/symfony/finder/zipball/8da41214757b87d97f181e3d14a4179286151007", + "reference": "8da41214757b87d97f181e3d14a4179286151007", "shasum": "" }, "require": { @@ -1357,7 +1357,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v8.0.3" + "source": "https://github.com/symfony/finder/tree/v8.0.8" }, "funding": [ { @@ -1377,7 +1377,7 @@ "type": "tidelift" } ], - "time": "2025-12-23T14:52:06+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/polyfill-ctype", @@ -1803,16 +1803,16 @@ }, { "name": "symfony/stopwatch", - "version": "v8.0.0", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "67df1914c6ccd2d7b52f70d40cf2aea02159d942" + "reference": "85954ed72d5440ea4dc9a10b7e49e01df766ffa3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/67df1914c6ccd2d7b52f70d40cf2aea02159d942", - "reference": "67df1914c6ccd2d7b52f70d40cf2aea02159d942", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/85954ed72d5440ea4dc9a10b7e49e01df766ffa3", + "reference": "85954ed72d5440ea4dc9a10b7e49e01df766ffa3", "shasum": "" }, "require": { @@ -1845,7 +1845,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v8.0.0" + "source": "https://github.com/symfony/stopwatch/tree/v8.0.8" }, "funding": [ { @@ -1865,20 +1865,20 @@ "type": "tidelift" } ], - "time": "2025-08-04T07:36:47+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/string", - "version": "v8.0.1", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc" + "reference": "ae9488f874d7603f9d2dfbf120203882b645d963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ba65a969ac918ce0cc3edfac6cdde847eba231dc", - "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc", + "url": "https://api.github.com/repos/symfony/string/zipball/ae9488f874d7603f9d2dfbf120203882b645d963", + "reference": "ae9488f874d7603f9d2dfbf120203882b645d963", "shasum": "" }, "require": { @@ -1935,7 +1935,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v8.0.1" + "source": "https://github.com/symfony/string/tree/v8.0.8" }, "funding": [ { @@ -1955,20 +1955,20 @@ "type": "tidelift" } ], - "time": "2025-12-01T09:13:36+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/type-info", - "version": "v8.0.1", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/type-info.git", - "reference": "bb091cec1f70383538c7d000699781813f8d1a6a" + "reference": "622d81551770029d44d16be68969712eb47892f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/type-info/zipball/bb091cec1f70383538c7d000699781813f8d1a6a", - "reference": "bb091cec1f70383538c7d000699781813f8d1a6a", + "url": "https://api.github.com/repos/symfony/type-info/zipball/622d81551770029d44d16be68969712eb47892f1", + "reference": "622d81551770029d44d16be68969712eb47892f1", "shasum": "" }, "require": { @@ -2017,7 +2017,7 @@ "type" ], "support": { - "source": "https://github.com/symfony/type-info/tree/v8.0.1" + "source": "https://github.com/symfony/type-info/tree/v8.0.8" }, "funding": [ { @@ -2037,20 +2037,20 @@ "type": "tidelift" } ], - "time": "2025-12-05T14:08:45+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/var-exporter", - "version": "v8.0.0", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "7345f46c251f2eb27c7b3ebdb5bb076b3ffcae04" + "reference": "15776bb07a91b089037da89f8832fa41d5fa6ec6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/7345f46c251f2eb27c7b3ebdb5bb076b3ffcae04", - "reference": "7345f46c251f2eb27c7b3ebdb5bb076b3ffcae04", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/15776bb07a91b089037da89f8832fa41d5fa6ec6", + "reference": "15776bb07a91b089037da89f8832fa41d5fa6ec6", "shasum": "" }, "require": { @@ -2097,7 +2097,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v8.0.0" + "source": "https://github.com/symfony/var-exporter/tree/v8.0.8" }, "funding": [ { @@ -2117,7 +2117,7 @@ "type": "tidelift" } ], - "time": "2025-11-05T18:53:00+00:00" + "time": "2026-03-30T15:14:47+00:00" } ], "packages-dev": [ @@ -2926,16 +2926,16 @@ }, { "name": "doctrine/orm", - "version": "3.6.1", + "version": "3.6.3", "source": { "type": "git", "url": "https://github.com/doctrine/orm.git", - "reference": "2148940290e4c44b9101095707e71fb590832fa5" + "reference": "e88cd591f0786089dee22b972c28aa2076df51c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/orm/zipball/2148940290e4c44b9101095707e71fb590832fa5", - "reference": "2148940290e4c44b9101095707e71fb590832fa5", + "url": "https://api.github.com/repos/doctrine/orm/zipball/e88cd591f0786089dee22b972c28aa2076df51c0", + "reference": "e88cd591f0786089dee22b972c28aa2076df51c0", "shasum": "" }, "require": { @@ -3008,9 +3008,9 @@ ], "support": { "issues": "https://github.com/doctrine/orm/issues", - "source": "https://github.com/doctrine/orm/tree/3.6.1" + "source": "https://github.com/doctrine/orm/tree/3.6.3" }, - "time": "2026-01-09T05:28:15+00:00" + "time": "2026-04-02T06:53:27+00:00" }, { "name": "doctrine/persistence", @@ -3345,16 +3345,16 @@ }, { "name": "infection/infection", - "version": "0.32.3", + "version": "0.32.6", "source": { "type": "git", "url": "https://github.com/infection/infection.git", - "reference": "3654db483619b63b9bcb04c24caeb03677c6d057" + "reference": "4ed769947eaf2ecf42203027301bad2bedf037e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/infection/infection/zipball/3654db483619b63b9bcb04c24caeb03677c6d057", - "reference": "3654db483619b63b9bcb04c24caeb03677c6d057", + "url": "https://api.github.com/repos/infection/infection/zipball/4ed769947eaf2ecf42203027301bad2bedf037e5", + "reference": "4ed769947eaf2ecf42203027301bad2bedf037e5", "shasum": "" }, "require": { @@ -3375,11 +3375,11 @@ "ondram/ci-detector": "^4.1.0", "php": "^8.2", "psr/log": "^2.0 || ^3.0", - "sanmai/di-container": "^0.1.4", + "sanmai/di-container": "^0.1.12", "sanmai/duoclock": "^0.1.0", "sanmai/later": "^0.1.7", - "sanmai/pipeline": "^7.0", - "sebastian/diff": "^4.0 || ^5.0 || ^6.0 || ^7.0", + "sanmai/pipeline": "^7.2", + "sebastian/diff": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0", "symfony/console": "^6.4 || ^7.0 || ^8.0", "symfony/filesystem": "^6.4 || ^7.0 || ^8.0", "symfony/finder": "^6.4 || ^7.0 || ^8.0", @@ -3465,7 +3465,7 @@ ], "support": { "issues": "https://github.com/infection/infection/issues", - "source": "https://github.com/infection/infection/tree/0.32.3" + "source": "https://github.com/infection/infection/tree/0.32.6" }, "funding": [ { @@ -3477,7 +3477,7 @@ "type": "open_collective" } ], - "time": "2026-01-13T14:23:38+00:00" + "time": "2026-02-26T14:34:26+00:00" }, { "name": "infection/mutator", @@ -3534,16 +3534,16 @@ }, { "name": "justinrainbow/json-schema", - "version": "6.6.4", + "version": "6.8.0", "source": { "type": "git", "url": "https://github.com/jsonrainbow/json-schema.git", - "reference": "2eeb75d21cf73211335888e7f5e6fd7440723ec7" + "reference": "89ac92bcfe5d0a8a4433c7b89d394553ae7250cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/2eeb75d21cf73211335888e7f5e6fd7440723ec7", - "reference": "2eeb75d21cf73211335888e7f5e6fd7440723ec7", + "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/89ac92bcfe5d0a8a4433c7b89d394553ae7250cc", + "reference": "89ac92bcfe5d0a8a4433c7b89d394553ae7250cc", "shasum": "" }, "require": { @@ -3603,22 +3603,22 @@ ], "support": { "issues": "https://github.com/jsonrainbow/json-schema/issues", - "source": "https://github.com/jsonrainbow/json-schema/tree/6.6.4" + "source": "https://github.com/jsonrainbow/json-schema/tree/6.8.0" }, - "time": "2025-12-19T15:01:32+00:00" + "time": "2026-04-02T12:43:11+00:00" }, { "name": "league/commonmark", - "version": "2.8.0", + "version": "2.8.2", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "4efa10c1e56488e658d10adf7b7b7dcd19940bfb" + "reference": "59fb075d2101740c337c7216e3f32b36c204218b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/4efa10c1e56488e658d10adf7b7b7dcd19940bfb", - "reference": "4efa10c1e56488e658d10adf7b7b7dcd19940bfb", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/59fb075d2101740c337c7216e3f32b36c204218b", + "reference": "59fb075d2101740c337c7216e3f32b36c204218b", "shasum": "" }, "require": { @@ -3643,9 +3643,9 @@ "phpstan/phpstan": "^1.8.2", "phpunit/phpunit": "^9.5.21 || ^10.5.9 || ^11.0.0", "scrutinizer/ocular": "^1.8.1", - "symfony/finder": "^5.3 | ^6.0 | ^7.0", - "symfony/process": "^5.4 | ^6.0 | ^7.0", - "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 | ^7.0", + "symfony/finder": "^5.3 | ^6.0 | ^7.0 || ^8.0", + "symfony/process": "^5.4 | ^6.0 | ^7.0 || ^8.0", + "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 | ^7.0 || ^8.0", "unleashedtech/php-coding-standard": "^3.1.1", "vimeo/psalm": "^4.24.0 || ^5.0.0 || ^6.0.0" }, @@ -3712,7 +3712,7 @@ "type": "tidelift" } ], - "time": "2025-11-26T21:48:24+00:00" + "time": "2026-03-19T13:16:38+00:00" }, { "name": "league/config", @@ -3931,16 +3931,16 @@ }, { "name": "nette/schema", - "version": "v1.3.3", + "version": "v1.3.5", "source": { "type": "git", "url": "https://github.com/nette/schema.git", - "reference": "2befc2f42d7c715fd9d95efc31b1081e5d765004" + "reference": "f0ab1a3cda782dbc5da270d28545236aa80c4002" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/schema/zipball/2befc2f42d7c715fd9d95efc31b1081e5d765004", - "reference": "2befc2f42d7c715fd9d95efc31b1081e5d765004", + "url": "https://api.github.com/repos/nette/schema/zipball/f0ab1a3cda782dbc5da270d28545236aa80c4002", + "reference": "f0ab1a3cda782dbc5da270d28545236aa80c4002", "shasum": "" }, "require": { @@ -3948,8 +3948,10 @@ "php": "8.1 - 8.5" }, "require-dev": { - "nette/tester": "^2.5.2", - "phpstan/phpstan-nette": "^2.0@stable", + "nette/phpstan-rules": "^1.0", + "nette/tester": "^2.6", + "phpstan/extension-installer": "^1.4@stable", + "phpstan/phpstan": "^2.1.39@stable", "tracy/tracy": "^2.8" }, "type": "library", @@ -3990,22 +3992,22 @@ ], "support": { "issues": "https://github.com/nette/schema/issues", - "source": "https://github.com/nette/schema/tree/v1.3.3" + "source": "https://github.com/nette/schema/tree/v1.3.5" }, - "time": "2025-10-30T22:57:59+00:00" + "time": "2026-02-23T03:47:12+00:00" }, { "name": "nette/utils", - "version": "v4.1.1", + "version": "v4.1.3", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "c99059c0315591f1a0db7ad6002000288ab8dc72" + "reference": "bb3ea637e3d131d72acc033cfc2746ee893349fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/c99059c0315591f1a0db7ad6002000288ab8dc72", - "reference": "c99059c0315591f1a0db7ad6002000288ab8dc72", + "url": "https://api.github.com/repos/nette/utils/zipball/bb3ea637e3d131d72acc033cfc2746ee893349fe", + "reference": "bb3ea637e3d131d72acc033cfc2746ee893349fe", "shasum": "" }, "require": { @@ -4017,8 +4019,10 @@ }, "require-dev": { "jetbrains/phpstorm-attributes": "^1.2", + "nette/phpstan-rules": "^1.0", "nette/tester": "^2.5", - "phpstan/phpstan-nette": "^2.0@stable", + "phpstan/extension-installer": "^1.4@stable", + "phpstan/phpstan": "^2.1@stable", "tracy/tracy": "^2.9" }, "suggest": { @@ -4079,9 +4083,9 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.1.1" + "source": "https://github.com/nette/utils/tree/v4.1.3" }, - "time": "2025-12-22T12:14:32+00:00" + "time": "2026-02-13T03:05:33+00:00" }, { "name": "nikic/php-parser", @@ -4394,16 +4398,16 @@ }, { "name": "phpat/phpat", - "version": "0.12.1", + "version": "0.12.4", "source": { "type": "git", "url": "https://github.com/carlosas/phpat.git", - "reference": "67b9e179757fbaa8b87e1469a66f103725858ee0" + "reference": "5319264270c335f548451209bb0f32b55aa59924" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/carlosas/phpat/zipball/67b9e179757fbaa8b87e1469a66f103725858ee0", - "reference": "67b9e179757fbaa8b87e1469a66f103725858ee0", + "url": "https://api.github.com/repos/carlosas/phpat/zipball/5319264270c335f548451209bb0f32b55aa59924", + "reference": "5319264270c335f548451209bb0f32b55aa59924", "shasum": "" }, "require": { @@ -4445,9 +4449,9 @@ "description": "PHP Architecture Tester", "support": { "issues": "https://github.com/carlosas/phpat/issues", - "source": "https://github.com/carlosas/phpat/tree/0.12.1" + "source": "https://github.com/carlosas/phpat/tree/0.12.4" }, - "time": "2025-12-25T17:53:07+00:00" + "time": "2026-03-17T16:47:43+00:00" }, { "name": "phpbench/container", @@ -4502,16 +4506,16 @@ }, { "name": "phpbench/phpbench", - "version": "1.4.3", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/phpbench/phpbench.git", - "reference": "b641dde59d969ea42eed70a39f9b51950bc96878" + "reference": "661c8c6abbc7734986cf7bc6062c237fbb450461" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpbench/phpbench/zipball/b641dde59d969ea42eed70a39f9b51950bc96878", - "reference": "b641dde59d969ea42eed70a39f9b51950bc96878", + "url": "https://api.github.com/repos/phpbench/phpbench/zipball/661c8c6abbc7734986cf7bc6062c237fbb450461", + "reference": "661c8c6abbc7734986cf7bc6062c237fbb450461", "shasum": "" }, "require": { @@ -4522,7 +4526,7 @@ "ext-reflection": "*", "ext-spl": "*", "ext-tokenizer": "*", - "php": "^8.1", + "php": "^8.2", "phpbench/container": "^2.2", "psr/log": "^1.1 || ^2.0 || ^3.0", "seld/jsonlint": "^1.1", @@ -4542,8 +4546,9 @@ "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^1.0", "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^10.4 || ^11.0", + "phpunit/phpunit": "^11.5", "rector/rector": "^1.2", + "sebastian/exporter": "^6.3.2", "symfony/error-handler": "^6.1 || ^7.0 || ^8.0", "symfony/var-dumper": "^6.1 || ^7.0 || ^8.0" }, @@ -4588,7 +4593,7 @@ ], "support": { "issues": "https://github.com/phpbench/phpbench/issues", - "source": "https://github.com/phpbench/phpbench/tree/1.4.3" + "source": "https://github.com/phpbench/phpbench/tree/1.6.1" }, "funding": [ { @@ -4596,20 +4601,20 @@ "type": "github" } ], - "time": "2025-11-06T19:07:31+00:00" + "time": "2026-03-22T10:27:20+00:00" }, { "name": "phpstan/phpdoc-parser", - "version": "2.3.1", + "version": "2.3.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "16dbf9937da8d4528ceb2145c9c7c0bd29e26374" + "reference": "a004701b11273a26cd7955a61d67a7f1e525a45a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/16dbf9937da8d4528ceb2145c9c7c0bd29e26374", - "reference": "16dbf9937da8d4528ceb2145c9c7c0bd29e26374", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/a004701b11273a26cd7955a61d67a7f1e525a45a", + "reference": "a004701b11273a26cd7955a61d67a7f1e525a45a", "shasum": "" }, "require": { @@ -4641,17 +4646,17 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.2" }, - "time": "2026-01-12T11:33:04+00:00" + "time": "2026-01-25T14:56:51+00:00" }, { "name": "phpstan/phpstan", - "version": "2.1.33", + "version": "2.1.46", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9e800e6bee7d5bd02784d4c6069b48032d16224f", - "reference": "9e800e6bee7d5bd02784d4c6069b48032d16224f", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/a193923fc2d6325ef4e741cf3af8c3e8f54dbf25", + "reference": "a193923fc2d6325ef4e741cf3af8c3e8f54dbf25", "shasum": "" }, "require": { @@ -4696,20 +4701,20 @@ "type": "github" } ], - "time": "2025-12-05T10:24:31+00:00" + "time": "2026-04-01T09:25:14+00:00" }, { "name": "phpstan/phpstan-phpunit", - "version": "2.0.11", + "version": "2.0.16", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "5e30669bef866eff70db8b58d72a5c185aa82414" + "reference": "6ab598e1bc106e6827fd346ae4a12b4a5d634c32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/5e30669bef866eff70db8b58d72a5c185aa82414", - "reference": "5e30669bef866eff70db8b58d72a5c185aa82414", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/6ab598e1bc106e6827fd346ae4a12b4a5d634c32", + "reference": "6ab598e1bc106e6827fd346ae4a12b4a5d634c32", "shasum": "" }, "require": { @@ -4745,11 +4750,14 @@ "MIT" ], "description": "PHPUnit extensions and rules for PHPStan", + "keywords": [ + "static analysis" + ], "support": { "issues": "https://github.com/phpstan/phpstan-phpunit/issues", - "source": "https://github.com/phpstan/phpstan-phpunit/tree/2.0.11" + "source": "https://github.com/phpstan/phpstan-phpunit/tree/2.0.16" }, - "time": "2025-12-19T09:05:35+00:00" + "time": "2026-02-14T09:05:21+00:00" }, { "name": "phpunit/php-code-coverage", @@ -4843,28 +4851,28 @@ }, { "name": "phpunit/php-file-iterator", - "version": "5.1.0", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6" + "reference": "2f3a64888c814fc235386b7387dd5b5ed92ad903" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/118cfaaa8bc5aef3287bf315b6060b1174754af6", - "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/2f3a64888c814fc235386b7387dd5b5ed92ad903", + "reference": "2f3a64888c814fc235386b7387dd5b5ed92ad903", "shasum": "" }, "require": { "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -4892,15 +4900,27 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.0" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.1" }, "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/phpunit/php-file-iterator", + "type": "tidelift" } ], - "time": "2024-08-27T05:02:59+00:00" + "time": "2026-02-02T13:52:54+00:00" }, { "name": "phpunit/php-invoker", @@ -5088,16 +5108,16 @@ }, { "name": "phpunit/phpunit", - "version": "11.5.50", + "version": "11.5.55", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "fdfc727f0fcacfeb8fcb30c7e5da173125b58be3" + "reference": "adc7262fccc12de2b30f12a8aa0b33775d814f00" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fdfc727f0fcacfeb8fcb30c7e5da173125b58be3", - "reference": "fdfc727f0fcacfeb8fcb30c7e5da173125b58be3", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/adc7262fccc12de2b30f12a8aa0b33775d814f00", + "reference": "adc7262fccc12de2b30f12a8aa0b33775d814f00", "shasum": "" }, "require": { @@ -5112,7 +5132,7 @@ "phar-io/version": "^3.2.1", "php": ">=8.2", "phpunit/php-code-coverage": "^11.0.12", - "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-file-iterator": "^5.1.1", "phpunit/php-invoker": "^5.0.1", "phpunit/php-text-template": "^4.0.1", "phpunit/php-timer": "^7.0.1", @@ -5124,6 +5144,7 @@ "sebastian/exporter": "^6.3.2", "sebastian/global-state": "^7.0.2", "sebastian/object-enumerator": "^6.0.1", + "sebastian/recursion-context": "^6.0.3", "sebastian/type": "^5.1.3", "sebastian/version": "^5.0.2", "staabm/side-effects-detector": "^1.0.5" @@ -5169,7 +5190,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.50" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.55" }, "funding": [ { @@ -5193,20 +5214,20 @@ "type": "tidelift" } ], - "time": "2026-01-27T05:59:18+00:00" + "time": "2026-02-18T12:37:06+00:00" }, { "name": "sanmai/di-container", - "version": "0.1.11", + "version": "0.1.12", "source": { "type": "git", "url": "https://github.com/sanmai/di-container.git", - "reference": "4723e235e04589f88c0a114a4e438ff57a7cbb8a" + "reference": "8b9ad72f6ac1f9e185e5bd060dc9479cb5191d8b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sanmai/di-container/zipball/4723e235e04589f88c0a114a4e438ff57a7cbb8a", - "reference": "4723e235e04589f88c0a114a4e438ff57a7cbb8a", + "url": "https://api.github.com/repos/sanmai/di-container/zipball/8b9ad72f6ac1f9e185e5bd060dc9479cb5191d8b", + "reference": "8b9ad72f6ac1f9e185e5bd060dc9479cb5191d8b", "shasum": "" }, "require": { @@ -5264,7 +5285,7 @@ ], "support": { "issues": "https://github.com/sanmai/di-container/issues", - "source": "https://github.com/sanmai/di-container/tree/0.1.11" + "source": "https://github.com/sanmai/di-container/tree/0.1.12" }, "funding": [ { @@ -5272,7 +5293,7 @@ "type": "github" } ], - "time": "2026-01-13T07:38:17+00:00" + "time": "2026-01-27T08:25:46+00:00" }, { "name": "sanmai/duoclock", @@ -6717,16 +6738,16 @@ }, { "name": "symfony/clock", - "version": "v8.0.0", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/clock.git", - "reference": "832119f9b8dbc6c8e6f65f30c5969eca1e88764f" + "reference": "b55a638b189a6faa875e0ccdb00908fb87af95b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/clock/zipball/832119f9b8dbc6c8e6f65f30c5969eca1e88764f", - "reference": "832119f9b8dbc6c8e6f65f30c5969eca1e88764f", + "url": "https://api.github.com/repos/symfony/clock/zipball/b55a638b189a6faa875e0ccdb00908fb87af95b3", + "reference": "b55a638b189a6faa875e0ccdb00908fb87af95b3", "shasum": "" }, "require": { @@ -6770,7 +6791,7 @@ "time" ], "support": { - "source": "https://github.com/symfony/clock/tree/v8.0.0" + "source": "https://github.com/symfony/clock/tree/v8.0.8" }, "funding": [ { @@ -6790,20 +6811,20 @@ "type": "tidelift" } ], - "time": "2025-11-12T15:46:48+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/filesystem", - "version": "v8.0.1", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "d937d400b980523dc9ee946bb69972b5e619058d" + "reference": "66b769ae743ce2d13e435528fbef4af03d623e5a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/d937d400b980523dc9ee946bb69972b5e619058d", - "reference": "d937d400b980523dc9ee946bb69972b5e619058d", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/66b769ae743ce2d13e435528fbef4af03d623e5a", + "reference": "66b769ae743ce2d13e435528fbef4af03d623e5a", "shasum": "" }, "require": { @@ -6840,7 +6861,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v8.0.1" + "source": "https://github.com/symfony/filesystem/tree/v8.0.8" }, "funding": [ { @@ -6860,20 +6881,20 @@ "type": "tidelift" } ], - "time": "2025-12-01T09:13:36+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/messenger", - "version": "v8.0.3", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/messenger.git", - "reference": "b56b89aee16ceb623f76c8739ab62202ec198190" + "reference": "8d0e6b2d5e5dc9d484c6e45117395ae98f0a497a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/messenger/zipball/b56b89aee16ceb623f76c8739ab62202ec198190", - "reference": "b56b89aee16ceb623f76c8739ab62202ec198190", + "url": "https://api.github.com/repos/symfony/messenger/zipball/8d0e6b2d5e5dc9d484c6e45117395ae98f0a497a", + "reference": "8d0e6b2d5e5dc9d484c6e45117395ae98f0a497a", "shasum": "" }, "require": { @@ -6883,7 +6904,9 @@ }, "conflict": { "symfony/console": "<7.4", - "symfony/event-dispatcher-contracts": "<2.5" + "symfony/event-dispatcher-contracts": "<2.5", + "symfony/lock": "<7.4", + "symfony/serializer": "<7.4.4|>=8.0,<8.0.4" }, "require-dev": { "psr/cache": "^1.0|^2.0|^3.0", @@ -6896,7 +6919,7 @@ "symfony/property-access": "^7.4|^8.0", "symfony/rate-limiter": "^7.4|^8.0", "symfony/routing": "^7.4|^8.0", - "symfony/serializer": "^7.4|^8.0", + "symfony/serializer": "^7.4.4|^8.0.4", "symfony/service-contracts": "^2.5|^3", "symfony/stopwatch": "^7.4|^8.0", "symfony/validator": "^7.4|^8.0", @@ -6928,7 +6951,7 @@ "description": "Helps applications send and receive messages to/from other applications or via message queues", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/messenger/tree/v8.0.3" + "source": "https://github.com/symfony/messenger/tree/v8.0.8" }, "funding": [ { @@ -6948,20 +6971,20 @@ "type": "tidelift" } ], - "time": "2025-12-23T14:52:06+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/options-resolver", - "version": "v8.0.0", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "d2b592535ffa6600c265a3893a7f7fd2bad82dd7" + "reference": "b48bce0a70b914f6953dafbd10474df232ed4de8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/d2b592535ffa6600c265a3893a7f7fd2bad82dd7", - "reference": "d2b592535ffa6600c265a3893a7f7fd2bad82dd7", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/b48bce0a70b914f6953dafbd10474df232ed4de8", + "reference": "b48bce0a70b914f6953dafbd10474df232ed4de8", "shasum": "" }, "require": { @@ -6999,7 +7022,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v8.0.0" + "source": "https://github.com/symfony/options-resolver/tree/v8.0.8" }, "funding": [ { @@ -7019,7 +7042,7 @@ "type": "tidelift" } ], - "time": "2025-11-12T15:55:31+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/polyfill-php80", @@ -7267,16 +7290,16 @@ }, { "name": "symfony/process", - "version": "v8.0.3", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "0cbbd88ec836f8757641c651bb995335846abb78" + "reference": "cb8939aff03470d1a9d1d1b66d08c6fa71b3bbdc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/0cbbd88ec836f8757641c651bb995335846abb78", - "reference": "0cbbd88ec836f8757641c651bb995335846abb78", + "url": "https://api.github.com/repos/symfony/process/zipball/cb8939aff03470d1a9d1d1b66d08c6fa71b3bbdc", + "reference": "cb8939aff03470d1a9d1d1b66d08c6fa71b3bbdc", "shasum": "" }, "require": { @@ -7308,7 +7331,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v8.0.3" + "source": "https://github.com/symfony/process/tree/v8.0.8" }, "funding": [ { @@ -7328,20 +7351,20 @@ "type": "tidelift" } ], - "time": "2025-12-19T10:01:18+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/var-dumper", - "version": "v8.0.3", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "3bc368228532ad538cc216768caa8968be95a8d6" + "reference": "cfb7badd53bf4177f6e9416cfbbccc13c0e773a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3bc368228532ad538cc216768caa8968be95a8d6", - "reference": "3bc368228532ad538cc216768caa8968be95a8d6", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/cfb7badd53bf4177f6e9416cfbbccc13c0e773a1", + "reference": "cfb7badd53bf4177f6e9416cfbbccc13c0e773a1", "shasum": "" }, "require": { @@ -7395,7 +7418,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v8.0.3" + "source": "https://github.com/symfony/var-dumper/tree/v8.0.8" }, "funding": [ { @@ -7415,20 +7438,20 @@ "type": "tidelift" } ], - "time": "2025-12-18T11:23:51+00:00" + "time": "2026-03-31T07:15:36+00:00" }, { "name": "thecodingmachine/safe", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/thecodingmachine/safe.git", - "reference": "2cdd579eeaa2e78e51c7509b50cc9fb89a956236" + "reference": "705683a25bacf0d4860c7dea4d7947bfd09eea19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/2cdd579eeaa2e78e51c7509b50cc9fb89a956236", - "reference": "2cdd579eeaa2e78e51c7509b50cc9fb89a956236", + "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/705683a25bacf0d4860c7dea4d7947bfd09eea19", + "reference": "705683a25bacf0d4860c7dea4d7947bfd09eea19", "shasum": "" }, "require": { @@ -7538,7 +7561,7 @@ "description": "PHP core functions that throw exceptions instead of returning FALSE on error", "support": { "issues": "https://github.com/thecodingmachine/safe/issues", - "source": "https://github.com/thecodingmachine/safe/tree/v3.3.0" + "source": "https://github.com/thecodingmachine/safe/tree/v3.4.0" }, "funding": [ { @@ -7549,12 +7572,16 @@ "url": "https://github.com/shish", "type": "github" }, + { + "url": "https://github.com/silasjoisten", + "type": "github" + }, { "url": "https://github.com/staabm", "type": "github" } ], - "time": "2025-05-14T06:15:44+00:00" + "time": "2026-02-04T18:08:13+00:00" }, { "name": "theseer/tokenizer", @@ -7608,16 +7635,16 @@ }, { "name": "webmozart/assert", - "version": "2.1.2", + "version": "2.1.6", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "ce6a2f100c404b2d32a1dd1270f9b59ad4f57649" + "reference": "ff31ad6efc62e66e518fbab1cde3453d389bcdc8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/ce6a2f100c404b2d32a1dd1270f9b59ad4f57649", - "reference": "ce6a2f100c404b2d32a1dd1270f9b59ad4f57649", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/ff31ad6efc62e66e518fbab1cde3453d389bcdc8", + "reference": "ff31ad6efc62e66e518fbab1cde3453d389bcdc8", "shasum": "" }, "require": { @@ -7664,9 +7691,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/2.1.2" + "source": "https://github.com/webmozarts/assert/tree/2.1.6" }, - "time": "2026-01-13T14:02:24+00:00" + "time": "2026-02-27T10:28:38+00:00" }, { "name": "webmozart/glob", diff --git a/deptrac-baseline.yaml b/deptrac-baseline.yaml index 83ffb4da8..eb6a9bb9d 100644 --- a/deptrac-baseline.yaml +++ b/deptrac-baseline.yaml @@ -10,6 +10,8 @@ deptrac: - Patchlevel\EventSourcing\Subscription\RunMode Patchlevel\EventSourcing\Attribute\Projector: - Patchlevel\EventSourcing\Subscription\RunMode + Patchlevel\EventSourcing\Attribute\SharedApplyContext: + - Patchlevel\EventSourcing\Aggregate\AggregateRoot Patchlevel\EventSourcing\Attribute\Stream: - Patchlevel\EventSourcing\Aggregate\AggregateRoot Patchlevel\EventSourcing\Attribute\Subscriber: diff --git a/docs/pages/aggregate.md b/docs/pages/aggregate.md index 8439d427c..015f4de52 100644 --- a/docs/pages/aggregate.md +++ b/docs/pages/aggregate.md @@ -303,6 +303,11 @@ final class Profile extends BasicAggregateRoot } } ``` +!!! tip + + You don't necessarily need to define multiple `Apply` attributes with the event class + if you define the event types in the method using a union type. + ## Suppress missing apply methods Sometimes you have events that do not change the state of the aggregate itself, @@ -358,6 +363,38 @@ final class Profile extends BasicAggregateRoot When all events are suppressed, debugging becomes more difficult if you forget an apply method. +## Shared apply context + +When working with [micro-aggregates](./aggregate.md#micro-aggregates), +it’s common that events are applied by different aggregates. +As a result, an aggregate may receive events it does not handle, which can lead to multiple “missing apply” warnings. + +The `SharedApplyContext` attribute allows you to declare that several aggregates share the same apply context. +With this configuration, a missing apply is only reported if none of the shared aggregates handle the event. + +```php +use Patchlevel\EventSourcing\Aggregate\BasicAggregateRoot; +use Patchlevel\EventSourcing\Attribute\Aggregate; +use Patchlevel\EventSourcing\Attribute\SharedApplyContext; +use Patchlevel\EventSourcing\Attribute\Stream; + +#[Aggregate('profile')] +#[SharedApplyContext([PersonalInformation::class])] +final class Profile extends BasicAggregateRoot +{ +} + +#[Aggregate('personal_information')] +#[Stream(Profile::class)] +#[SharedApplyContext([Profile::class])] +final class PersonalInformation extends BasicAggregateRoot +{ +} +``` +!!! warning + + You need to define the `SharedApplyContext` attribute on all aggregates that share the apply context. + ## Stream Name !!! warning @@ -675,8 +712,10 @@ use Patchlevel\EventSourcing\Aggregate\Uuid; use Patchlevel\EventSourcing\Attribute\Aggregate; use Patchlevel\EventSourcing\Attribute\Apply; use Patchlevel\EventSourcing\Attribute\Id; +use Patchlevel\EventSourcing\Attribute\SharedApplyContext; #[Aggregate('order')] +#[SharedApplyContext([Shipping::class])] final class Order extends BasicAggregateRoot { #[Id] @@ -706,10 +745,12 @@ use Patchlevel\EventSourcing\Aggregate\Uuid; use Patchlevel\EventSourcing\Attribute\Aggregate; use Patchlevel\EventSourcing\Attribute\Apply; use Patchlevel\EventSourcing\Attribute\Id; +use Patchlevel\EventSourcing\Attribute\SharedApplyContext; use Patchlevel\EventSourcing\Attribute\Stream; #[Aggregate('shipping')] #[Stream(Order::class)] +#[SharedApplyContext([Order::class])] final class Shipping extends BasicAggregateRoot { #[Id] @@ -740,6 +781,11 @@ final class Shipping extends BasicAggregateRoot } } ``` +!!! tip + + With the [SharedApplyContext](./aggregate.md#shared-apply-context) attribute, + you can suppress missing applies for events that are handled by other aggregates. + ### Child Aggregates ??? example "Experimental" @@ -830,6 +876,53 @@ final class Order extends BasicAggregateRoot } } ``` + +## Auto Initialize + +??? example "Experimental" + + This feature is still experimental and may change in the future. + Use it with caution. + +Sometimes you want to be able to access an aggregate even if it has not yet been created in the system. +In this case, the aggregate should be automatically initialized if it cannot be found in the store. +To achieve this, the aggregate must mark the initialization method with the `AutoInitialize` attribute. +The method must be static, receives the aggregate ID as an argument and must return an instance of the aggregate. + +```php +use Patchlevel\EventSourcing\Aggregate\BasicAggregateRoot; +use Patchlevel\EventSourcing\Aggregate\Uuid; +use Patchlevel\EventSourcing\Attribute\Aggregate; +use Patchlevel\EventSourcing\Attribute\Apply; +use Patchlevel\EventSourcing\Attribute\AutoInitialize; +use Patchlevel\EventSourcing\Attribute\Id; + +#[Aggregate('profile')] +final class Profile extends BasicAggregateRoot +{ + #[Id] + private Uuid $id; + + #[AutoInitialize] + public static function initialize(Uuid $id): static + { + $self = new static(); + $self->recordThat(new ProfileCreated($id)); + + return $self; + } + + #[Apply] + public function applyProfileCreated(ProfileCreated $event): void + { + $this->id = $event->id; + } +} +``` +!!! note + + Recording events in the `initialize` method is optional but recommended. + ## Aggregate Root Registry The library needs to know about all aggregates so that the correct aggregate class is used to load from the database. diff --git a/docs/pages/command_bus.md b/docs/pages/command_bus.md index 75d23da1c..ea11339d7 100644 --- a/docs/pages/command_bus.md +++ b/docs/pages/command_bus.md @@ -45,6 +45,59 @@ final class CreateProfileHandler !!! tip A class can have multiple handle methods. + +### Multiple Handle Attributes + +A method can also have multiple `#[Handle]` attributes. +This is useful if you want to handle different commands with the same method. + +```php +use Patchlevel\EventSourcing\Attribute\Handle; + +final class CreateProfileHandler +{ + #[Handle(CreateProfile::class)] + #[Handle(UpdateProfile::class)] + public function __invoke(object $command): void + { + // handle both commands + } +} +``` + +### Union Types + +You can also use union types to handle multiple commands and the library will automatically detect the commands. + +```php +use Patchlevel\EventSourcing\Attribute\Handle; + +final class CreateProfileHandler +{ + #[Handle] + public function __invoke(CreateProfile|UpdateProfile $command): void + { + // handle both commands + } +} +``` + +### Inheritance + +The handler will also be invoked if the command implements an interface or extends a class that the handler expects. + +```php +use Patchlevel\EventSourcing\Attribute\Handle; + +final class CreateProfileHandler +{ + #[Handle] + public function __invoke(CommandInterface $command): void + { + // handle all commands that implement CommandInterface + } +} +``` ### Aggregate Handler @@ -138,6 +191,11 @@ final class Profile extends BasicAggregateRoot // ... apply methods } ``` +!!! tip + + If you want to automatically initialize an aggregate if it cannot be found in the store, + you can use the [Auto Initialize](aggregate.md#auto-initialize) feature. + #### Inject Service You can inject services into aggregate handler methods. diff --git a/docs/pages/repository.md b/docs/pages/repository.md index cd0cd0a42..5285658d7 100644 --- a/docs/pages/repository.md +++ b/docs/pages/repository.md @@ -198,12 +198,17 @@ $profile = $repository->load($id); !!! warning When the method is called, the aggregate is always reloaded and rebuilt from the database. - + !!! note You can only fetch one aggregate at a time and don't do any complex queries either. Projections are used for this purpose. - + +!!! tip + + If you want to automatically initialize an aggregate if it cannot be found in the store, + you can use the [Auto Initialize](aggregate.md#auto-initialize) feature. + ### Has an aggregate You can also check whether an `aggregate` with a certain id exists. diff --git a/docs/pages/subscription.md b/docs/pages/subscription.md index b89aec427..65f6aa6ae 100644 --- a/docs/pages/subscription.md +++ b/docs/pages/subscription.md @@ -422,6 +422,11 @@ Default, we provide the following cleanup tasks for `doctrine/dbal`: | `DropIndexTask` | Drops an index from a table. | | `DropTableTask` | Drops a table. | +!!! note + + If you are passing connection registry, you can use the connection name as parameter. + The `connectionName` parameter is optional and defaults to the default connection. + !!! tip You can create your own cleanup tasks and handler. @@ -1054,11 +1059,9 @@ Lastly, we have to add the new handler to `DefaultCleaner`, which is responsible for cleaning up subscriptions. ```php -use Patchlevel\EventSourcing\Subscription\Cleanup\Dbal\DbalCleanupTaskHandler; use Patchlevel\EventSourcing\Subscription\Cleanup\DefaultCleaner; $cleaner = new DefaultCleaner([ - new DbalCleanupTaskHandler($projectionConnection), new MongodbCleanupTaskHandler($mongodbDatabase), ]); ``` @@ -1066,6 +1069,35 @@ $cleaner = new DefaultCleaner([ You need to pass the Cleaner to the Subscription Engine. +#### Dbal Cleanup Task Handler + +We provide a Dbal cleanup task handler by default. +More information about the available tasks can be found in the [Dbal Cleanup Tasks](#dbal-cleanup-tasks) documentation. + +```php +use Doctrine\Dbal\Connection; +use Patchlevel\EventSourcing\Subscription\Cleanup\Dbal\DbalCleanupTaskHandler; +use Patchlevel\EventSourcing\Subscription\Cleanup\DefaultCleaner; + +/** @var Connection $connection */ +$cleaner = new DefaultCleaner([ + new DbalCleanupTaskHandler($connection), +]); +``` +If you have multiple database connections and want to use the `DbalCleanupTaskHandler` to clean up the respective databases, +you can also pass a `ConnectionRegistry` (from `doctrine/persistence`) to the `DbalCleanupTaskHandler`. +Then you can pass the connection name as parameter in the cleanup task and the handler will use the corresponding connection to execute the task. + +```php +use Doctrine\Persistence\ConnectionRegistry; +use Patchlevel\EventSourcing\Subscription\Cleanup\Dbal\DbalCleanupTaskHandler; +use Patchlevel\EventSourcing\Subscription\Cleanup\DefaultCleaner; + +/** @var ConnectionRegistry $connectionRegistry */ +$cleaner = new DefaultCleaner([ + new DbalCleanupTaskHandler($connectionRegistry), +]); +``` ### Subscriber Accessor The subscriber accessor repository is responsible for providing the subscribers to the subscription engine. @@ -1315,6 +1347,18 @@ foreach ($subscriptions as $subscription) { echo $subscription->status()->value; } ``` +### Refresh + +If you change the metadata of a subscriber in the code (e.g. `runMode`, `group` or `cleanupTasks`), +you can use the `refresh` method to update the existing subscriptions in the store. + +```php +use Patchlevel\EventSourcing\Subscription\Engine\SubscriptionEngine; +use Patchlevel\EventSourcing\Subscription\Engine\SubscriptionEngineCriteria; + +/** @var SubscriptionEngine $subscriptionEngine */ +$subscriptionEngine->refresh(new SubscriptionEngineCriteria()); +``` ## Learn more * [How to use CLI commands](./cli.md) diff --git a/docs/pages/testing.md b/docs/pages/testing.md index d21f5d19a..55182ad7b 100644 --- a/docs/pages/testing.md +++ b/docs/pages/testing.md @@ -26,10 +26,21 @@ final class ProfileTest extends AggregateRootTestCase { $this ->when(static fn () => Profile::createProfile(new CreateProfile(ProfileId::fromString('1'), Email::fromString('hq@patchlevel.de')))) - ->then(new ProfileCreated(ProfileId::fromString('1'), Email::fromString('hq@patchlevel.de'))); + ->then( + new ProfileCreated(ProfileId::fromString('1'), Email::fromString('hq@patchlevel.de')), + static function (Profile $profile): void { + self::assertSame('1', $profile->id()->toString()); + self::assertSame('hq@patchlevel.de', $profile->email()->toString()); + self::assertSame(0, $profile->visited()); + }, + ); } } ``` +In addition to expected events, you can pass `Closure`s to `then`. +The closure receives the aggregate instance after `when`, so you can run PHPUnit assertions on aggregate state. +This support is available since `patchlevel/event-sourcing-phpunit` `1.5`. + You can also prepare the aggregate with events to set it to a specific state and then test whether it behaves as expected. @@ -50,7 +61,14 @@ final class ProfileTest extends AggregateRootTestCase ), ) ->when(static fn (Profile $profile) => $profile->visitProfile(ProfileId::fromString('2'))) - ->then(new ProfileVisited(ProfileId::fromString('2'))); + ->then( + new ProfileVisited(ProfileId::fromString('2')), + static function (Profile $profile): void { + self::assertSame('1', $profile->id()->toString()); + self::assertSame('hq@patchlevel.de', $profile->email()->toString()); + self::assertSame(1, $profile->visited()); + }, + ); } } ``` @@ -70,7 +88,10 @@ final class ProfileTest extends AggregateRootTestCase { $this ->when(new CreateProfile(ProfileId::fromString('1'), Email::fromString('hq@patchlevel.de'))) - ->then(new ProfileCreated(ProfileId::fromString('1'), Email::fromString('hq@patchlevel.de'))); + ->then( + new ProfileCreated(ProfileId::fromString('1'), Email::fromString('hq@patchlevel.de')), + static fn (Profile $profile) => self::assertSame('hq@patchlevel.de', $profile->email()->toString()), + ); } } ``` @@ -99,6 +120,7 @@ final class ProfileTest extends AggregateRootTestCase ) ->then( new ProfileVisited(ProfileId::fromString('2'), 'Extra Parameter / Dependency'), + static fn (Profile $profile) => self::assertSame(1, $profile->visited()), ); } } @@ -176,11 +198,14 @@ final class ProfileTest extends AggregateRootTestCase new ChangeEmail(ProfileId::fromString('1'), Email::fromString('new-hq@patchlevel.de')), $clock, ) - ->then(new EmailChanged( - ProfileId::fromString('1'), - Email::fromString('new-hq@patchlevel.de'), - new DateTimeImmutable('2021-01-01 00:00:10'), - )); + ->then( + new EmailChanged( + ProfileId::fromString('1'), + Email::fromString('new-hq@patchlevel.de'), + new DateTimeImmutable('2021-01-01 00:00:10'), + ), + static fn (Profile $profile) => self::assertSame('new-hq@patchlevel.de', $profile->email()->toString()), + ); } } ``` @@ -220,4 +245,4 @@ final class ProfileTest extends TestCase The `IncrementalRamseyUuidFactory` is only for testing purposes and supports only the version 7 what is used by the library. - \ No newline at end of file + diff --git a/docs/requirements.txt b/docs/requirements.txt index 91f2ec792..50d076b0a 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,11 +1,11 @@ mkdocs==1.6.1 -mike==2.1.3 +mike==2.1.4 markdown==3.10.2 -mkdocs-material==9.7.1 +mkdocs-material==9.7.6 # Markdown extensions -Pygments==2.19.2 -pymdown-extensions==10.20.1 +Pygments==2.20.0 +pymdown-extensions==10.21.2 # MkDocs plugins mkdocs-material-extensions==1.3.1 diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 070a80330..8f4bd55e6 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,7 +1,7 @@ parameters: ignoreErrors: - - message: '#^Cannot unset offset ''url'' on array\{application_name\?\: string, charset\?\: string, dbname\?\: string, defaultTableOptions\?\: array\, driver\?\: ''ibm_db2''\|''mysqli''\|''oci8''\|''pdo_mysql''\|''pdo_oci''\|''pdo_pgsql''\|''pdo_sqlite''\|''pdo_sqlsrv''\|''pgsql''\|''sqlite3''\|''sqlsrv'', driverClass\?\: class\-string\, driverOptions\?\: array\, host\?\: string, \.\.\.\}\.$#' + message: '#^Cannot unset offset ''url'' on array\{application_name\?\: string, charset\?\: string, defaultTableOptions\?\: array\, driver\?\: ''ibm_db2''\|''mysqli''\|''oci8''\|''pdo_mysql''\|''pdo_oci''\|''pdo_pgsql''\|''pdo_sqlite''\|''pdo_sqlsrv''\|''pgsql''\|''sqlite3''\|''sqlsrv'', driverClass\?\: class\-string\, driverOptions\?\: array\, host\?\: string, keepReplica\?\: bool, \.\.\.\}\.$#' identifier: unset.offset count: 1 path: src/Console/DoctrineHelper.php @@ -18,6 +18,42 @@ parameters: count: 1 path: src/Cryptography/DoctrineCipherKeyStore.php + - + message: '#^Offset ''crypto_iv'' does not exist on array\{id\: non\-empty\-string, subject_id\: non\-empty\-string, crypto_key\: non\-empty\-string, crypto_method\: non\-empty\-string, created_at\: non\-empty\-string\}\.$#' + identifier: offsetAccess.notFound + count: 1 + path: src/Cryptography/ExtensionDoctrineCipherKeyStore.php + + - + message: '#^Parameter \#1 \$string of function base64_decode expects string, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Cryptography/ExtensionDoctrineCipherKeyStore.php + + - + message: '#^Parameter \#2 \$subjectId of class Patchlevel\\Hydrator\\Extension\\Cryptography\\Cipher\\CipherKey constructor expects non\-empty\-string, string given\.$#' + identifier: argument.type + count: 1 + path: src/Cryptography/ExtensionDoctrineCipherKeyStore.php + + - + message: '#^Parameter \#3 \$key of class Patchlevel\\Hydrator\\Extension\\Cryptography\\Cipher\\CipherKey constructor expects non\-empty\-string, string given\.$#' + identifier: argument.type + count: 1 + path: src/Cryptography/ExtensionDoctrineCipherKeyStore.php + + - + message: '#^Parameter \#4 \$method of class Patchlevel\\Hydrator\\Extension\\Cryptography\\Cipher\\CipherKey constructor expects non\-empty\-string, string given\.$#' + identifier: argument.type + count: 1 + path: src/Cryptography/ExtensionDoctrineCipherKeyStore.php + + - + message: '#^Parameter \#5 \$createdAt of class Patchlevel\\Hydrator\\Extension\\Cryptography\\Cipher\\CipherKey constructor expects DateTimeImmutable, mixed given\.$#' + identifier: argument.type + count: 2 + path: src/Cryptography/ExtensionDoctrineCipherKeyStore.php + - message: '#^Call to function method_exists\(\) with ReflectionFunction and ''isAnonymous'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -285,19 +321,19 @@ parameters: - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertArrayHasKey\(\) with 0 and array\{array\\} will always evaluate to true\.$#' identifier: staticMethod.alreadyNarrowedType - count: 1 + count: 4 path: tests/Integration/PersonalData/PersonalDataTest.php - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Patchlevel\\\\EventSourcing\\\\Tests\\\\Integration\\\\PersonalData\\\\Profile'' and Patchlevel\\EventSourcing\\Tests\\Integration\\PersonalData\\Profile will always evaluate to true\.$#' identifier: staticMethod.alreadyNarrowedType - count: 6 + count: 8 path: tests/Integration/PersonalData/PersonalDataTest.php - message: '#^Parameter \#2 \$haystack of static method PHPUnit\\Framework\\Assert\:\:assertStringNotContainsString\(\) expects string, mixed given\.$#' identifier: argument.type - count: 1 + count: 3 path: tests/Integration/PersonalData/PersonalDataTest.php - @@ -312,6 +348,12 @@ parameters: count: 1 path: tests/Integration/Store/StreamDoctrineDbalStoreTest.php + - + message: '#^Parameter \#1 \$table of class Patchlevel\\EventSourcing\\Subscription\\Cleanup\\Dbal\\DropTableTask constructor expects non\-empty\-string, string given\.$#' + identifier: argument.type + count: 1 + path: tests/Integration/Subscription/Subscriber/ProfileProjectionWithCleanup.php + - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertArrayHasKey\(\) with 0 and array\{Patchlevel\\EventSourcing\\Subscription\\Subscription\} will always evaluate to true\.$#' identifier: staticMethod.alreadyNarrowedType @@ -336,18 +378,6 @@ parameters: count: 1 path: tests/Unit/Aggregate/AggregateRootTest.php - - - message: '#^Cannot access offset 0 on iterable\\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 2 - path: tests/Unit/CommandBus/AggregateHandlerProviderTest.php - - - - message: '#^Cannot call method callable\(\) on mixed\.$#' - identifier: method.nonObject - count: 2 - path: tests/Unit/CommandBus/AggregateHandlerProviderTest.php - - message: '#^Parameter \#2 \$aggregateClass of class Patchlevel\\EventSourcing\\CommandBus\\Handler\\CreateAggregateHandler constructor expects class\-string\, string given\.$#' identifier: argument.type @@ -366,18 +396,6 @@ parameters: count: 5 path: tests/Unit/CommandBus/InstantRetryCommandBusTest.php - - - message: '#^Cannot access offset 0 on iterable\\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 2 - path: tests/Unit/CommandBus/ServiceHandlerProviderTest.php - - - - message: '#^Cannot call method callable\(\) on mixed\.$#' - identifier: method.nonObject - count: 2 - path: tests/Unit/CommandBus/ServiceHandlerProviderTest.php - - message: '#^Parameter \#1 \$data of static method Patchlevel\\EventSourcing\\Tests\\Unit\\Fixture\\Message\:\:fromArray\(\) expects array\{id\: string, text\: string, createdAt\: string\}, array\ given\.$#' identifier: argument.type @@ -444,6 +462,12 @@ parameters: count: 1 path: tests/Unit/Fixture/ProfileWithHandler.php + - + message: '#^Property Patchlevel\\EventSourcing\\Tests\\Unit\\Fixture\\ProfileWithSharedApplyContext\:\:\$id is unused\.$#' + identifier: property.unused + count: 1 + path: tests/Unit/Fixture/ProfileWithSharedApplyContext.php + - message: '#^Property Patchlevel\\EventSourcing\\Tests\\Unit\\Fixture\\ProfileWithSuppressAll\:\:\$id is unused\.$#' identifier: property.unused diff --git a/src/Attribute/AutoInitialize.php b/src/Attribute/AutoInitialize.php new file mode 100644 index 000000000..fa175edd4 --- /dev/null +++ b/src/Attribute/AutoInitialize.php @@ -0,0 +1,13 @@ +> $aggregates */ + public function __construct( + public array $aggregates, + ) { + } +} diff --git a/src/CommandBus/AggregateHandlerProvider.php b/src/CommandBus/AggregateHandlerProvider.php index bdab44f70..13d050da0 100644 --- a/src/CommandBus/AggregateHandlerProvider.php +++ b/src/CommandBus/AggregateHandlerProvider.php @@ -11,6 +11,9 @@ use Patchlevel\EventSourcing\Repository\RepositoryManager; use Psr\Container\ContainerInterface; +use function class_implements; +use function class_parents; + final class AggregateHandlerProvider implements HandlerProvider { private bool $initialized = false; @@ -36,7 +39,9 @@ public function handlerForCommand(string $commandClass): iterable $this->initialize(); } - return $this->handlers[$commandClass] ?? []; + foreach (self::resolveClasses($commandClass) as $class) { + yield from $this->handlers[$class] ?? []; + } } private function initialize(): void @@ -69,4 +74,19 @@ private function initialize(): void $this->initialized = true; } + + /** + * @param class-string $class + * + * @return array + */ + private static function resolveClasses(string $class): array + { + /** @var array $classes */ + $classes = [$class => $class] + + class_parents($class) + + class_implements($class); + + return $classes; + } } diff --git a/src/CommandBus/HandlerFinder.php b/src/CommandBus/HandlerFinder.php index f00af8609..69c0f12d6 100644 --- a/src/CommandBus/HandlerFinder.php +++ b/src/CommandBus/HandlerFinder.php @@ -6,11 +6,15 @@ use Patchlevel\EventSourcing\Attribute\Handle; use ReflectionClass; +use ReflectionMethod; use Symfony\Component\TypeInfo\Type\ObjectType; +use Symfony\Component\TypeInfo\Type\UnionType; use Symfony\Component\TypeInfo\TypeResolver\TypeResolver; final class HandlerFinder { + private static TypeResolver $typeResolver; + /** * @param class-string $classString * @@ -18,7 +22,6 @@ final class HandlerFinder */ public static function findInClass(string $classString): iterable { - $typeResolver = TypeResolver::create(); $reflectionClass = new ReflectionClass($classString); foreach ($reflectionClass->getMethods() as $reflectionMethod) { @@ -28,53 +31,88 @@ public static function findInClass(string $classString): iterable continue; } - $handle = $handleAttributes[0]->newInstance(); + foreach ($handleAttributes as $attribute) { + $handle = $attribute->newInstance(); + + if ($handle->commandClass !== null) { + yield new HandlerReference( + $handle->commandClass, + $reflectionMethod->getName(), + $reflectionMethod->isStatic(), + ); + + continue; + } + + foreach (self::guessHandledClasses($reflectionMethod) as $class) { + yield new HandlerReference( + $class, + $reflectionMethod->getName(), + $reflectionMethod->isStatic(), + ); + } + } + } + } - if ($handle->commandClass !== null) { - yield new HandlerReference( - $handle->commandClass, - $reflectionMethod->getName(), - $reflectionMethod->isStatic(), - ); + /** @return list */ + private static function guessHandledClasses(ReflectionMethod $reflectionMethod): array + { + $parameters = $reflectionMethod->getParameters(); - continue; - } + if ($parameters === []) { + throw InvalidHandleMethod::noParameters( + $reflectionMethod->getDeclaringClass()->getName(), + $reflectionMethod->getName(), + ); + } - $parameters = $reflectionMethod->getParameters(); + $reflectionType = $parameters[0]->getType(); - if ($parameters === []) { - throw InvalidHandleMethod::noParameters( - $reflectionMethod->getDeclaringClass()->getName(), - $reflectionMethod->getName(), - ); - } + if ($reflectionType === null) { + throw InvalidHandleMethod::incompatibleType( + $reflectionMethod->getDeclaringClass()->getName(), + $reflectionMethod->getName(), + ); + } - $reflectionType = $parameters[0]->getType(); + $type = self::typeResolver()->resolve($reflectionType); - if ($reflectionType === null) { - throw InvalidHandleMethod::incompatibleType( - $reflectionMethod->getDeclaringClass()->getName(), - $reflectionMethod->getName(), - ); - } + if ($type instanceof ObjectType) { + /** @var class-string $className */ + $className = $type->getClassName(); - $type = $typeResolver->resolve($reflectionType); + return [$className]; + } - if (!$type instanceof ObjectType) { - throw InvalidHandleMethod::incompatibleType( - $reflectionMethod->getDeclaringClass()->getName(), - $reflectionMethod->getName(), - ); - } + if ($type instanceof UnionType) { + $types = []; - /** @var class-string $commandClass */ - $commandClass = $type->getClassName(); + foreach ($type->getTypes() as $unionType) { + if (!$unionType instanceof ObjectType) { + throw InvalidHandleMethod::incompatibleType( + $reflectionMethod->getDeclaringClass()->getName(), + $reflectionMethod->getName(), + ); + } - yield new HandlerReference( - $commandClass, - $reflectionMethod->getName(), - $reflectionMethod->isStatic(), - ); + /** @var class-string $className */ + $className = $unionType->getClassName(); + + $types[] = $className; + } + + return $types; } + + throw InvalidHandleMethod::incompatibleType( + $reflectionMethod->getDeclaringClass()->getName(), + $reflectionMethod->getName(), + ); + } + + private static function typeResolver(): TypeResolver + { + return self::$typeResolver ??= TypeResolver::create(); } } diff --git a/src/CommandBus/ServiceHandlerProvider.php b/src/CommandBus/ServiceHandlerProvider.php index 656a936ee..82beb319d 100644 --- a/src/CommandBus/ServiceHandlerProvider.php +++ b/src/CommandBus/ServiceHandlerProvider.php @@ -4,6 +4,9 @@ namespace Patchlevel\EventSourcing\CommandBus; +use function class_implements; +use function class_parents; + final class ServiceHandlerProvider implements HandlerProvider { private bool $initialized = false; @@ -28,7 +31,9 @@ public function handlerForCommand(string $commandClass): iterable $this->initialize(); } - return $this->handlers[$commandClass] ?? []; + foreach (self::resolveClasses($commandClass) as $class) { + yield from $this->handlers[$class] ?? []; + } } private function initialize(): void @@ -51,4 +56,19 @@ private function initialize(): void $this->initialized = true; } + + /** + * @param class-string $class + * + * @return array + */ + private static function resolveClasses(string $class): array + { + /** @var array $classes */ + $classes = [$class => $class] + + class_parents($class) + + class_implements($class); + + return $classes; + } } diff --git a/src/Console/Command/SubscriptionRefreshCommand.php b/src/Console/Command/SubscriptionRefreshCommand.php new file mode 100644 index 000000000..fa6b0cdab --- /dev/null +++ b/src/Console/Command/SubscriptionRefreshCommand.php @@ -0,0 +1,36 @@ +engine instanceof CanRefreshSubscriptions) { + throw new LogicException(sprintf( + '"%s" does not implement "%s" and cannot call refresh.', + $this->engine::class, + CanRefreshSubscriptions::class, + )); + } + + $criteria = $this->subscriptionEngineCriteria($input); + $this->engine->refresh($criteria); + + return 0; + } +} diff --git a/src/Cryptography/ExtensionDoctrineCipherKeyStore.php b/src/Cryptography/ExtensionDoctrineCipherKeyStore.php new file mode 100644 index 000000000..8bb321319 --- /dev/null +++ b/src/Cryptography/ExtensionDoctrineCipherKeyStore.php @@ -0,0 +1,127 @@ +dateTimeType = Type::getType(Types::DATETIMETZ_IMMUTABLE); + } + + public function get(string $id): CipherKey + { + /** @var Row|false $result */ + $result = $this->connection->fetchAssociative( + "SELECT * FROM {$this->tableName} WHERE id = :id", + ['id' => $id], + ); + + if ($result === false) { + throw CipherKeyNotExists::forKeyId($id); + } + + return new CipherKey( + $result['id'], + $result['subject_id'], + base64_decode($result['crypto_key']), + $result['crypto_method'], + $this->dateTimeType->convertToPHPValue($result['created_at'], $this->connection->getDatabasePlatform()), + ); + } + + public function currentKeyFor(string $subjectId): CipherKey + { + /** @var Row|false $result */ + $result = $this->connection->fetchAssociative( + "SELECT * FROM {$this->tableName} WHERE subject_id = :subject_id", + ['subject_id' => $subjectId], + ); + + if ($result === false) { + throw CipherKeyNotExists::forSubjectId($subjectId); + } + + return new CipherKey( + $result['id'], + base64_decode($result['crypto_key']), + $result['crypto_method'], + base64_decode($result['crypto_iv']), + $this->dateTimeType->convertToPHPValue($result['created_at'], $this->connection->getDatabasePlatform()), + ); + } + + public function store(CipherKey $key): void + { + $this->connection->insert($this->tableName, [ + 'id' => $key->id, + 'subject_id' => $key->subjectId, + 'crypto_key' => base64_encode($key->key), + 'crypto_method' => $key->method, + 'created_at' => $this->dateTimeType->convertToDatabaseValue($key->createdAt, $this->connection->getDatabasePlatform()), + ]); + } + + public function remove(string $id): void + { + $this->connection->delete($this->tableName, ['id' => $id]); + } + + public function removeWithSubjectId(string $subjectId): void + { + $this->connection->delete($this->tableName, ['subject_id' => $subjectId]); + } + + public function configureSchema(Schema $schema, Connection $connection): void + { + if (!DoctrineHelper::sameDatabase($this->connection, $connection)) { + return; + } + + $table = $schema->createTable($this->tableName); + $table->addColumn('id', 'string') + ->setNotnull(true) + ->setLength(255); + $table->addColumn('subject_id', 'string') + ->setNotnull(true) + ->setLength(255); + $table->addColumn('crypto_key', 'string') + ->setNotnull(true) + ->setLength(255); + $table->addColumn('crypto_method', 'string') + ->setNotnull(true) + ->setLength(255); + $table->addColumn('created_at', 'datetimetz_immutable') + ->setNotnull(true); + $table->setPrimaryKey(['id']); + $table->addIndex(['subject_id']); + } +} diff --git a/src/Metadata/AggregateRoot/AggregateRootMetadata.php b/src/Metadata/AggregateRoot/AggregateRootMetadata.php index afe79ff98..bfbfb4d5c 100644 --- a/src/Metadata/AggregateRoot/AggregateRootMetadata.php +++ b/src/Metadata/AggregateRoot/AggregateRootMetadata.php @@ -28,6 +28,7 @@ public function __construct( /** @var list */ public readonly array $childAggregates = [], string|null $streamName = null, + public readonly string|null $autoInitializeMethod = null, ) { $this->streamName = $streamName ?? $this->name . '-{id}'; } diff --git a/src/Metadata/AggregateRoot/AttributeAggregateRootMetadataFactory.php b/src/Metadata/AggregateRoot/AttributeAggregateRootMetadataFactory.php index e622b4910..4ec2a8c11 100644 --- a/src/Metadata/AggregateRoot/AttributeAggregateRootMetadataFactory.php +++ b/src/Metadata/AggregateRoot/AttributeAggregateRootMetadataFactory.php @@ -7,8 +7,10 @@ use Patchlevel\EventSourcing\Aggregate\AggregateRoot; use Patchlevel\EventSourcing\Attribute\Aggregate; use Patchlevel\EventSourcing\Attribute\Apply; +use Patchlevel\EventSourcing\Attribute\AutoInitialize; use Patchlevel\EventSourcing\Attribute\ChildAggregate; use Patchlevel\EventSourcing\Attribute\Id; +use Patchlevel\EventSourcing\Attribute\SharedApplyContext; use Patchlevel\EventSourcing\Attribute\Snapshot as AttributeSnapshot; use Patchlevel\EventSourcing\Attribute\Stream; use Patchlevel\EventSourcing\Attribute\SuppressMissingApply; @@ -51,6 +53,7 @@ public function metadata(string $aggregate): AggregateRootMetadata [$suppressEvents, $suppressAll] = $this->findSuppressMissingApply($reflectionClass); $applyMethods = $this->findApplyMethods($reflectionClass, $aggregate, $childAggregates); $snapshot = $this->findSnapshot($reflectionClass); + $autoInitializeMethod = $this->findAutoInitializeMethod($reflectionClass); $metadata = new AggregateRootMetadata( $aggregate, @@ -62,6 +65,7 @@ public function metadata(string $aggregate): AggregateRootMetadata $snapshot, array_map(static fn (array $list) => $list[0], $childAggregates), $this->findStreamName($reflectionClass), + $autoInitializeMethod, ); $this->aggregateMetadata[$aggregate] = $metadata; @@ -73,17 +77,14 @@ public function metadata(string $aggregate): AggregateRootMetadata private function findSuppressMissingApply(ReflectionClass $reflector): array { $suppressEvents = []; - $suppressAll = false; $attributes = $reflector->getAttributes(SuppressMissingApply::class); - foreach ($attributes as $attribute) { - $instance = $attribute->newInstance(); + if ($attributes !== []) { + $instance = $attributes[0]->newInstance(); if ($instance->suppressAll) { - $suppressAll = true; - - continue; + return [[], true]; } foreach ($instance->suppressEvents as $event) { @@ -91,7 +92,27 @@ private function findSuppressMissingApply(ReflectionClass $reflector): array } } - return [$suppressEvents, $suppressAll]; + $attributes = $reflector->getAttributes(SharedApplyContext::class); + + if ($attributes !== []) { + $instance = $attributes[0]->newInstance(); + + foreach ($instance->aggregates as $aggregateClass) { + $reflectionClass = new ReflectionClass($aggregateClass); + + $applyMethods = $this->findApplyMethods( + $reflectionClass, + $aggregateClass, + $this->findChildAggregates($reflectionClass), + ); + + foreach ($applyMethods as $eventClass => $method) { + $suppressEvents[$eventClass] = true; + } + } + } + + return [$suppressEvents, false]; } private function findAggregateName(ReflectionClass $reflector): string @@ -158,6 +179,19 @@ private function findStreamName(ReflectionClass $reflector): string|null return $attributes[0]->newInstance()->name; } + private function findAutoInitializeMethod(ReflectionClass $reflector): string|null + { + foreach ($reflector->getMethods() as $method) { + $attributes = $method->getAttributes(AutoInitialize::class); + + if ($attributes !== []) { + return $method->getName(); + } + } + + return null; + } + /** @return list */ private function findChildAggregates(ReflectionClass $reflector): array { diff --git a/src/Repository/DefaultRepository.php b/src/Repository/DefaultRepository.php index 2a0bc24b8..2b99d6f23 100644 --- a/src/Repository/DefaultRepository.php +++ b/src/Repository/DefaultRepository.php @@ -40,6 +40,8 @@ use function array_map; use function assert; use function count; +use function is_a; +use function is_object; use function sprintf; /** @@ -138,6 +140,30 @@ public function load(AggregateRootId $id): AggregateRoot $firstMessage = $stream->current(); if ($firstMessage === null) { + if ($this->metadata->autoInitializeMethod) { + $aggregate = $this->metadata->className::{$this->metadata->autoInitializeMethod}($id); + + if (!is_object($aggregate) || !is_a($aggregate, $this->metadata->className, true)) { + throw new InvalidAggregate( + $this->metadata->autoInitializeMethod, + $this->metadata->className, + $aggregate, + ); + } + + $this->logger->debug( + sprintf( + 'Repository: Auto initialize aggregate "%s" with the id "%s".', + $this->metadata->name, + $id->toString(), + ), + ); + + $this->aggregateIsValid[$aggregate] = true; + + return $aggregate; + } + $this->logger->debug( sprintf( 'Repository: Aggregate "%s" with the id "%s" not found.', diff --git a/src/Repository/InvalidAggregate.php b/src/Repository/InvalidAggregate.php new file mode 100644 index 000000000..358af9f79 --- /dev/null +++ b/src/Repository/InvalidAggregate.php @@ -0,0 +1,26 @@ +connection->executeStatement(sprintf('LISTEN "%s"', $this->config['table_name'])); - /** @var PDO $nativeConnection */ - $nativeConnection = $this->connection->getNativeConnection(); - - $nativeConnection->pgsqlGetNotify(PDO::FETCH_ASSOC, $timeoutMilliseconds); + if (PHP_VERSION_ID >= 80400) { + /** @var Pgsql $nativeConnection */ + $nativeConnection = $this->connection->getNativeConnection(); + $nativeConnection->getNotify(PDO::FETCH_ASSOC, $timeoutMilliseconds); + } else { + /** @var PDO $nativeConnection */ + $nativeConnection = $this->connection->getNativeConnection(); + $nativeConnection->pgsqlGetNotify(PDO::FETCH_ASSOC, $timeoutMilliseconds); + } } public function setupSubscription(): void diff --git a/src/Store/StreamDoctrineDbalStore.php b/src/Store/StreamDoctrineDbalStore.php index 83a24a247..204dcd1f8 100644 --- a/src/Store/StreamDoctrineDbalStore.php +++ b/src/Store/StreamDoctrineDbalStore.php @@ -39,6 +39,7 @@ use Patchlevel\EventSourcing\Store\Header\RecordedOnHeader; use Patchlevel\EventSourcing\Store\Header\StreamNameHeader; use PDO; +use Pdo\Pgsql; use Psr\Clock\ClockInterface; use Ramsey\Uuid\Uuid; @@ -58,6 +59,8 @@ use function str_contains; use function str_replace; +use const PHP_VERSION_ID; + final class StreamDoctrineDbalStore implements StreamStore, SubscriptionStore, DoctrineSchemaConfigurator { /** @@ -465,10 +468,15 @@ public function wait(int $timeoutMilliseconds): void $this->connection->executeStatement(sprintf('LISTEN "%s"', $this->config['table_name'])); - /** @var PDO $nativeConnection */ - $nativeConnection = $this->connection->getNativeConnection(); - - $nativeConnection->pgsqlGetNotify(PDO::FETCH_ASSOC, $timeoutMilliseconds); + if (PHP_VERSION_ID >= 80400) { + /** @var Pgsql $nativeConnection */ + $nativeConnection = $this->connection->getNativeConnection(); + $nativeConnection->getNotify(PDO::FETCH_ASSOC, $timeoutMilliseconds); + } else { + /** @var PDO $nativeConnection */ + $nativeConnection = $this->connection->getNativeConnection(); + $nativeConnection->pgsqlGetNotify(PDO::FETCH_ASSOC, $timeoutMilliseconds); + } } public function setupSubscription(): void diff --git a/src/Subscription/Cleanup/Dbal/ConnectionNameNotSupported.php b/src/Subscription/Cleanup/Dbal/ConnectionNameNotSupported.php new file mode 100644 index 000000000..638478d0d --- /dev/null +++ b/src/Subscription/Cleanup/Dbal/ConnectionNameNotSupported.php @@ -0,0 +1,22 @@ +connection->createSchemaManager()->dropTable($task->table); + $schemaManager = $this->connection($task->connectionName)->createSchemaManager(); + if ($schemaManager->tablesExist([$task->table])) { + $schemaManager->dropTable($task->table); + } return; } if ($task instanceof DropIndexTask) { - $this->connection->createSchemaManager()->dropIndex($task->index, $task->table); + $schemaManager = $this->connection($task->connectionName)->createSchemaManager(); + + if (!$schemaManager->tablesExist([$task->table])) { + return; + } + + foreach ($schemaManager->introspectTableIndexesByUnquotedName($task->table) as $index) { + if (strtolower($index->getObjectName()->toString()) === strtolower($task->index)) { + $schemaManager->dropIndex($task->index, $task->table); + break; + } + } return; } @@ -36,4 +53,23 @@ public function supports(object $task): bool { return $task instanceof DropTableTask || $task instanceof DropIndexTask; } + + private function connection(string|null $connectionName): Connection + { + if ($this->connection instanceof ConnectionRegistry) { + $connection = $this->connection->getConnection($connectionName); + + if (!$connection instanceof Connection) { + throw new UnexpectedConnectionType($connectionName, Connection::class, $connection::class); + } + + return $connection; + } + + if ($connectionName === null) { + return $this->connection; + } + + throw new ConnectionNameNotSupported($connectionName); + } } diff --git a/src/Subscription/Cleanup/Dbal/DropIndexTask.php b/src/Subscription/Cleanup/Dbal/DropIndexTask.php index 227f2c558..5e657d266 100644 --- a/src/Subscription/Cleanup/Dbal/DropIndexTask.php +++ b/src/Subscription/Cleanup/Dbal/DropIndexTask.php @@ -6,9 +6,15 @@ final class DropIndexTask { + /** + * @param non-empty-string $index + * @param non-empty-string $table + * @param non-empty-string|null $connectionName + */ public function __construct( public readonly string $index, public readonly string $table, + public readonly string|null $connectionName = null, ) { } } diff --git a/src/Subscription/Cleanup/Dbal/DropTableTask.php b/src/Subscription/Cleanup/Dbal/DropTableTask.php index 46e62b4e2..62d5231c2 100644 --- a/src/Subscription/Cleanup/Dbal/DropTableTask.php +++ b/src/Subscription/Cleanup/Dbal/DropTableTask.php @@ -6,8 +6,13 @@ final class DropTableTask { + /** + * @param non-empty-string $table + * @param non-empty-string|null $connectionName + */ public function __construct( public readonly string $table, + public readonly string|null $connectionName = null, ) { } } diff --git a/src/Subscription/Cleanup/Dbal/UnexpectedConnectionType.php b/src/Subscription/Cleanup/Dbal/UnexpectedConnectionType.php new file mode 100644 index 000000000..cad8b2d1b --- /dev/null +++ b/src/Subscription/Cleanup/Dbal/UnexpectedConnectionType.php @@ -0,0 +1,28 @@ +parent->subscriptions($criteria); } + public function refresh(SubscriptionEngineCriteria|null $criteria = null): Result + { + if (!$this->parent instanceof CanRefreshSubscriptions) { + throw new LogicException(sprintf( + '"%s" does not implement "%s" and cannot call refresh.', + $this->parent::class, + CanRefreshSubscriptions::class, + )); + } + + return $this->parent->refresh($criteria); + } + private function mergeResult(ProcessedResult ...$results): ProcessedResult { $processedMessages = 0; diff --git a/src/Subscription/Engine/DefaultSubscriptionEngine.php b/src/Subscription/Engine/DefaultSubscriptionEngine.php index 8c8771733..98281c626 100644 --- a/src/Subscription/Engine/DefaultSubscriptionEngine.php +++ b/src/Subscription/Engine/DefaultSubscriptionEngine.php @@ -29,7 +29,7 @@ use function count; use function sprintf; -final class DefaultSubscriptionEngine implements SubscriptionEngine +final class DefaultSubscriptionEngine implements SubscriptionEngine, CanRefreshSubscriptions { private SubscriptionManager $subscriptionManager; @@ -823,6 +823,82 @@ public function subscriptions(SubscriptionEngineCriteria|null $criteria = null): ); } + public function refresh(SubscriptionEngineCriteria|null $criteria = null): Result + { + $criteria ??= new SubscriptionEngineCriteria(); + + $this->discoverNewSubscriptions(); + + $subscriptions = $this->subscriptionManager->find(new SubscriptionCriteria( + ids: $criteria->ids, + groups: $criteria->groups, + )); + + foreach ($subscriptions as $subscription) { + $subscriber = $this->subscriber($subscription->id()); + + if (!$subscriber) { + continue; + } + + $changed = false; + + if ($subscription->runMode() !== $subscriber->runMode()) { + $changed = true; + $oldRunMode = $subscription->runMode(); + $subscription->changeRunMode($subscriber->runMode()); + + $this->logger?->info( + sprintf( + 'Subscription Engine: Subscription "%s" run mode changed from "%s" to "%s".', + $subscription->id(), + $oldRunMode->value, + $subscription->runMode()->value, + ), + ); + } + + if ($subscription->group() !== $subscriber->group()) { + $changed = true; + $oldGroup = $subscription->group(); + $subscription->changeGroup($subscriber->group()); + + $this->logger?->info( + sprintf( + 'Subscription Engine: Subscription "%s" group changed from "%s" to "%s".', + $subscription->id(), + $oldGroup, + $subscription->group(), + ), + ); + } + + $cleanupTasks = $this->cleanupTasks($subscriber); + + if ($subscription->cleanupTasks() !== $cleanupTasks) { + $changed = true; + $subscription->replaceCleanupTasks($cleanupTasks); + + $this->logger?->info( + sprintf( + 'Subscription Engine: Subscription "%s" cleanup tasks changed.', + $subscription->id(), + ), + ); + } + + if (!$changed) { + continue; + } + + $this->subscriptionManager->update($subscription); + } + + $this->subscriptionManager->flush(); + + return new Result(); + } + private function handleMessage(int $index, Message $message, Subscription $subscription): Error|null { $subscriber = $this->subscriber($subscription->id()); diff --git a/src/Subscription/Engine/ThrowOnErrorSubscriptionEngine.php b/src/Subscription/Engine/ThrowOnErrorSubscriptionEngine.php index 35f62dbb9..2066bd1c2 100644 --- a/src/Subscription/Engine/ThrowOnErrorSubscriptionEngine.php +++ b/src/Subscription/Engine/ThrowOnErrorSubscriptionEngine.php @@ -4,9 +4,12 @@ namespace Patchlevel\EventSourcing\Subscription\Engine; +use LogicException; use Patchlevel\EventSourcing\Subscription\Subscription; -final class ThrowOnErrorSubscriptionEngine implements SubscriptionEngine +use function sprintf; + +final class ThrowOnErrorSubscriptionEngine implements SubscriptionEngine, CanRefreshSubscriptions { public function __construct( private readonly SubscriptionEngine $parent, @@ -54,6 +57,19 @@ public function subscriptions(SubscriptionEngineCriteria|null $criteria = null): return $this->parent->subscriptions($criteria); } + public function refresh(SubscriptionEngineCriteria|null $criteria = null): Result + { + if (!$this->parent instanceof CanRefreshSubscriptions) { + throw new LogicException(sprintf( + '"%s" does not implement "%s" and cannot call refresh.', + $this->parent::class, + CanRefreshSubscriptions::class, + )); + } + + return $this->throwOnError($this->parent->refresh($criteria)); + } + /** * @param T $result * diff --git a/src/Subscription/Subscription.php b/src/Subscription/Subscription.php index c2e1d56b4..0dd056de8 100644 --- a/src/Subscription/Subscription.php +++ b/src/Subscription/Subscription.php @@ -14,8 +14,8 @@ final class Subscription /** @param list|null $cleanupTasks */ public function __construct( private readonly string $id, - private readonly string $group = self::DEFAULT_GROUP, - private readonly RunMode $runMode = RunMode::FromBeginning, + private string $group = self::DEFAULT_GROUP, + private RunMode $runMode = RunMode::FromBeginning, private Status $status = Status::New, private int $position = 0, private SubscriptionError|null $error = null, @@ -35,11 +35,21 @@ public function group(): string return $this->group; } + public function changeGroup(string $group): void + { + $this->group = $group; + } + public function runMode(): RunMode { return $this->runMode; } + public function changeRunMode(RunMode $runMode): void + { + $this->runMode = $runMode; + } + public function status(): Status { return $this->status; @@ -193,6 +203,12 @@ public function updateLastSavedAt(DateTimeImmutable $lastSavedAt): void $this->lastSavedAt = $lastSavedAt; } + /** @param list|null $cleanupTask */ + public function replaceCleanupTasks(array|null $cleanupTask): void + { + $this->cleanupTasks = $cleanupTask; + } + /** @return list|null */ public function cleanupTasks(): array|null { diff --git a/tests/Integration/BasicImplementation/BasicIntegrationTest.php b/tests/Integration/BasicImplementation/BasicIntegrationTest.php index 19c11d0d3..b93116445 100644 --- a/tests/Integration/BasicImplementation/BasicIntegrationTest.php +++ b/tests/Integration/BasicImplementation/BasicIntegrationTest.php @@ -31,8 +31,10 @@ use Patchlevel\EventSourcing\Subscription\Store\InMemorySubscriptionStore; use Patchlevel\EventSourcing\Subscription\Subscriber\MetadataSubscriberAccessorRepository; use Patchlevel\EventSourcing\Tests\DbalManager; +use Patchlevel\EventSourcing\Tests\Integration\BasicImplementation\Command\AdjustStockForProduct; use Patchlevel\EventSourcing\Tests\Integration\BasicImplementation\Command\ChangeProfileName; use Patchlevel\EventSourcing\Tests\Integration\BasicImplementation\Command\CreateProfile; +use Patchlevel\EventSourcing\Tests\Integration\BasicImplementation\Command\DecreaseStockForProduct; use Patchlevel\EventSourcing\Tests\Integration\BasicImplementation\Events\NameChanged; use Patchlevel\EventSourcing\Tests\Integration\BasicImplementation\Events\ProfileCreated; use Patchlevel\EventSourcing\Tests\Integration\BasicImplementation\MessageDecorator\FooMessageDecorator; @@ -392,4 +394,50 @@ public function testQueryBus(): void self::assertSame('John Doe', $result); } + + public function testAggregateInitialization(): void + { + $store = new DoctrineDbalStore( + $this->connection, + DefaultEventSerializer::createFromPaths([__DIR__ . '/Events']), + DefaultHeadersSerializer::createFromPaths([ + __DIR__ . '/Header', + ]), + ); + + $aggregateRootRegistry = new AggregateRootRegistry(['stock' => Stock::class]); + + $manager = new DefaultRepositoryManager( + $aggregateRootRegistry, + $store, + null, + new DefaultSnapshotStore(['default' => new InMemorySnapshotAdapter()]), + new FooMessageDecorator(), + ); + + $commandBus = SyncCommandBus::createForAggregateHandlers( + $aggregateRootRegistry, + $manager, + ); + + $schemaDirector = new DoctrineSchemaDirector( + $this->connection, + $store, + ); + + $schemaDirector->create(); + + $stockId = StockId::create(); + $productId = ProductId::generate(); + + $commandBus->dispatch(new AdjustStockForProduct($stockId, $productId, 5)); + $commandBus->dispatch(new DecreaseStockForProduct($stockId, $productId, 3)); + + $repository = $manager->get(Stock::class); + $stock = $repository->load($stockId); + + self::assertEquals($stockId, $stock->aggregateRootId()); + self::assertSame(3, $stock->playhead()); + self::assertSame(2, $stock->stockFor($productId)); + } } diff --git a/tests/Integration/BasicImplementation/Command/AdjustStockForProduct.php b/tests/Integration/BasicImplementation/Command/AdjustStockForProduct.php new file mode 100644 index 000000000..e08242aab --- /dev/null +++ b/tests/Integration/BasicImplementation/Command/AdjustStockForProduct.php @@ -0,0 +1,20 @@ + */ + private array $stock; + + #[AutoInitialize] + public static function initialize(StockId $id): static + { + $stock = new self(); + $stock->recordThat(new StockCreated($id)); + + return $stock; + } + + public function id(): StockId + { + return $this->id; + } + + public function stockFor(ProductId $productId): int + { + return $this->stock[$productId->toString()] ?? 0; + } + + #[Handle] + public function decreaseStock(DecreaseStockForProduct $command): void + { + $this->recordThat(new StockDecreased($this->id, $command->productId, $command->quantity)); + } + + #[Handle] + public function adjustStock(AdjustStockForProduct $command): void + { + $this->recordThat(new StockAdjusted($this->id, $command->productId, $command->quantity)); + } + + #[Apply] + protected function applyStockCreated(StockCreated $event): void + { + $this->id = $event->stockId; + $this->stock = []; + } + + #[Apply] + protected function applyStockDecreased(StockDecreased $event): void + { + $this->stock[$event->productId->toString()] = $this->stockFor($event->productId) - $event->quantity; + } + + #[Apply] + protected function applyStockAdjusted(StockAdjusted $event): void + { + $this->stock[$event->productId->toString()] = $event->quantity; + } +} diff --git a/tests/Integration/BasicImplementation/StockId.php b/tests/Integration/BasicImplementation/StockId.php new file mode 100644 index 000000000..92fcc68d4 --- /dev/null +++ b/tests/Integration/BasicImplementation/StockId.php @@ -0,0 +1,18 @@ +playhead()); self::assertSame('unknown', $profile->name()); } + + public function testWithStackHydrator(): void + { + $cipherKeyStore = new ExtensionDoctrineCipherKeyStore($this->connection); + $extension = new CryptographyExtension( + BaseCryptographer::createWithOpenssl($cipherKeyStore), + ); + + $eventSerializer = new DefaultEventSerializer( + (new AttributeEventRegistryFactory())->create([__DIR__ . '/Events']), + (new StackHydratorBuilder()) + ->useExtension(new CoreExtension()) + ->useExtension($extension) + ->build(), + ); + + $store = new DoctrineDbalStore( + $this->connection, + $eventSerializer, + ); + + $manager = new DefaultRepositoryManager( + new AggregateRootRegistry(['profile' => Profile::class]), + $store, + ); + + $repository = $manager->get(Profile::class); + + $schemaDirector = new DoctrineSchemaDirector( + $this->connection, + new ChainDoctrineSchemaConfigurator([ + $store, + $cipherKeyStore, + ]), + ); + + $schemaDirector->create(); + + $profileId = ProfileId::generate(); + $profile = Profile::create($profileId, 'John'); + + $repository->save($profile); + + $profile = $repository->load($profileId); + + self::assertInstanceOf(Profile::class, $profile); + self::assertEquals($profileId, $profile->aggregateRootId()); + self::assertSame(1, $profile->playhead()); + self::assertSame('John', $profile->name()); + + $result = $this->connection->fetchAllAssociative('SELECT * FROM eventstore'); + + self::assertCount(1, $result); + self::assertArrayHasKey(0, $result); + + $row = $result[0]; + + self::assertStringNotContainsString('John', $row['payload']); + } + + public function testWithStackHydratorWithLegacyFallback(): void + { + $extensionCipherKeyStore = new ExtensionDoctrineCipherKeyStore($this->connection); + $legacyCipherKeyStore = new DoctrineCipherKeyStore($this->connection); + + $cryptographer = PersonalDataPayloadCryptographer::createWithOpenssl($legacyCipherKeyStore); + + $store = new DoctrineDbalStore( + $this->connection, + DefaultEventSerializer::createFromPaths([__DIR__ . '/Events'], cryptographer: $cryptographer), + ); + + $manager = new DefaultRepositoryManager( + new AggregateRootRegistry(['profile' => Profile::class]), + $store, + ); + + $repository = $manager->get(Profile::class); + + $schemaDirector = new DoctrineSchemaDirector( + $this->connection, + new ChainDoctrineSchemaConfigurator([ + $store, + $legacyCipherKeyStore, + $extensionCipherKeyStore, + ]), + ); + + $schemaDirector->create(); + + $profileId = ProfileId::generate(); + $profile = Profile::create($profileId, 'John'); + + $repository->save($profile); + + // switch to new hydrator + + $extension = new CryptographyExtension( + BaseCryptographer::createWithOpenssl($extensionCipherKeyStore), + PersonalDataPayloadCryptographer::createWithOpenssl($legacyCipherKeyStore), + ); + + $eventSerializer = new DefaultEventSerializer( + (new AttributeEventRegistryFactory())->create([__DIR__ . '/Events']), + (new StackHydratorBuilder()) + ->useExtension(new CoreExtension()) + ->useExtension($extension) + ->build(), + ); + + $store = new DoctrineDbalStore( + $this->connection, + $eventSerializer, + ); + + $manager = new DefaultRepositoryManager( + new AggregateRootRegistry(['profile' => Profile::class]), + $store, + ); + + $repository = $manager->get(Profile::class); + $profile = $repository->load($profileId); + + self::assertInstanceOf(Profile::class, $profile); + self::assertEquals($profileId, $profile->aggregateRootId()); + self::assertSame(1, $profile->playhead()); + self::assertSame('John', $profile->name()); + + $result = $this->connection->fetchAllAssociative('SELECT * FROM eventstore'); + + self::assertCount(1, $result); + self::assertArrayHasKey(0, $result); + + $row = $result[0]; + + self::assertStringNotContainsString('John', $row['payload']); + + $result = $this->connection->fetchAllAssociative('SELECT * FROM crypto_keys'); + + self::assertCount(1, $result); + self::assertArrayHasKey(0, $result); + + $row = $result[0]; + + self::assertEquals($profileId->toString(), $row['subject_id']); + + $result = $this->connection->fetchAllAssociative('SELECT * FROM cryptography_keys'); + + self::assertCount(0, $result); + + $profile->changeName('John 2'); + $repository->save($profile); + + $result = $this->connection->fetchAllAssociative('SELECT * FROM cryptography_keys'); + + self::assertCount(1, $result); + self::assertEquals($profileId->toString(), $row['subject_id']); + } } diff --git a/tests/Integration/Subscription/SubscriptionTest.php b/tests/Integration/Subscription/SubscriptionTest.php index a65f51b87..4e1684b2c 100644 --- a/tests/Integration/Subscription/SubscriptionTest.php +++ b/tests/Integration/Subscription/SubscriptionTest.php @@ -28,6 +28,7 @@ use Patchlevel\EventSourcing\Subscription\Engine\DefaultSubscriptionEngine; use Patchlevel\EventSourcing\Subscription\Engine\EventFilteredStoreMessageLoader; use Patchlevel\EventSourcing\Subscription\Engine\GapResolverStoreMessageLoader; +use Patchlevel\EventSourcing\Subscription\Engine\MessageLoader; use Patchlevel\EventSourcing\Subscription\Engine\StoreMessageLoader; use Patchlevel\EventSourcing\Subscription\Engine\SubscriptionEngineCriteria; use Patchlevel\EventSourcing\Subscription\RetryStrategy\ClockBasedRetryStrategy; @@ -1565,6 +1566,72 @@ public function testLookup(): void self::assertSame('Hans', $result['name']); } + public function testRefreshSubscriptions(): void + { + $store = new DoctrineDbalStore( + $this->connection, + DefaultEventSerializer::createFromPaths([__DIR__ . '/Events']), + ); + + $clock = new FrozenClock(new DateTimeImmutable('2021-01-01T00:00:00')); + + $subscriptionStore = new DoctrineSubscriptionStore( + $this->connection, + $clock, + ); + + $schemaDirector = new DoctrineSchemaDirector( + $this->connection, + new ChainDoctrineSchemaConfigurator([ + $store, + $subscriptionStore, + ]), + ); + + $schemaDirector->create(); + + $subscriber = new #[Subscriber('test', RunMode::FromBeginning, group: 'default')] + class { + }; + + $subscriberRepository = new MetadataSubscriberAccessorRepository([$subscriber]); + + $engine = new DefaultSubscriptionEngine( + $this->createMock(MessageLoader::class), + $subscriptionStore, + $subscriberRepository, + ); + + $engine->setup(); + + $subscriptions = $engine->subscriptions(); + self::assertCount(1, $subscriptions); + self::assertEquals('test', $subscriptions[0]->id()); + self::assertEquals('default', $subscriptions[0]->group()); + self::assertEquals(RunMode::FromBeginning, $subscriptions[0]->runMode()); + + // change subscriber metadata + $newSubscriber = new #[Subscriber('test', RunMode::FromNow, group: 'new-group')] + class { + }; + + $newSubscriberRepository = new MetadataSubscriberAccessorRepository([$newSubscriber]); + + $engine = new DefaultSubscriptionEngine( + $this->createMock(MessageLoader::class), + $subscriptionStore, + $newSubscriberRepository, + ); + + $engine->refresh(); + + $subscriptions = $engine->subscriptions(); + self::assertCount(1, $subscriptions); + self::assertEquals('test', $subscriptions[0]->id()); + self::assertEquals('new-group', $subscriptions[0]->group()); + self::assertEquals(RunMode::FromNow, $subscriptions[0]->runMode()); + } + /** @param list $subscriptions */ private static function findSubscription(array $subscriptions, string $id): Subscription { diff --git a/tests/Unit/CommandBus/AggregateHandlerProviderTest.php b/tests/Unit/CommandBus/AggregateHandlerProviderTest.php index 5db923df9..e4ece227d 100644 --- a/tests/Unit/CommandBus/AggregateHandlerProviderTest.php +++ b/tests/Unit/CommandBus/AggregateHandlerProviderTest.php @@ -10,9 +10,12 @@ use Patchlevel\EventSourcing\CommandBus\Handler\UpdateAggregateHandler; use Patchlevel\EventSourcing\Metadata\AggregateRoot\AggregateRootRegistry; use Patchlevel\EventSourcing\Repository\RepositoryManager; +use Patchlevel\EventSourcing\Tests\Unit\Fixture\BaseCommand; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ChangeProfileName; use Patchlevel\EventSourcing\Tests\Unit\Fixture\CreateProfile; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileWithHandler; +use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileWithInheritanceHandler; +use Patchlevel\EventSourcing\Tests\Unit\Fixture\SomeCommand; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; @@ -28,7 +31,7 @@ public function testEmpty(): void $repositoryManager, ); - $result = $provider->handlerForCommand(CreateProfile::class); + $result = [...$provider->handlerForCommand(CreateProfile::class)]; self::assertCount(0, $result); } @@ -42,7 +45,7 @@ public function testGetCreateHandler(): void $repositoryManager, ); - $result = $provider->handlerForCommand(CreateProfile::class); + $result = [...$provider->handlerForCommand(CreateProfile::class)]; $handler = new CreateAggregateHandler( $repositoryManager, @@ -64,7 +67,7 @@ public function testGetUpdateHandler(): void $repositoryManager, ); - $result = $provider->handlerForCommand(ChangeProfileName::class); + $result = [...$provider->handlerForCommand(ChangeProfileName::class)]; $handler = new UpdateAggregateHandler( $repositoryManager, @@ -76,4 +79,52 @@ public function testGetUpdateHandler(): void self::assertCount(1, $result); self::assertEquals($handler->__invoke(...), $result[0]->callable()); } + + public function testGetHandlerByInterface(): void + { + $repositoryManager = $this->createMock(RepositoryManager::class); + $command = new class () implements SomeCommand { + }; + + $provider = new AggregateHandlerProvider( + new AggregateRootRegistry(['profile' => ProfileWithInheritanceHandler::class]), + $repositoryManager, + ); + + $result = [...$provider->handlerForCommand($command::class)]; + + $handler = new UpdateAggregateHandler( + $repositoryManager, + ProfileWithInheritanceHandler::class, + 'handleInterface', + new DefaultParameterResolver(), + ); + + self::assertCount(1, $result); + self::assertEquals($handler->__invoke(...), $result[0]->callable()); + } + + public function testGetHandlerByAbstractClass(): void + { + $repositoryManager = $this->createMock(RepositoryManager::class); + $command = new class () extends BaseCommand { + }; + + $provider = new AggregateHandlerProvider( + new AggregateRootRegistry(['profile' => ProfileWithInheritanceHandler::class]), + $repositoryManager, + ); + + $result = [...$provider->handlerForCommand($command::class)]; + + $handler = new UpdateAggregateHandler( + $repositoryManager, + ProfileWithInheritanceHandler::class, + 'handleAbstract', + new DefaultParameterResolver(), + ); + + self::assertCount(1, $result); + self::assertEquals($handler->__invoke(...), $result[0]->callable()); + } } diff --git a/tests/Unit/CommandBus/HandlerFinderTest.php b/tests/Unit/CommandBus/HandlerFinderTest.php index 6a038def0..5b11014d0 100644 --- a/tests/Unit/CommandBus/HandlerFinderTest.php +++ b/tests/Unit/CommandBus/HandlerFinderTest.php @@ -8,6 +8,7 @@ use Patchlevel\EventSourcing\CommandBus\HandlerFinder; use Patchlevel\EventSourcing\CommandBus\HandlerReference; use Patchlevel\EventSourcing\CommandBus\InvalidHandleMethod; +use Patchlevel\EventSourcing\Tests\Unit\Fixture\ChangeProfileName; use Patchlevel\EventSourcing\Tests\Unit\Fixture\CreateProfile; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; @@ -105,4 +106,39 @@ public function handle(CreateProfile $command): void new HandlerReference(CreateProfile::class, 'handle', false), ], $result); } + + public function testWithUnionTypeGuessing(): void + { + $class = new class () { + #[Handle] + public function handle(CreateProfile|ChangeProfileName $command): void + { + } + }; + + $result = [...HandlerFinder::findInClass($class::class)]; + + self::assertEquals([ + new HandlerReference(ChangeProfileName::class, 'handle', false), + new HandlerReference(CreateProfile::class, 'handle', false), + ], $result); + } + + public function testWithMultipleAttributes(): void + { + $class = new class () { + #[Handle(CreateProfile::class)] + #[Handle(ChangeProfileName::class)] + public function handle(CreateProfile $command): void + { + } + }; + + $result = [...HandlerFinder::findInClass($class::class)]; + + self::assertEquals([ + new HandlerReference(CreateProfile::class, 'handle', false), + new HandlerReference(ChangeProfileName::class, 'handle', false), + ], $result); + } } diff --git a/tests/Unit/CommandBus/ServiceHandlerProviderTest.php b/tests/Unit/CommandBus/ServiceHandlerProviderTest.php index 571f874a6..06a06a780 100644 --- a/tests/Unit/CommandBus/ServiceHandlerProviderTest.php +++ b/tests/Unit/CommandBus/ServiceHandlerProviderTest.php @@ -6,7 +6,9 @@ use Patchlevel\EventSourcing\Attribute\Handle; use Patchlevel\EventSourcing\CommandBus\ServiceHandlerProvider; +use Patchlevel\EventSourcing\Tests\Unit\Fixture\BaseCommand; use Patchlevel\EventSourcing\Tests\Unit\Fixture\CreateProfile; +use Patchlevel\EventSourcing\Tests\Unit\Fixture\SomeCommand; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; @@ -16,7 +18,7 @@ final class ServiceHandlerProviderTest extends TestCase public function testEmpty(): void { $provider = new ServiceHandlerProvider([]); - $result = $provider->handlerForCommand(CreateProfile::class); + $result = [...$provider->handlerForCommand(CreateProfile::class)]; self::assertCount(0, $result); } @@ -32,7 +34,7 @@ public function handle(): void $provider = new ServiceHandlerProvider([$class]); - $result = $provider->handlerForCommand(CreateProfile::class); + $result = [...$provider->handlerForCommand(CreateProfile::class)]; self::assertCount(1, $result); self::assertEquals($class->handle(...), $result[0]->callable()); @@ -49,9 +51,49 @@ public static function handle(): void $provider = new ServiceHandlerProvider([$class]); - $result = $provider->handlerForCommand(CreateProfile::class); + $result = [...$provider->handlerForCommand(CreateProfile::class)]; self::assertCount(1, $result); self::assertEquals($class::handle(...), $result[0]->callable()); } + + public function testFindHandlerByInterface(): void + { + $command = new class () implements SomeCommand { + }; + + $class = new class () { + #[Handle] + public function handle(SomeCommand $command): void + { + } + }; + + $provider = new ServiceHandlerProvider([$class]); + + $result = [...$provider->handlerForCommand($command::class)]; + + self::assertCount(1, $result); + self::assertEquals($class->handle(...), $result[0]->callable()); + } + + public function testFindHandlerByParentClass(): void + { + $command = new class () extends BaseCommand { + }; + + $class = new class () { + #[Handle] + public function handle(BaseCommand $command): void + { + } + }; + + $provider = new ServiceHandlerProvider([$class]); + + $result = [...$provider->handlerForCommand($command::class)]; + + self::assertCount(1, $result); + self::assertEquals($class->handle(...), $result[0]->callable()); + } } diff --git a/tests/Unit/Fixture/AutoInitializableProfile.php b/tests/Unit/Fixture/AutoInitializableProfile.php new file mode 100644 index 000000000..1d043f2f1 --- /dev/null +++ b/tests/Unit/Fixture/AutoInitializableProfile.php @@ -0,0 +1,38 @@ +id; + } + + #[AutoInitialize] + public static function initialize(ProfileId $id): static + { + $self = new self(); + $self->recordThat(new ProfileCreated($id, Email::fromString('initial@patchlevel.de'))); + + return $self; + } + + #[Apply] + protected function applyProfileCreated(ProfileCreated $event): void + { + $this->id = $event->profileId; + } +} diff --git a/tests/Unit/Fixture/BaseCommand.php b/tests/Unit/Fixture/BaseCommand.php new file mode 100644 index 000000000..d7aedbfd5 --- /dev/null +++ b/tests/Unit/Fixture/BaseCommand.php @@ -0,0 +1,9 @@ +recordThat(new SplittingEvent($this->email, $this->visits)); } - #[Apply(ProfileCreated::class)] - #[Apply(ProfileVisited::class)] + #[Apply] protected function applyProfileCreated(ProfileCreated|ProfileVisited $event): void { if ($event instanceof ProfileCreated) { diff --git a/tests/Unit/Fixture/ProfileWithInheritanceHandler.php b/tests/Unit/Fixture/ProfileWithInheritanceHandler.php new file mode 100644 index 000000000..b1828ad7e --- /dev/null +++ b/tests/Unit/Fixture/ProfileWithInheritanceHandler.php @@ -0,0 +1,33 @@ +id); + } +} diff --git a/tests/Unit/Fixture/ProfileWithSharedApplyContext.php b/tests/Unit/Fixture/ProfileWithSharedApplyContext.php new file mode 100644 index 000000000..34eb11971 --- /dev/null +++ b/tests/Unit/Fixture/ProfileWithSharedApplyContext.php @@ -0,0 +1,18 @@ +metadata(ProfileWithBrokenApplyBothUsage::class); } + + public function testSuppressAll(): void + { + $metadataFactory = new AttributeAggregateRootMetadataFactory(); + $metadata = $metadataFactory->metadata(ProfileWithSuppressAll::class); + + self::assertTrue($metadata->suppressAll); + self::assertSame([], $metadata->suppressEvents); + } + + public function testSharedApplyContext(): void + { + $metadataFactory = new AttributeAggregateRootMetadataFactory(); + $metadata = $metadataFactory->metadata(ProfileWithSharedApplyContext::class); + + self::assertFalse($metadata->suppressAll); + self::assertSame([ProfileCreated::class => true], $metadata->suppressEvents); + } } diff --git a/tests/Unit/Repository/DefaultRepositoryTest.php b/tests/Unit/Repository/DefaultRepositoryTest.php index 6560d8367..44a93b9d9 100644 --- a/tests/Unit/Repository/DefaultRepositoryTest.php +++ b/tests/Unit/Repository/DefaultRepositoryTest.php @@ -34,6 +34,7 @@ use Patchlevel\EventSourcing\Store\Store; use Patchlevel\EventSourcing\Store\StreamStore; use Patchlevel\EventSourcing\Store\UniqueConstraintViolation; +use Patchlevel\EventSourcing\Tests\Unit\Fixture\AutoInitializableProfile; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Profile; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; @@ -750,4 +751,20 @@ public function testLoadAggregateFromOtherStream(): void self::assertEquals(ProfileId::fromString('1'), $aggregate->id()); self::assertEquals(Email::fromString('hallo@patchlevel.de'), $aggregate->email()); } + + public function testLoadInitializableAggregate(): void + { + $store = $this->createMock(Store::class); + $store + ->expects($this->once()) + ->method('load') + ->willReturn(new ArrayStream([])); + + $repository = new DefaultRepository($store, AutoInitializableProfile::metadata()); + $aggregate = $repository->load(ProfileId::fromString('1')); + + self::assertInstanceOf(AutoInitializableProfile::class, $aggregate); + self::assertSame(1, $aggregate->playhead()); + self::assertEquals(ProfileId::fromString('1'), $aggregate->id()); + } } diff --git a/tests/Unit/Store/DoctrineDbalStoreTest.php b/tests/Unit/Store/DoctrineDbalStoreTest.php index 0d968ff5d..aa887a29c 100644 --- a/tests/Unit/Store/DoctrineDbalStoreTest.php +++ b/tests/Unit/Store/DoctrineDbalStoreTest.php @@ -41,6 +41,7 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileEmailChanged; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use PDO; +use Pdo\Pgsql; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhp; use PHPUnit\Framework\TestCase; @@ -1343,7 +1344,39 @@ public function testSetupSubscriptionNotPostgres(): void $doctrineDbalStore->setupSubscription(); } + #[RequiresPhp('>= 8.4')] public function testWait(): void + { + $nativeConnection = $this->createMock(Pgsql::class); + $nativeConnection + ->expects($this->once()) + ->method('getNotify') + ->with(PDO::FETCH_ASSOC, 100) + ->willReturn([]); + + $connection = $this->createMock(Connection::class); + $connection->expects($this->once())->method('executeStatement')->with('LISTEN "eventstore"') + ->willReturn(1); + $connection->expects($this->once())->method('getNativeConnection') + ->willReturn($nativeConnection); + + $abstractPlatform = $this->createMock(PostgreSQLPlatform::class); + $connection->expects($this->once())->method('getDatabasePlatform')->willReturn($abstractPlatform); + + $eventSerializer = $this->createMock(EventSerializer::class); + $headersSerializer = $this->createMock(HeadersSerializer::class); + + $doctrineDbalStore = new DoctrineDbalStore( + $connection, + $eventSerializer, + $headersSerializer, + ); + + $doctrineDbalStore->wait(100); + } + + #[RequiresPhp('< 8.4')] + public function testWaitDeprecatedFunction(): void { $nativeConnection = $this->getMockBuilder(PDO::class) ->disableOriginalConstructor() diff --git a/tests/Unit/Store/StreamDoctrineDbalStoreTest.php b/tests/Unit/Store/StreamDoctrineDbalStoreTest.php index c78414c2c..35d50426c 100644 --- a/tests/Unit/Store/StreamDoctrineDbalStoreTest.php +++ b/tests/Unit/Store/StreamDoctrineDbalStoreTest.php @@ -44,7 +44,9 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileEmailChanged; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use PDO; +use Pdo\Pgsql; use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\RequiresPhp; use PHPUnit\Framework\TestCase; use Psr\Clock\ClockInterface; use RuntimeException; @@ -1367,7 +1369,43 @@ public function testSetupSubscriptionNotPostgres(): void $doctrineDbalStore->setupSubscription(); } + #[RequiresPhp('>= 8.4')] public function testWait(): void + { + $nativeConnection = $this->createMock(Pgsql::class); + $nativeConnection + ->expects($this->once()) + ->method('getNotify') + ->with(PDO::FETCH_ASSOC, 100) + ->willReturn([]); + + $connection = $this->createMock(Connection::class); + $connection + ->expects($this->once()) + ->method('executeStatement') + ->with('LISTEN "event_store"') + ->willReturn(1); + $connection + ->expects($this->once()) + ->method('getNativeConnection') + ->willReturn($nativeConnection); + + $abstractPlatform = $this->createMock(PostgreSQLPlatform::class); + $connection->method('getDatabasePlatform')->willReturn($abstractPlatform); + + $eventSerializer = $this->createMock(EventSerializer::class); + $headersSerializer = $this->createMock(HeadersSerializer::class); + + $doctrineDbalStore = new StreamDoctrineDbalStore( + $connection, + $eventSerializer, + $headersSerializer, + ); + $doctrineDbalStore->wait(100); + } + + #[RequiresPhp('< 8.4')] + public function testWaitDeprecatedFunction(): void { $nativeConnection = $this->getMockBuilder(PDO::class) ->disableOriginalConstructor() diff --git a/tests/Unit/Subscription/Cleanup/Dbal/DbalCleanupTaskHandlerTest.php b/tests/Unit/Subscription/Cleanup/Dbal/DbalCleanupTaskHandlerTest.php index 3b04a21c3..373cb25fa 100644 --- a/tests/Unit/Subscription/Cleanup/Dbal/DbalCleanupTaskHandlerTest.php +++ b/tests/Unit/Subscription/Cleanup/Dbal/DbalCleanupTaskHandlerTest.php @@ -6,10 +6,14 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\Schema\AbstractSchemaManager; +use Doctrine\DBAL\Schema\Index; +use Doctrine\Persistence\ConnectionRegistry; use Patchlevel\EventSourcing\Subscription\Cleanup\CleanupTaskNotSupported; +use Patchlevel\EventSourcing\Subscription\Cleanup\Dbal\ConnectionNameNotSupported; use Patchlevel\EventSourcing\Subscription\Cleanup\Dbal\DbalCleanupTaskHandler; use Patchlevel\EventSourcing\Subscription\Cleanup\Dbal\DropIndexTask; use Patchlevel\EventSourcing\Subscription\Cleanup\Dbal\DropTableTask; +use Patchlevel\EventSourcing\Subscription\Cleanup\Dbal\UnexpectedConnectionType; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use stdClass; @@ -50,6 +54,7 @@ public function testHandleNoSupportedTask(): void public function testHandleDropTable(): void { $schemaManager = $this->createMock(AbstractSchemaManager::class); + $schemaManager->expects($this->once())->method('tablesExist')->with(['test'])->willReturn(true); $schemaManager->expects($this->once())->method('dropTable')->with('test'); $connection = $this->createMock(Connection::class); @@ -63,9 +68,32 @@ public function testHandleDropTable(): void $handler(new DropTableTask('test')); } + public function testHandleDropTableIfNotExists(): void + { + $schemaManager = $this->createMock(AbstractSchemaManager::class); + $schemaManager->expects($this->once())->method('tablesExist')->with(['test'])->willReturn(false); + $schemaManager->expects($this->never())->method('dropTable'); + + $connection = $this->createMock(Connection::class); + $connection + ->expects($this->once()) + ->method('createSchemaManager') + ->willReturn($schemaManager); + + $handler = new DbalCleanupTaskHandler($connection); + + $handler(new DropTableTask('test')); + } + public function testHandleDropIndex(): void { $schemaManager = $this->createMock(AbstractSchemaManager::class); + $schemaManager->expects($this->once())->method('tablesExist')->with(['bar'])->willReturn(true); + $schemaManager + ->expects($this->once()) + ->method('introspectTableIndexesByUnquotedName') + ->with('bar') + ->willReturn([new Index('foo', ['id'])]); $schemaManager->expects($this->once())->method('dropIndex')->with('foo', 'bar'); $connection = $this->createMock(Connection::class); @@ -78,4 +106,92 @@ public function testHandleDropIndex(): void $handler(new DropIndexTask('foo', 'bar')); } + + public function testHandleDropIndexIfTableNotExists(): void + { + $schemaManager = $this->createMock(AbstractSchemaManager::class); + $schemaManager->expects($this->once())->method('tablesExist')->with(['bar'])->willReturn(false); + $schemaManager->expects($this->never())->method('introspectTableIndexesByUnquotedName'); + $schemaManager->expects($this->never())->method('dropIndex'); + + $connection = $this->createMock(Connection::class); + $connection + ->expects($this->once()) + ->method('createSchemaManager') + ->willReturn($schemaManager); + + $handler = new DbalCleanupTaskHandler($connection); + + $handler(new DropIndexTask('foo', 'bar')); + } + + public function testHandleDropIndexIfIndexNotExists(): void + { + $schemaManager = $this->createMock(AbstractSchemaManager::class); + $schemaManager->expects($this->once())->method('tablesExist')->with(['bar'])->willReturn(true); + $schemaManager + ->expects($this->once()) + ->method('introspectTableIndexesByUnquotedName') + ->with('bar') + ->willReturn([new Index('baz', ['id'])]); + $schemaManager->expects($this->never())->method('dropIndex'); + + $connection = $this->createMock(Connection::class); + $connection + ->expects($this->once()) + ->method('createSchemaManager') + ->willReturn($schemaManager); + + $handler = new DbalCleanupTaskHandler($connection); + + $handler(new DropIndexTask('foo', 'bar')); + } + + public function testHandleWithConnectionRegistry(): void + { + $schemaManager = $this->createMock(AbstractSchemaManager::class); + $schemaManager->expects($this->once())->method('tablesExist')->with(['test'])->willReturn(true); + $schemaManager->expects($this->once())->method('dropTable')->with('test'); + + $connection = $this->createMock(Connection::class); + $connection + ->expects($this->once()) + ->method('createSchemaManager') + ->willReturn($schemaManager); + + $registry = $this->createMock(ConnectionRegistry::class); + $registry + ->expects($this->once()) + ->method('getConnection') + ->with('foo') + ->willReturn($connection); + + $handler = new DbalCleanupTaskHandler($registry); + + $handler(new DropTableTask('test', 'foo')); + } + + public function testHandleWithConnectionRegistryAndUnexpectedType(): void + { + $registry = $this->createMock(ConnectionRegistry::class); + $registry + ->expects($this->once()) + ->method('getConnection') + ->with('foo') + ->willReturn(new stdClass()); + + $handler = new DbalCleanupTaskHandler($registry); + + $this->expectException(UnexpectedConnectionType::class); + $handler(new DropTableTask('test', 'foo')); + } + + public function testHandleWithConnectionAndConnectionNameNotSupported(): void + { + $connection = $this->createMock(Connection::class); + $handler = new DbalCleanupTaskHandler($connection); + + $this->expectException(ConnectionNameNotSupported::class); + $handler(new DropTableTask('test', 'foo')); + } } diff --git a/tests/Unit/Subscription/Engine/CatchUpSubscriptionEngineTest.php b/tests/Unit/Subscription/Engine/CatchUpSubscriptionEngineTest.php index 47d04d2fc..f871c0d69 100644 --- a/tests/Unit/Subscription/Engine/CatchUpSubscriptionEngineTest.php +++ b/tests/Unit/Subscription/Engine/CatchUpSubscriptionEngineTest.php @@ -4,6 +4,8 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Subscription\Engine; +use LogicException; +use Patchlevel\EventSourcing\Subscription\Engine\CanRefreshSubscriptions; use Patchlevel\EventSourcing\Subscription\Engine\CatchUpSubscriptionEngine; use Patchlevel\EventSourcing\Subscription\Engine\Error; use Patchlevel\EventSourcing\Subscription\Engine\ProcessedResult; @@ -216,4 +218,32 @@ public function testSubscriptions(): void self::assertEquals($expectedSubscriptions, $subscriptions); } + + public function testRefreshSubscriptions(): void + { + $parent = $this->createMockForIntersectionOfInterfaces([ + SubscriptionEngine::class, + CanRefreshSubscriptions::class, + ]); + + $engine = new CatchUpSubscriptionEngine($parent); + $criteria = new SubscriptionEngineCriteria(); + + $expectedResult = new Result(); + + $parent->expects($this->once())->method('refresh')->with($criteria)->willReturn($expectedResult); + $result = $engine->refresh($criteria); + + self::assertSame($expectedResult, $result); + } + + public function testRefreshSubscriptionsNotSupported(): void + { + $parent = $this->createMock(SubscriptionEngine::class); + + $engine = new CatchUpSubscriptionEngine($parent); + + $this->expectException(LogicException::class); + $engine->refresh(); + } } diff --git a/tests/Unit/Subscription/Engine/DefaultSubscriptionEngineTest.php b/tests/Unit/Subscription/Engine/DefaultSubscriptionEngineTest.php index adbdcc843..27417d652 100644 --- a/tests/Unit/Subscription/Engine/DefaultSubscriptionEngineTest.php +++ b/tests/Unit/Subscription/Engine/DefaultSubscriptionEngineTest.php @@ -17,6 +17,7 @@ use Patchlevel\EventSourcing\Store\Criteria\Criteria; use Patchlevel\EventSourcing\Store\Criteria\FromIndexCriterion; use Patchlevel\EventSourcing\Store\Store; +use Patchlevel\EventSourcing\Subscription\Cleanup\Cleaner; use Patchlevel\EventSourcing\Subscription\Cleanup\CleanupFailed; use Patchlevel\EventSourcing\Subscription\Cleanup\CleanupTaskHandler; use Patchlevel\EventSourcing\Subscription\Cleanup\Dbal\DropTableTask; @@ -4572,4 +4573,262 @@ private function criteria(int $fromIndex = 0): Criteria { return new Criteria(new FromIndexCriterion($fromIndex)); } + + public function testRefreshSubscriptionsNoChanges(): void + { + $subscriber = new #[Subscriber('test', RunMode::FromBeginning, group: 'default')] + class { + }; + + $subscription = new Subscription( + 'test', + 'default', + RunMode::FromBeginning, + Status::Active, + ); + + $subscriptionStore = new DummySubscriptionStore([$subscription]); + + $engine = new DefaultSubscriptionEngine( + $this->createMock(Store::class), + $subscriptionStore, + new MetadataSubscriberAccessorRepository([$subscriber]), + logger: new NullLogger(), + cleaner: $this->createMock(Cleaner::class), + ); + + $engine->refresh(); + + $subscriptionStore->assertNoChanges(); + } + + public function testRefreshSubscriptionsChangeRunMode(): void + { + $subscriber = new #[Subscriber('test', RunMode::FromNow)] + class { + }; + + $subscription = new Subscription( + 'test', + 'default', + RunMode::FromBeginning, + Status::Active, + ); + + $subscriptionStore = new DummySubscriptionStore([$subscription]); + + $engine = new DefaultSubscriptionEngine( + $this->createMock(Store::class), + $subscriptionStore, + new MetadataSubscriberAccessorRepository([$subscriber]), + logger: new NullLogger(), + cleaner: $this->createMock(Cleaner::class), + ); + + $engine->refresh(); + + $subscriptionStore->assertUpdated( + new Subscription( + 'test', + 'default', + RunMode::FromNow, + Status::Active, + ), + ); + } + + public function testRefreshSubscriptionsChangeGroup(): void + { + $subscriber = new #[Subscriber('test', RunMode::FromBeginning, group: 'new-group')] + class { + }; + + $subscription = new Subscription( + 'test', + 'default', + RunMode::FromBeginning, + Status::Active, + ); + + $subscriptionStore = new DummySubscriptionStore([$subscription]); + + $engine = new DefaultSubscriptionEngine( + $this->createMock(Store::class), + $subscriptionStore, + new MetadataSubscriberAccessorRepository([$subscriber]), + logger: new NullLogger(), + cleaner: $this->createMock(Cleaner::class), + ); + + $engine->refresh(); + + $subscriptionStore->assertUpdated( + new Subscription( + 'test', + 'new-group', + RunMode::FromBeginning, + Status::Active, + ), + ); + } + + public function testRefreshSubscriptionsChangeCleanupTasks(): void + { + $subscriber = new #[Subscriber('test', RunMode::FromBeginning)] + class { + /** @return iterable */ + #[Cleanup] + public function cleanup(): iterable + { + yield new DropTableTask('test'); + } + }; + + $subscription = new Subscription( + 'test', + 'default', + RunMode::FromBeginning, + Status::Active, + ); + + $subscriptionStore = new DummySubscriptionStore([$subscription]); + + $engine = new DefaultSubscriptionEngine( + $this->createMock(Store::class), + $subscriptionStore, + new MetadataSubscriberAccessorRepository([$subscriber]), + logger: new NullLogger(), + cleaner: $this->createMock(Cleaner::class), + ); + + $engine->refresh(); + + $subscriptionStore->assertUpdated( + new Subscription( + 'test', + 'default', + RunMode::FromBeginning, + Status::Active, + cleanupTasks: [new DropTableTask('test')], + ), + ); + } + + public function testRefreshSubscriptionsMultipleChanges(): void + { + $subscriber = new #[Subscriber('test', RunMode::FromNow, group: 'new-group')] + class { + /** @return iterable */ + #[Cleanup] + public function cleanup(): iterable + { + yield new DropTableTask('test'); + } + }; + + $subscription = new Subscription( + 'test', + 'default', + RunMode::FromBeginning, + Status::Active, + ); + + $subscriptionStore = new DummySubscriptionStore([$subscription]); + + $engine = new DefaultSubscriptionEngine( + $this->createMock(Store::class), + $subscriptionStore, + new MetadataSubscriberAccessorRepository([$subscriber]), + logger: new NullLogger(), + cleaner: $this->createMock(Cleaner::class), + ); + + $engine->refresh(); + + $subscriptionStore->assertUpdated( + new Subscription( + 'test', + 'new-group', + RunMode::FromNow, + Status::Active, + cleanupTasks: [new DropTableTask('test')], + ), + ); + } + + public function testRefreshSubscriptionsWithCriteria(): void + { + $subscriber1 = new #[Subscriber('test1', RunMode::FromNow)] + class { + }; + + $subscriber2 = new #[Subscriber('test2', RunMode::FromNow)] + class { + }; + + $subscription1 = new Subscription( + 'test1', + 'default', + RunMode::FromBeginning, + Status::Active, + ); + + $subscription2 = new Subscription( + 'test2', + 'default', + RunMode::FromBeginning, + Status::Active, + ); + + $subscriptionStore = new DummySubscriptionStore([$subscription1, $subscription2]); + + $engine = new DefaultSubscriptionEngine( + $this->createMock(Store::class), + $subscriptionStore, + new MetadataSubscriberAccessorRepository([$subscriber1, $subscriber2]), + logger: new NullLogger(), + cleaner: $this->createMock(Cleaner::class), + ); + + $engine->refresh(new SubscriptionEngineCriteria(['test1'])); + + $subscriptionStore->assertUpdated( + new Subscription( + 'test1', + 'default', + RunMode::FromNow, + Status::Active, + ), + ); + + self::assertCount(1, $subscriptionStore->updatedSubscriptions); + } + + public function testRefreshSubscriptionsDiscoverNewSubscribers(): void + { + $subscriber = new #[Subscriber('test', RunMode::FromBeginning)] + class { + }; + + $subscriptionStore = new DummySubscriptionStore(); + + $engine = new DefaultSubscriptionEngine( + $this->createMock(Store::class), + $subscriptionStore, + new MetadataSubscriberAccessorRepository([$subscriber]), + logger: new NullLogger(), + cleaner: $this->createMock(Cleaner::class), + ); + + $engine->refresh(); + + $subscriptionStore->assertAdded( + new Subscription( + 'test', + 'default', + RunMode::FromBeginning, + Status::New, + ), + ); + } } diff --git a/tests/Unit/Subscription/Engine/ThrowOnErrorSubscriptionEngineTest.php b/tests/Unit/Subscription/Engine/ThrowOnErrorSubscriptionEngineTest.php index e3941270b..50d888f7c 100644 --- a/tests/Unit/Subscription/Engine/ThrowOnErrorSubscriptionEngineTest.php +++ b/tests/Unit/Subscription/Engine/ThrowOnErrorSubscriptionEngineTest.php @@ -4,6 +4,8 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Subscription\Engine; +use LogicException; +use Patchlevel\EventSourcing\Subscription\Engine\CanRefreshSubscriptions; use Patchlevel\EventSourcing\Subscription\Engine\Error; use Patchlevel\EventSourcing\Subscription\Engine\ErrorDetected; use Patchlevel\EventSourcing\Subscription\Engine\ProcessedResult; @@ -261,4 +263,52 @@ public function testSubscriptions(): void self::assertSame([], $result); } + + public function testRefreshSubscriptionsSuccess(): void + { + $parent = $this->createMockForIntersectionOfInterfaces([ + SubscriptionEngine::class, + CanRefreshSubscriptions::class, + ]); + + $engine = new ThrowOnErrorSubscriptionEngine($parent); + $criteria = new SubscriptionEngineCriteria(); + + $expectedResult = new Result(); + + $parent->expects($this->once())->method('refresh')->with($criteria)->willReturn($expectedResult); + $result = $engine->refresh($criteria); + + self::assertSame($expectedResult, $result); + } + + public function testRefreshSubscriptionsError(): void + { + $this->expectException(ErrorDetected::class); + + $parent = $this->createMockForIntersectionOfInterfaces([ + SubscriptionEngine::class, + CanRefreshSubscriptions::class, + ]); + + $engine = new ThrowOnErrorSubscriptionEngine($parent); + $criteria = new SubscriptionEngineCriteria(); + + $expectedResult = new Result([ + new Error('id1', 'error1', new RuntimeException('error1')), + ]); + + $parent->expects($this->once())->method('refresh')->with($criteria)->willReturn($expectedResult); + $engine->refresh($criteria); + } + + public function testRefreshSubscriptionsNotSupported(): void + { + $parent = $this->createMock(SubscriptionEngine::class); + + $engine = new ThrowOnErrorSubscriptionEngine($parent); + + $this->expectException(LogicException::class); + $engine->refresh(); + } } diff --git a/tools/composer.lock b/tools/composer.lock index bdfc8f877..987d078b0 100644 --- a/tools/composer.lock +++ b/tools/composer.lock @@ -6,82 +6,6 @@ ], "content-hash": "bc2a574929879bec056439db3b8d8736", "packages": [ - { - "name": "azjezz/psl", - "version": "4.2.0", - "source": { - "type": "git", - "url": "https://github.com/azjezz/psl.git", - "reference": "15153a64c9824335ce11654522e7d88de762d39e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/azjezz/psl/zipball/15153a64c9824335ce11654522e7d88de762d39e", - "reference": "15153a64c9824335ce11654522e7d88de762d39e", - "shasum": "" - }, - "require": { - "ext-bcmath": "*", - "ext-intl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "ext-sodium": "*", - "php": "~8.3.0 || ~8.4.0 || ~8.5.0", - "revolt/event-loop": "^1.0.7" - }, - "require-dev": { - "carthage-software/mago": "^1.0.0-beta.32", - "infection/infection": "^0.31.2", - "php-coveralls/php-coveralls": "^2.7.0", - "phpbench/phpbench": "^1.4.0", - "phpunit/phpunit": "^9.6.22" - }, - "suggest": { - "php-standard-library/phpstan-extension": "PHPStan integration", - "php-standard-library/psalm-plugin": "Psalm integration" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/hhvm/hsl", - "name": "hhvm/hsl" - } - }, - "autoload": { - "files": [ - "src/bootstrap.php" - ], - "psr-4": { - "Psl\\": "src/Psl" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "azjezz", - "email": "azjezz@protonmail.com" - } - ], - "description": "PHP Standard Library", - "support": { - "issues": "https://github.com/azjezz/psl/issues", - "source": "https://github.com/azjezz/psl/tree/4.2.0" - }, - "funding": [ - { - "url": "https://github.com/azjezz", - "type": "github" - }, - { - "url": "https://github.com/veewee", - "type": "github" - } - ], - "time": "2025-10-25T08:31:40+00:00" - }, { "name": "beberlei/assert", "version": "v3.3.3", @@ -151,16 +75,16 @@ }, { "name": "composer/ca-bundle", - "version": "1.5.10", + "version": "1.5.11", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "961a5e4056dd2e4a2eedcac7576075947c28bf63" + "reference": "68ff39175e8e94a4bb1d259407ce51a6a60f09e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/961a5e4056dd2e4a2eedcac7576075947c28bf63", - "reference": "961a5e4056dd2e4a2eedcac7576075947c28bf63", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/68ff39175e8e94a4bb1d259407ce51a6a60f09e6", + "reference": "68ff39175e8e94a4bb1d259407ce51a6a60f09e6", "shasum": "" }, "require": { @@ -207,7 +131,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.5.10" + "source": "https://github.com/composer/ca-bundle/tree/1.5.11" }, "funding": [ { @@ -219,20 +143,20 @@ "type": "github" } ], - "time": "2025-12-08T15:06:51+00:00" + "time": "2026-03-30T09:16:10+00:00" }, { "name": "composer/class-map-generator", - "version": "1.7.1", + "version": "1.7.2", "source": { "type": "git", "url": "https://github.com/composer/class-map-generator.git", - "reference": "8f5fa3cc214230e71f54924bd0197a3bcc705eb1" + "reference": "6a9c2f0970022ab00dc58c07d0685dd712f2231b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/class-map-generator/zipball/8f5fa3cc214230e71f54924bd0197a3bcc705eb1", - "reference": "8f5fa3cc214230e71f54924bd0197a3bcc705eb1", + "url": "https://api.github.com/repos/composer/class-map-generator/zipball/6a9c2f0970022ab00dc58c07d0685dd712f2231b", + "reference": "6a9c2f0970022ab00dc58c07d0685dd712f2231b", "shasum": "" }, "require": { @@ -276,7 +200,7 @@ ], "support": { "issues": "https://github.com/composer/class-map-generator/issues", - "source": "https://github.com/composer/class-map-generator/tree/1.7.1" + "source": "https://github.com/composer/class-map-generator/tree/1.7.2" }, "funding": [ { @@ -288,20 +212,20 @@ "type": "github" } ], - "time": "2025-12-29T13:15:25+00:00" + "time": "2026-03-30T15:36:56+00:00" }, { "name": "composer/composer", - "version": "2.9.3", + "version": "2.9.5", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "fb3bee27676fd852a8a11ebbb1de19b4dada5aba" + "reference": "72a8f8e653710e18d83e5dd531eb5a71fc3223e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/fb3bee27676fd852a8a11ebbb1de19b4dada5aba", - "reference": "fb3bee27676fd852a8a11ebbb1de19b4dada5aba", + "url": "https://api.github.com/repos/composer/composer/zipball/72a8f8e653710e18d83e5dd531eb5a71fc3223e6", + "reference": "72a8f8e653710e18d83e5dd531eb5a71fc3223e6", "shasum": "" }, "require": { @@ -389,7 +313,7 @@ "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", "security": "https://github.com/composer/composer/security/policy", - "source": "https://github.com/composer/composer/tree/2.9.3" + "source": "https://github.com/composer/composer/tree/2.9.5" }, "funding": [ { @@ -401,7 +325,7 @@ "type": "github" } ], - "time": "2025-12-30T12:40:17+00:00" + "time": "2026-01-29T10:40:53+00:00" }, { "name": "composer/metadata-minifier", @@ -776,43 +700,43 @@ }, { "name": "deptrac/deptrac", - "version": "4.4.0", + "version": "4.6.0", "source": { "type": "git", "url": "https://github.com/deptrac/deptrac.git", - "reference": "3058cb1b5908a25711ccc0f4c96b64e6fd704114" + "reference": "b27bfc5291a1cbe1c0ebf514716b1d25c68c63fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/deptrac/deptrac/zipball/3058cb1b5908a25711ccc0f4c96b64e6fd704114", - "reference": "3058cb1b5908a25711ccc0f4c96b64e6fd704114", + "url": "https://api.github.com/repos/deptrac/deptrac/zipball/b27bfc5291a1cbe1c0ebf514716b1d25c68c63fd", + "reference": "b27bfc5291a1cbe1c0ebf514716b1d25c68c63fd", "shasum": "" }, "require": { "composer/xdebug-handler": "^3.0", - "jetbrains/phpstorm-stubs": "2024.3", + "jetbrains/phpstorm-stubs": "2024.3 || 2025.3", "nikic/php-parser": "^5", - "php": "^8.1", + "php": "^8.2", "phpdocumentor/graphviz": "^2.1", - "phpdocumentor/type-resolver": "^1.9.0", - "phpstan/phpdoc-parser": "^1.5.0|^2.1.0", + "phpdocumentor/type-resolver": "^1.9.0 || ^2.0.0", + "phpstan/phpdoc-parser": "^1.5.0 || ^2.1.0", "phpstan/phpstan": "^2.0", "psr/container": "^2.0", "psr/event-dispatcher": "^1.0", - "symfony/config": "^6.4|^7.0", - "symfony/console": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/config": "^6.4 || ^7.4 || ^8.0", + "symfony/console": "^6.4 || ^7.4 || ^8.0", + "symfony/dependency-injection": "^6.4 || ^7.4 || ^8.0", + "symfony/event-dispatcher": "^6.4 || ^7.4 || ^8.0", "symfony/event-dispatcher-contracts": "^3.4", - "symfony/filesystem": "^6.4|^7.0", - "symfony/finder": "^6.4|^7.0", - "symfony/yaml": "^6.4|^7.0" + "symfony/filesystem": "^6.4 || ^7.4 || ^8.0", + "symfony/finder": "^6.4 || ^7.4 || ^8.0", + "symfony/yaml": "^6.4 || ^7.4 || ^8.0" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8", "ergebnis/composer-normalize": "^2.45", "ext-libxml": "*", - "symfony/stopwatch": "^6.4" + "symfony/stopwatch": "^6.4 || ^7.4 || ^8.0" }, "suggest": { "ext-dom": "For using the JUnit output formatter" @@ -855,35 +779,35 @@ ], "support": { "issues": "https://github.com/deptrac/deptrac/issues", - "source": "https://github.com/deptrac/deptrac/tree/4.4.0" + "source": "https://github.com/deptrac/deptrac/tree/4.6.0" }, - "time": "2025-12-08T08:14:18+00:00" + "time": "2026-02-02T09:44:37+00:00" }, { "name": "doctrine/deprecations", - "version": "1.1.5", + "version": "1.1.6", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38" + "reference": "d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38", - "reference": "459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca", + "reference": "d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "conflict": { - "phpunit/phpunit": "<=7.5 || >=13" + "phpunit/phpunit": "<=7.5 || >=14" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^12 || ^13", - "phpstan/phpstan": "1.4.10 || 2.1.11", + "doctrine/coding-standard": "^9 || ^12 || ^14", + "phpstan/phpstan": "1.4.10 || 2.1.30", "phpstan/phpstan-phpunit": "^1.0 || ^2", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6 || ^10.5 || ^11.5 || ^12", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6 || ^10.5 || ^11.5 || ^12.4 || ^13.0", "psr/log": "^1 || ^2 || ^3" }, "suggest": { @@ -903,96 +827,1815 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.5" + "source": "https://github.com/doctrine/deprecations/tree/1.1.6" }, - "time": "2025-04-07T20:06:18+00:00" + "time": "2026-02-07T07:09:04+00:00" }, { "name": "jetbrains/phpstorm-stubs", - "version": "v2024.3", + "version": "v2025.3", + "source": { + "type": "git", + "url": "https://github.com/JetBrains/phpstorm-stubs", + "reference": "d1ee5e570343bd4276a3d5959e6e1c2530b006d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/d1ee5e570343bd4276a3d5959e6e1c2530b006d0", + "reference": "d1ee5e570343bd4276a3d5959e6e1c2530b006d0", + "shasum": "" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^v3.86", + "nikic/php-parser": "^v5.6", + "phpdocumentor/reflection-docblock": "^5.6", + "phpunit/phpunit": "^12.3" + }, + "type": "library", + "autoload": { + "files": [ + "PhpStormStubsMap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "description": "PHP runtime & extensions header files for PhpStorm", + "homepage": "https://www.jetbrains.com/phpstorm", + "keywords": [ + "autocomplete", + "code", + "inference", + "inspection", + "jetbrains", + "phpstorm", + "stubs", + "type" + ], + "time": "2025-09-18T15:47:24+00:00" + }, + { + "name": "justinrainbow/json-schema", + "version": "6.8.0", + "source": { + "type": "git", + "url": "https://github.com/jsonrainbow/json-schema.git", + "reference": "89ac92bcfe5d0a8a4433c7b89d394553ae7250cc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/89ac92bcfe5d0a8a4433c7b89d394553ae7250cc", + "reference": "89ac92bcfe5d0a8a4433c7b89d394553ae7250cc", + "shasum": "" + }, + "require": { + "ext-json": "*", + "marc-mabe/php-enum": "^4.4", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "3.3.0", + "json-schema/json-schema-test-suite": "^23.2", + "marc-mabe/php-enum-phpstan": "^2.0", + "phpspec/prophecy": "^1.19", + "phpstan/phpstan": "^1.12", + "phpunit/phpunit": "^8.5" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/jsonrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "support": { + "issues": "https://github.com/jsonrainbow/json-schema/issues", + "source": "https://github.com/jsonrainbow/json-schema/tree/6.8.0" + }, + "time": "2026-04-02T12:43:11+00:00" + }, + { + "name": "marc-mabe/php-enum", + "version": "v4.7.2", + "source": { + "type": "git", + "url": "https://github.com/marc-mabe/php-enum.git", + "reference": "bb426fcdd65c60fb3638ef741e8782508fda7eef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/marc-mabe/php-enum/zipball/bb426fcdd65c60fb3638ef741e8782508fda7eef", + "reference": "bb426fcdd65c60fb3638ef741e8782508fda7eef", + "shasum": "" + }, + "require": { + "ext-reflection": "*", + "php": "^7.1 | ^8.0" + }, + "require-dev": { + "phpbench/phpbench": "^0.16.10 || ^1.0.4", + "phpstan/phpstan": "^1.3.1", + "phpunit/phpunit": "^7.5.20 | ^8.5.22 | ^9.5.11", + "vimeo/psalm": "^4.17.0 | ^5.26.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-3.x": "3.2-dev", + "dev-master": "4.7-dev" + } + }, + "autoload": { + "psr-4": { + "MabeEnum\\": "src/" + }, + "classmap": [ + "stubs/Stringable.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Marc Bennewitz", + "email": "dev@mabe.berlin", + "homepage": "https://mabe.berlin/", + "role": "Lead" + } + ], + "description": "Simple and fast implementation of enumerations with native PHP", + "homepage": "https://github.com/marc-mabe/php-enum", + "keywords": [ + "enum", + "enum-map", + "enum-set", + "enumeration", + "enumerator", + "enummap", + "enumset", + "map", + "set", + "type", + "type-hint", + "typehint" + ], + "support": { + "issues": "https://github.com/marc-mabe/php-enum/issues", + "source": "https://github.com/marc-mabe/php-enum/tree/v4.7.2" + }, + "time": "2025-09-14T11:18:39+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v5.7.0", "source": { "type": "git", - "url": "https://github.com/JetBrains/phpstorm-stubs.git", - "reference": "0e82bdfe850c71857ee4ee3501ed82a9fc5d043c" + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/0e82bdfe850c71857ee4ee3501ed82a9fc5d043c", - "reference": "0e82bdfe850c71857ee4ee3501ed82a9fc5d043c", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82", "shasum": "" }, + "require": { + "ext-ctype": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, "require-dev": { - "friendsofphp/php-cs-fixer": "v3.64.0", - "nikic/php-parser": "v5.3.1", - "phpdocumentor/reflection-docblock": "5.6.0", - "phpunit/phpunit": "11.4.3" + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" }, + "bin": [ + "bin/php-parse" + ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.7.0" + }, + "time": "2025-12-06T11:56:16+00:00" + }, + { + "name": "nikolaposa/version", + "version": "4.2.1", + "source": { + "type": "git", + "url": "https://github.com/nikolaposa/version.git", + "reference": "2b9ee2f0b09333b6ce00bd6b63132cdf1d7a1428" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikolaposa/version/zipball/2b9ee2f0b09333b6ce00bd6b63132cdf1d7a1428", + "reference": "2b9ee2f0b09333b6ce00bd6b63132cdf1d7a1428", + "shasum": "" + }, + "require": { + "beberlei/assert": "^3.2", + "php": "^8.1" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.44", + "phpstan/phpstan": "^1.10", + "phpstan/phpstan-beberlei-assert": "^1.1", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^10.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Version\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nikola Poša", + "email": "posa.nikola@gmail.com", + "homepage": "https://www.nikolaposa.in.rs" + } + ], + "description": "Value Object that represents a SemVer-compliant version number.", + "homepage": "https://github.com/nikolaposa/version", + "keywords": [ + "semantic", + "semver", + "version", + "versioning" + ], + "support": { + "issues": "https://github.com/nikolaposa/version/issues", + "source": "https://github.com/nikolaposa/version/tree/4.2.1" + }, + "time": "2025-03-24T19:12:02+00:00" + }, + { + "name": "ocramius/package-versions", + "version": "2.11.0", + "source": { + "type": "git", + "url": "https://github.com/Ocramius/PackageVersions.git", + "reference": "23359bf3003a71b053ac8ab4b3f651597bd3d261" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/23359bf3003a71b053ac8ab4b3f651597bd3d261", + "reference": "23359bf3003a71b053ac8ab4b3f651597bd3d261", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.2.0", + "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0" + }, + "replace": { + "composer/package-versions-deprecated": "*" + }, + "require-dev": { + "composer/composer": "^2.9.2", + "doctrine/coding-standard": "^14.0.0", + "ext-zip": "^1.15.0", + "phpunit/phpunit": "^11.5.44", + "psalm/plugin-phpunit": "^0.19.5", + "roave/infection-static-analysis-plugin": "^1.39.0", + "vimeo/psalm": "^6.13.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "PackageVersions\\": "src/PackageVersions" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "Provides efficient querying for installed package versions (no runtime IO)", + "support": { + "issues": "https://github.com/Ocramius/PackageVersions/issues", + "source": "https://github.com/Ocramius/PackageVersions/tree/2.11.0" + }, + "funding": [ + { + "url": "https://github.com/Ocramius", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ocramius/package-versions", + "type": "tidelift" + } + ], + "time": "2025-11-27T11:43:11+00:00" + }, + { + "name": "php-standard-library/async", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/async.git", + "reference": "abd7c05295ff1bdbe498973294b7dc0f0b5bd7bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/async/zipball/abd7c05295ff1bdbe498973294b7dc0f0b5bd7bf", + "reference": "abd7c05295ff1bdbe498973294b7dc0f0b5bd7bf", + "shasum": "" + }, + "require": { + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/date-time": "^6.0", + "php-standard-library/default": "^6.0", + "php-standard-library/foundation": "^6.0", + "php-standard-library/promise": "^6.0", + "revolt/event-loop": "^1.0.8" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "php-standard-library/dict": "^6.0", + "php-standard-library/result": "^6.0", + "php-standard-library/str": "^6.0", + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/Psl/bootstrap.php" + ], + "psr-4": { + "Psl\\Async\\": "src/Psl/Async/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "Fiber-based structured concurrency using cooperative multitasking", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "Fibers", + "async", + "concurrency", + "cooperative-multitasking" + ], + "support": { + "source": "https://github.com/php-standard-library/async/tree/6.1.1" + }, + "time": "2026-03-20T08:02:33+00:00" + }, + { + "name": "php-standard-library/channel", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/channel.git", + "reference": "96654b43182091c1b935f52ce65d16429d7311a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/channel/zipball/96654b43182091c1b935f52ce65d16429d7311a9", + "reference": "96654b43182091c1b935f52ce65d16429d7311a9", + "shasum": "" + }, + "require": { + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/async": "^6.0", + "php-standard-library/foundation": "^6.0", + "revolt/event-loop": "^1.0.8" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "php-standard-library/date-time": "^6.0", + "php-standard-library/file": "^6.0", + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/Psl/bootstrap.php" + ], + "psr-4": { + "Psl\\Channel\\": "src/Psl/Channel/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "Message-passing channels for async communication, inspired by Go and Rust", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "async", + "channel", + "concurrency", + "message-passing" + ], + "support": { + "source": "https://github.com/php-standard-library/channel/tree/6.1.1" + }, + "time": "2026-03-20T08:02:33+00:00" + }, + { + "name": "php-standard-library/collection", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/collection.git", + "reference": "810decf3218650445b41cf03d398f32cbf2c2d85" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/collection/zipball/810decf3218650445b41cf03d398f32cbf2c2d85", + "reference": "810decf3218650445b41cf03d398f32cbf2c2d85", + "shasum": "" + }, + "require": { + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/default": "^6.0", + "php-standard-library/foundation": "^6.0" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "php-standard-library/str": "^6.0", + "php-standard-library/vec": "^6.0", + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psl\\Collection\\": "src/Psl/Collection/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "Generic, object-oriented Vector, Map, and Set collections with immutable and mutable variants", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "collection", + "generics", + "map", + "set", + "vector" + ], + "support": { + "source": "https://github.com/php-standard-library/collection/tree/6.1.1" + }, + "time": "2026-03-20T08:02:33+00:00" + }, + { + "name": "php-standard-library/comparison", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/comparison.git", + "reference": "1bfb6d50a4544d29bec9908e7d64f2c07b6e813c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/comparison/zipball/1bfb6d50a4544d29bec9908e7d64f2c07b6e813c", + "reference": "1bfb6d50a4544d29bec9908e7d64f2c07b6e813c", + "shasum": "" + }, + "require": { + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/default": "^6.0", + "php-standard-library/foundation": "^6.0" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/Psl/bootstrap.php" + ], + "psr-4": { + "Psl\\Comparison\\": "src/Psl/Comparison/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "Interfaces and functions for type-safe, consistent value comparison", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "comparable", + "comparison", + "ordering" + ], + "support": { + "source": "https://github.com/php-standard-library/comparison/tree/6.1.1" + }, + "time": "2026-03-20T08:02:33+00:00" + }, + { + "name": "php-standard-library/date-time", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/date-time.git", + "reference": "7d97bac5afe71a98c54ca54df0b60fa5c6b270b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/date-time/zipball/7d97bac5afe71a98c54ca54df0b60fa5c6b270b8", + "reference": "7d97bac5afe71a98c54ca54df0b60fa5c6b270b8", + "shasum": "" + }, + "require": { + "ext-intl": "*", + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/comparison": "^6.0", + "php-standard-library/default": "^6.0", + "php-standard-library/foundation": "^6.0", + "php-standard-library/interoperability": "^6.0", + "php-standard-library/locale": "^6.0" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "php-standard-library/json": "^6.0", + "php-standard-library/math": "^6.0", + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/Psl/bootstrap.php" + ], + "psr-4": { + "Psl\\DateTime\\": "src/Psl/DateTime/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "Immutable, timezone-aware date and time types with Duration, Period, and Interval", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "datetime", + "duration", + "immutable", + "timezone" + ], + "support": { + "source": "https://github.com/php-standard-library/date-time/tree/6.1.1" + }, + "time": "2026-03-20T08:02:33+00:00" + }, + { + "name": "php-standard-library/default", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/default.git", + "reference": "9f5fff4b952963c2e1d922c4669994c0d2790cc3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/default/zipball/9f5fff4b952963c2e1d922c4669994c0d2790cc3", + "reference": "9f5fff4b952963c2e1d922c4669994c0d2790cc3", + "shasum": "" + }, + "require": { + "php": "~8.4.0 || ~8.5.0" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psl\\Default\\": "src/Psl/Default/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "DefaultInterface for classes to provide standardized default instances", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "default", + "interface" + ], + "support": { + "source": "https://github.com/php-standard-library/default/tree/6.1.1" + }, + "time": "2026-03-19T03:52:36+00:00" + }, + { + "name": "php-standard-library/dict", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/dict.git", + "reference": "d67628e5c963dc8456277cbb5f34e6821c4dcd4a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/dict/zipball/d67628e5c963dc8456277cbb5f34e6821c4dcd4a", + "reference": "d67628e5c963dc8456277cbb5f34e6821c4dcd4a", + "shasum": "" + }, + "require": { + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/foundation": "^6.0" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "php-standard-library/collection": "^6.0", + "php-standard-library/iter": "^6.0", + "php-standard-library/str": "^6.0", + "php-standard-library/vec": "^6.0", + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/Psl/bootstrap.php" + ], + "psr-4": { + "Psl\\Dict\\": "src/Psl/Dict/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "Functions for creating and transforming associative arrays with preserved keys", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "Associative", + "Dict", + "array", + "map" + ], + "support": { + "source": "https://github.com/php-standard-library/dict/tree/6.1.1" + }, + "time": "2026-03-20T08:02:33+00:00" + }, + { + "name": "php-standard-library/env", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/env.git", + "reference": "2ffd1744f048a304edf0d07b2ecaabf984abded9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/env/zipball/2ffd1744f048a304edf0d07b2ecaabf984abded9", + "reference": "2ffd1744f048a304edf0d07b2ecaabf984abded9", + "shasum": "" + }, + "require": { + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/foundation": "^6.0" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "php-standard-library/filesystem": "^6.0", + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/Psl/bootstrap.php" + ], + "psr-4": { + "Psl\\Env\\": "src/Psl/Env/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "Functions for inspecting and modifying environment variables, working directory, and paths", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "env", + "environment" + ], + "support": { + "source": "https://github.com/php-standard-library/env/tree/6.1.1" + }, + "time": "2026-03-20T08:02:33+00:00" + }, + { + "name": "php-standard-library/file", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/file.git", + "reference": "362bb70d25ce8fa9a4f18dc84ae228944ae8396c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/file/zipball/362bb70d25ce8fa9a4f18dc84ae228944ae8396c", + "reference": "362bb70d25ce8fa9a4f18dc84ae228944ae8396c", + "shasum": "" + }, + "require": { + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/async": "^6.0", + "php-standard-library/foundation": "^6.0", + "php-standard-library/io": "^6.0" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "php-standard-library/env": "^6.0", + "php-standard-library/filesystem": "^6.0", + "php-standard-library/os": "^6.0", + "php-standard-library/str": "^6.0", + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/Psl/bootstrap.php" + ], + "psr-4": { + "Psl\\File\\": "src/Psl/File/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "Typed file handles for reading and writing with write modes and advisory locking", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "file", + "handle", + "io" + ], + "support": { + "source": "https://github.com/php-standard-library/file/tree/6.1.1" + }, + "time": "2026-03-20T08:02:33+00:00" + }, + { + "name": "php-standard-library/filesystem", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/filesystem.git", + "reference": "00b2dc3e5a97d8e5167c6b2d7ea1571c17938dd7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/filesystem/zipball/00b2dc3e5a97d8e5167c6b2d7ea1571c17938dd7", + "reference": "00b2dc3e5a97d8e5167c6b2d7ea1571c17938dd7", + "shasum": "" + }, + "require": { + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/foundation": "^6.0" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "php-standard-library/env": "^6.0", + "php-standard-library/file": "^6.0", + "php-standard-library/os": "^6.0", + "php-standard-library/str": "^6.0", + "php-standard-library/type": "^6.0", + "php-standard-library/vec": "^6.0", + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/Psl/bootstrap.php" + ], + "psr-4": { + "Psl\\Filesystem\\": "src/Psl/Filesystem/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "Type-safe functions for file system operations with proper exception handling", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "file-system", + "filesystem" + ], + "support": { + "source": "https://github.com/php-standard-library/filesystem/tree/6.1.1" + }, + "time": "2026-03-20T08:02:33+00:00" + }, + { + "name": "php-standard-library/foundation", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/foundation.git", + "reference": "404e032a4718d19ada14af614458b38c9021242c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/foundation/zipball/404e032a4718d19ada14af614458b38c9021242c", + "reference": "404e032a4718d19ada14af614458b38c9021242c", + "shasum": "" + }, + "require": { + "php": "~8.4.0 || ~8.5.0" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/Psl/bootstrap.php" + ], + "psr-4": { + "Psl\\": "src/Psl/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "Exceptions, Ref, and invariant functions", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "exceptions", + "foundation", + "invariant" + ], + "support": { + "source": "https://github.com/php-standard-library/foundation/tree/6.1.1" + }, + "time": "2026-03-20T08:02:33+00:00" + }, + { + "name": "php-standard-library/interoperability", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/interoperability.git", + "reference": "e04c5056f3ec9ffc88c972f9d257b9704a11b88e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/interoperability/zipball/e04c5056f3ec9ffc88c972f9d257b9704a11b88e", + "reference": "e04c5056f3ec9ffc88c972f9d257b9704a11b88e", + "shasum": "" + }, + "require": { + "php": "~8.4.0 || ~8.5.0" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psl\\Interoperability\\": "src/Psl/Interoperability/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "Interfaces for converting between PSL types and PHP stdlib/intl equivalents", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "conversion", + "interoperability" + ], + "support": { + "source": "https://github.com/php-standard-library/interoperability/tree/6.1.1" + }, + "time": "2026-03-19T03:52:36+00:00" + }, + { + "name": "php-standard-library/io", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/io.git", + "reference": "26d16c851c4f2bcafb49b7a583b1a72fcd05d0dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/io/zipball/26d16c851c4f2bcafb49b7a583b1a72fcd05d0dc", + "reference": "26d16c851c4f2bcafb49b7a583b1a72fcd05d0dc", + "shasum": "" + }, + "require": { + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/async": "^6.0", + "php-standard-library/channel": "^6.0", + "php-standard-library/foundation": "^6.0", + "php-standard-library/result": "^6.0", + "revolt/event-loop": "^1.0.8" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "php-standard-library/date-time": "^6.0", + "php-standard-library/os": "^6.0", + "php-standard-library/str": "^6.0", + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/Psl/bootstrap.php" + ], + "psr-4": { + "Psl\\IO\\": "src/Psl/IO/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "Handle-based I/O abstractions - composable, testable, and async-ready", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "async", + "handle", + "io", + "stream" + ], + "support": { + "source": "https://github.com/php-standard-library/io/tree/6.1.1" + }, + "time": "2026-03-20T08:02:33+00:00" + }, + { + "name": "php-standard-library/iter", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/iter.git", + "reference": "32e89ceaf035a1f2ac1c370ec28bfee476a8b298" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/iter/zipball/32e89ceaf035a1f2ac1c370ec28bfee476a8b298", + "reference": "32e89ceaf035a1f2ac1c370ec28bfee476a8b298", + "shasum": "" + }, + "require": { + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/foundation": "^6.0", + "php-standard-library/option": "^6.0" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "php-standard-library/collection": "^6.0", + "php-standard-library/dict": "^6.0", + "php-standard-library/math": "^6.0", + "php-standard-library/vec": "^6.0", + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/Psl/bootstrap.php" + ], + "psr-4": { + "Psl\\Iter\\": "src/Psl/Iter/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "Utility functions for inspecting and reducing iterables - arrays, generators, and iterators", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "generator", + "iter", + "iterable", + "iterator" + ], + "support": { + "source": "https://github.com/php-standard-library/iter/tree/6.1.1" + }, + "time": "2026-03-20T08:02:33+00:00" + }, + { + "name": "php-standard-library/json", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/json.git", + "reference": "ad3ff6f9e22ed27b0eccc58bbc7d83242841f775" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/json/zipball/ad3ff6f9e22ed27b0eccc58bbc7d83242841f775", + "reference": "ad3ff6f9e22ed27b0eccc58bbc7d83242841f775", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/foundation": "^6.0", + "php-standard-library/type": "^6.0" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "php-standard-library/collection": "^6.0", + "php-standard-library/math": "^6.0", + "php-standard-library/str": "^6.0", + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/Psl/bootstrap.php" + ], + "psr-4": { + "Psl\\Json\\": "src/Psl/Json/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "JSON encoding and decoding with typed exceptions and sensible defaults", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "decoding", + "encoding", + "json" + ], + "support": { + "source": "https://github.com/php-standard-library/json/tree/6.1.1" + }, + "time": "2026-03-20T08:02:33+00:00" + }, + { + "name": "php-standard-library/locale", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/locale.git", + "reference": "f07d093011f026696ae331e096268e6a21c4bc05" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/locale/zipball/f07d093011f026696ae331e096268e6a21c4bc05", + "reference": "f07d093011f026696ae331e096268e6a21c4bc05", + "shasum": "" + }, + "require": { + "ext-intl": "*", + "php": "~8.4.0 || ~8.5.0" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "php-standard-library/str": "^6.0", + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psl\\Locale\\": "src/Psl/Locale/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "Backed enum with 700+ locale identifiers for type-safe internationalization", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "i18n", + "internationalization", + "locale" + ], + "support": { + "source": "https://github.com/php-standard-library/locale/tree/6.1.1" + }, + "time": "2026-03-19T16:33:51+00:00" + }, + { + "name": "php-standard-library/option", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/option.git", + "reference": "7b75ae4886380deaa5b1b991953fac208d047061" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/option/zipball/7b75ae4886380deaa5b1b991953fac208d047061", + "reference": "7b75ae4886380deaa5b1b991953fac208d047061", + "shasum": "" + }, + "require": { + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/comparison": "^6.0", + "php-standard-library/foundation": "^6.0" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/Psl/bootstrap.php" + ], + "psr-4": { + "Psl\\Option\\": "src/Psl/Option/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "Option type (Some/None) replacing nullable types with explicit presence semantics", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "monad", + "none", + "option", + "some" + ], + "support": { + "source": "https://github.com/php-standard-library/option/tree/6.1.1" + }, + "time": "2026-03-20T08:02:33+00:00" + }, + { + "name": "php-standard-library/process", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/process.git", + "reference": "4273b57d9b3b9a19306251eeddcfd6930cabb351" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/process/zipball/4273b57d9b3b9a19306251eeddcfd6930cabb351", + "reference": "4273b57d9b3b9a19306251eeddcfd6930cabb351", + "shasum": "" + }, + "require": { + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/async": "^6.0", + "php-standard-library/date-time": "^6.0", + "php-standard-library/foundation": "^6.0", + "php-standard-library/io": "^6.0" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "php-standard-library/env": "^6.0", + "php-standard-library/filesystem": "^6.0", + "php-standard-library/os": "^6.0", + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psl\\Process\\": "src/Psl/Process/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "Typed, non-blocking API for spawning and managing child processes", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "async", + "process", + "subprocess" + ], + "support": { + "source": "https://github.com/php-standard-library/process/tree/6.1.1" + }, + "time": "2026-03-20T08:02:33+00:00" + }, + { + "name": "php-standard-library/promise", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/promise.git", + "reference": "02d8479aaa35a28b72aad0ba6b58d389d87c131c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/promise/zipball/02d8479aaa35a28b72aad0ba6b58d389d87c131c", + "reference": "02d8479aaa35a28b72aad0ba6b58d389d87c131c", + "shasum": "" + }, + "require": { + "php": "~8.4.0 || ~8.5.0" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psl\\Promise\\": "src/Psl/Promise/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "Promise interface for deferred computations - resolved or rejected", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "async", + "deferred", + "promise" + ], + "support": { + "source": "https://github.com/php-standard-library/promise/tree/6.1.1" + }, + "time": "2026-03-19T03:52:36+00:00" + }, + { + "name": "php-standard-library/range", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/range.git", + "reference": "6085700229b7b10e78afd0f490323a19c37511e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/range/zipball/6085700229b7b10e78afd0f490323a19c37511e3", + "reference": "6085700229b7b10e78afd0f490323a19c37511e3", + "shasum": "" + }, + "require": { + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/foundation": "^6.0", + "php-standard-library/iter": "^6.0" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "php-standard-library/math": "^6.0", + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/Psl/bootstrap.php" + ], + "psr-4": { + "Psl\\Range\\": "src/Psl/Range/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "Range types for integer sequences with iteration support", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "iterator", + "range" + ], + "support": { + "source": "https://github.com/php-standard-library/range/tree/6.1.1" + }, + "time": "2026-03-19T03:52:36+00:00" + }, + { + "name": "php-standard-library/regex", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-standard-library/regex.git", + "reference": "ba19a34048c9978daf216b886ea77f7aa7b07937" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-standard-library/regex/zipball/ba19a34048c9978daf216b886ea77f7aa7b07937", + "reference": "ba19a34048c9978daf216b886ea77f7aa7b07937", + "shasum": "" + }, + "require": { + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/foundation": "^6.0", + "php-standard-library/type": "^6.0" + }, + "conflict": { + "azjezz/psl": "*" + }, + "require-dev": { + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, "autoload": { "files": [ - "PhpStormStubsMap.php" - ] + "src/Psl/bootstrap.php" + ], + "psr-4": { + "Psl\\Regex\\": "src/Psl/Regex/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache-2.0" + "MIT" ], - "description": "PHP runtime & extensions header files for PhpStorm", - "homepage": "https://www.jetbrains.com/phpstorm", + "authors": [ + { + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" + } + ], + "description": "Type-safe regular expressions with typed capture groups and proper error handling", + "homepage": "https://php-standard-library.dev", "keywords": [ - "autocomplete", - "code", - "inference", - "inspection", - "jetbrains", - "phpstorm", - "stubs", - "type" + "preg", + "regex", + "regular-expression" ], "support": { - "source": "https://github.com/JetBrains/phpstorm-stubs/tree/v2024.3" + "source": "https://github.com/php-standard-library/regex/tree/6.1.1" }, - "time": "2024-12-14T08:03:12+00:00" + "time": "2026-03-20T08:02:33+00:00" }, { - "name": "justinrainbow/json-schema", - "version": "6.6.4", + "name": "php-standard-library/result", + "version": "6.1.1", "source": { "type": "git", - "url": "https://github.com/jsonrainbow/json-schema.git", - "reference": "2eeb75d21cf73211335888e7f5e6fd7440723ec7" + "url": "https://github.com/php-standard-library/result.git", + "reference": "60598868e6d451553c97ee82c65f519b5f043490" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/2eeb75d21cf73211335888e7f5e6fd7440723ec7", - "reference": "2eeb75d21cf73211335888e7f5e6fd7440723ec7", + "url": "https://api.github.com/repos/php-standard-library/result/zipball/60598868e6d451553c97ee82c65f519b5f043490", + "reference": "60598868e6d451553c97ee82c65f519b5f043490", "shasum": "" }, "require": { - "ext-json": "*", - "marc-mabe/php-enum": "^4.4", - "php": "^7.2 || ^8.0" + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/foundation": "^6.0", + "php-standard-library/promise": "^6.0" + }, + "conflict": { + "azjezz/psl": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "3.3.0", - "json-schema/json-schema-test-suite": "^23.2", - "marc-mabe/php-enum-phpstan": "^2.0", - "phpspec/prophecy": "^1.19", - "phpstan/phpstan": "^1.12", - "phpunit/phpunit": "^8.5" + "php-standard-library/fun": "^6.0", + "phpunit/phpunit": "^13.0" }, - "bin": [ - "bin/validate-json" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-next": "6.1.x-dev" } }, "autoload": { + "files": [ + "src/Psl/bootstrap.php" + ], "psr-4": { - "JsonSchema\\": "src/JsonSchema/" + "Psl\\Result\\": "src/Psl/Result/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1001,199 +2644,210 @@ ], "authors": [ { - "name": "Bruno Prieto Reis", - "email": "bruno.p.reis@gmail.com" - }, - { - "name": "Justin Rainbow", - "email": "justin.rainbow@gmail.com" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" }, { - "name": "Robert Schönthal", - "email": "seroscho@googlemail.com" + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" } ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/jsonrainbow/json-schema", + "description": "Result type capturing success or failure as a value for controlled error handling", + "homepage": "https://php-standard-library.dev", "keywords": [ - "json", - "schema" + "error-handling", + "monad", + "result" ], "support": { - "issues": "https://github.com/jsonrainbow/json-schema/issues", - "source": "https://github.com/jsonrainbow/json-schema/tree/6.6.4" + "source": "https://github.com/php-standard-library/result/tree/6.1.1" }, - "time": "2025-12-19T15:01:32+00:00" + "time": "2026-03-20T08:02:33+00:00" }, { - "name": "marc-mabe/php-enum", - "version": "v4.7.2", + "name": "php-standard-library/shell", + "version": "6.1.1", "source": { "type": "git", - "url": "https://github.com/marc-mabe/php-enum.git", - "reference": "bb426fcdd65c60fb3638ef741e8782508fda7eef" + "url": "https://github.com/php-standard-library/shell.git", + "reference": "21e8003fa8ba414417c19069eaef2940837c8f2b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/marc-mabe/php-enum/zipball/bb426fcdd65c60fb3638ef741e8782508fda7eef", - "reference": "bb426fcdd65c60fb3638ef741e8782508fda7eef", + "url": "https://api.github.com/repos/php-standard-library/shell/zipball/21e8003fa8ba414417c19069eaef2940837c8f2b", + "reference": "21e8003fa8ba414417c19069eaef2940837c8f2b", "shasum": "" }, "require": { - "ext-reflection": "*", - "php": "^7.1 | ^8.0" + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/async": "^6.0", + "php-standard-library/default": "^6.0", + "php-standard-library/foundation": "^6.0", + "php-standard-library/process": "^6.0" + }, + "conflict": { + "azjezz/psl": "*" }, "require-dev": { - "phpbench/phpbench": "^0.16.10 || ^1.0.4", - "phpstan/phpstan": "^1.3.1", - "phpunit/phpunit": "^7.5.20 | ^8.5.22 | ^9.5.11", - "vimeo/psalm": "^4.17.0 | ^5.26.1" + "php-standard-library/date-time": "^6.0", + "php-standard-library/env": "^6.0", + "php-standard-library/os": "^6.0", + "php-standard-library/secure-random": "^6.0", + "php-standard-library/str": "^6.0", + "phpunit/phpunit": "^13.0" }, "type": "library", "extra": { "branch-alias": { - "dev-3.x": "3.2-dev", - "dev-master": "4.7-dev" + "dev-next": "6.1.x-dev" } }, "autoload": { + "files": [ + "src/Psl/bootstrap.php" + ], "psr-4": { - "MabeEnum\\": "src/" - }, - "classmap": [ - "stubs/Stringable.php" - ] + "Psl\\Shell\\": "src/Psl/Shell/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Marc Bennewitz", - "email": "dev@mabe.berlin", - "homepage": "https://mabe.berlin/", - "role": "Lead" + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" } ], - "description": "Simple and fast implementation of enumerations with native PHP", - "homepage": "https://github.com/marc-mabe/php-enum", + "description": "Shell command execution with argument escaping and error output management", + "homepage": "https://php-standard-library.dev", "keywords": [ - "enum", - "enum-map", - "enum-set", - "enumeration", - "enumerator", - "enummap", - "enumset", - "map", - "set", - "type", - "type-hint", - "typehint" + "command", + "execute", + "shell" ], "support": { - "issues": "https://github.com/marc-mabe/php-enum/issues", - "source": "https://github.com/marc-mabe/php-enum/tree/v4.7.2" + "source": "https://github.com/php-standard-library/shell/tree/6.1.1" }, - "time": "2025-09-14T11:18:39+00:00" + "time": "2026-03-20T08:02:33+00:00" }, { - "name": "nikic/php-parser", - "version": "v5.7.0", + "name": "php-standard-library/str", + "version": "6.1.1", "source": { "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82" + "url": "https://github.com/php-standard-library/str.git", + "reference": "fb806004b9eaf36f66a5d45b097d70afbcdca873" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82", - "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "url": "https://api.github.com/repos/php-standard-library/str/zipball/fb806004b9eaf36f66a5d45b097d70afbcdca873", + "reference": "fb806004b9eaf36f66a5d45b097d70afbcdca873", "shasum": "" }, "require": { - "ext-ctype": "*", - "ext-json": "*", - "ext-tokenizer": "*", - "php": ">=7.4" + "ext-mbstring": "*", + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/default": "^6.0", + "php-standard-library/foundation": "^6.0", + "php-standard-library/range": "^6.0" + }, + "conflict": { + "azjezz/psl": "*" }, "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^13.0" }, - "bin": [ - "bin/php-parse" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "5.x-dev" + "dev-next": "6.1.x-dev" } }, "autoload": { + "files": [ + "src/Psl/bootstrap.php" + ], "psr-4": { - "PhpParser\\": "lib/PhpParser" + "Psl\\Str\\": "src/Psl/Str/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Nikita Popov" + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" } ], - "description": "A PHP parser written in PHP", + "description": "Unicode-aware string functions replacing PHP mb_* and standard string functions", + "homepage": "https://php-standard-library.dev", "keywords": [ - "parser", - "php" + "mbstring", + "string", + "unicode", + "utf8" ], "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.7.0" + "source": "https://github.com/php-standard-library/str/tree/6.1.1" }, - "time": "2025-12-06T11:56:16+00:00" + "time": "2026-03-20T08:02:33+00:00" }, { - "name": "nikolaposa/version", - "version": "4.2.1", + "name": "php-standard-library/type", + "version": "6.1.1", "source": { "type": "git", - "url": "https://github.com/nikolaposa/version.git", - "reference": "2b9ee2f0b09333b6ce00bd6b63132cdf1d7a1428" + "url": "https://github.com/php-standard-library/type.git", + "reference": "642c3d038b5a627d33a2152115a7d57e6eff2d5a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikolaposa/version/zipball/2b9ee2f0b09333b6ce00bd6b63132cdf1d7a1428", - "reference": "2b9ee2f0b09333b6ce00bd6b63132cdf1d7a1428", + "url": "https://api.github.com/repos/php-standard-library/type/zipball/642c3d038b5a627d33a2152115a7d57e6eff2d5a", + "reference": "642c3d038b5a627d33a2152115a7d57e6eff2d5a", "shasum": "" }, "require": { - "beberlei/assert": "^3.2", - "php": "^8.1" + "ext-json": "*", + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/collection": "^6.0", + "php-standard-library/foundation": "^6.0", + "php-standard-library/iter": "^6.0" + }, + "conflict": { + "azjezz/psl": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.44", - "phpstan/phpstan": "^1.10", - "phpstan/phpstan-beberlei-assert": "^1.1", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^10.5" + "php-standard-library/dict": "^6.0", + "php-standard-library/math": "^6.0", + "php-standard-library/result": "^6.0", + "php-standard-library/str": "^6.0", + "php-standard-library/vec": "^6.0", + "phpunit/phpunit": "^13.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2.x-dev" + "dev-next": "6.1.x-dev" } }, "autoload": { + "files": [ + "src/Psl/bootstrap.php" + ], "psr-4": { - "Version\\": "src/" + "Psl\\Type\\": "src/Psl/Type/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1202,59 +2856,67 @@ ], "authors": [ { - "name": "Nikola Poša", - "email": "posa.nikola@gmail.com", - "homepage": "https://www.nikolaposa.in.rs" + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" } ], - "description": "Value Object that represents a SemVer-compliant version number.", - "homepage": "https://github.com/nikolaposa/version", + "description": "Runtime type validation implementing Parse, Don't Validate - coerce and assert unstructured input into well-typed data", + "homepage": "https://php-standard-library.dev", "keywords": [ - "semantic", - "semver", - "version", - "versioning" + "coercion", + "type", + "type-safety", + "validation" ], "support": { - "issues": "https://github.com/nikolaposa/version/issues", - "source": "https://github.com/nikolaposa/version/tree/4.2.1" + "source": "https://github.com/php-standard-library/type/tree/6.1.1" }, - "time": "2025-03-24T19:12:02+00:00" + "time": "2026-03-20T08:02:33+00:00" }, { - "name": "ocramius/package-versions", - "version": "2.11.0", + "name": "php-standard-library/vec", + "version": "6.1.1", "source": { "type": "git", - "url": "https://github.com/Ocramius/PackageVersions.git", - "reference": "23359bf3003a71b053ac8ab4b3f651597bd3d261" + "url": "https://github.com/php-standard-library/vec.git", + "reference": "e41db9b7140bb75bf5996495eed1b7b36b1057bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/23359bf3003a71b053ac8ab4b3f651597bd3d261", - "reference": "23359bf3003a71b053ac8ab4b3f651597bd3d261", + "url": "https://api.github.com/repos/php-standard-library/vec/zipball/e41db9b7140bb75bf5996495eed1b7b36b1057bb", + "reference": "e41db9b7140bb75bf5996495eed1b7b36b1057bb", "shasum": "" }, "require": { - "composer-runtime-api": "^2.2.0", - "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0" + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/foundation": "^6.0" }, - "replace": { - "composer/package-versions-deprecated": "*" + "conflict": { + "azjezz/psl": "*" }, "require-dev": { - "composer/composer": "^2.9.2", - "doctrine/coding-standard": "^14.0.0", - "ext-zip": "^1.15.0", - "phpunit/phpunit": "^11.5.44", - "psalm/plugin-phpunit": "^0.19.5", - "roave/infection-static-analysis-plugin": "^1.39.0", - "vimeo/psalm": "^6.13.1" + "php-standard-library/collection": "^6.0", + "php-standard-library/fun": "^6.0", + "php-standard-library/iter": "^6.0", + "php-standard-library/str": "^6.0", + "phpunit/phpunit": "^13.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-next": "6.1.x-dev" + } + }, "autoload": { + "files": [ + "src/Psl/bootstrap.php" + ], "psr-4": { - "PackageVersions\\": "src/PackageVersions" + "Psl\\Vec\\": "src/Psl/Vec/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1263,26 +2925,26 @@ ], "authors": [ { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "Provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/Ocramius/PackageVersions/issues", - "source": "https://github.com/Ocramius/PackageVersions/tree/2.11.0" - }, - "funding": [ - { - "url": "https://github.com/Ocramius", - "type": "github" + "name": "Seifeddine Gmati", + "email": "azjezz@carthage.software" }, { - "url": "https://tidelift.com/funding/github/packagist/ocramius/package-versions", - "type": "tidelift" + "name": "Contributors", + "homepage": "https://github.com/php-standard-library/php-standard-library/graphs/contributors" } ], - "time": "2025-11-27T11:43:11+00:00" + "description": "Functions for creating and transforming sequential, 0-indexed arrays (lists)", + "homepage": "https://php-standard-library.dev", + "keywords": [ + "array", + "list", + "vec", + "vector" + ], + "support": { + "source": "https://github.com/php-standard-library/vec/tree/6.1.1" + }, + "time": "2026-03-20T08:02:33+00:00" }, { "name": "phpdocumentor/graphviz", @@ -1392,38 +3054,38 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.12.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "92a98ada2b93d9b201a613cb5a33584dde25f195" + "reference": "327a05bbee54120d4786a0dc67aad30226ad4cf9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/92a98ada2b93d9b201a613cb5a33584dde25f195", - "reference": "92a98ada2b93d9b201a613cb5a33584dde25f195", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/327a05bbee54120d4786a0dc67aad30226ad4cf9", + "reference": "327a05bbee54120d4786a0dc67aad30226ad4cf9", "shasum": "" }, "require": { "doctrine/deprecations": "^1.0", - "php": "^7.3 || ^8.0", + "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.0", - "phpstan/phpdoc-parser": "^1.18|^2.0" + "phpstan/phpdoc-parser": "^2.0" }, "require-dev": { "ext-tokenizer": "*", "phpbench/phpbench": "^1.2", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-phpunit": "^1.1", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-phpunit": "^2.0", "phpunit/phpunit": "^9.5", - "rector/rector": "^0.13.9", - "vimeo/psalm": "^4.25" + "psalm/phar": "^4" }, "type": "library", "extra": { "branch-alias": { - "dev-1.x": "1.x-dev" + "dev-1.x": "1.x-dev", + "dev-2.x": "2.x-dev" } }, "autoload": { @@ -1444,22 +3106,22 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.12.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/2.0.0" }, - "time": "2025-11-21T15:09:14+00:00" + "time": "2026-01-06T21:53:42+00:00" }, { "name": "phpstan/phpdoc-parser", - "version": "2.3.1", + "version": "2.3.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "16dbf9937da8d4528ceb2145c9c7c0bd29e26374" + "reference": "a004701b11273a26cd7955a61d67a7f1e525a45a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/16dbf9937da8d4528ceb2145c9c7c0bd29e26374", - "reference": "16dbf9937da8d4528ceb2145c9c7c0bd29e26374", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/a004701b11273a26cd7955a61d67a7f1e525a45a", + "reference": "a004701b11273a26cd7955a61d67a7f1e525a45a", "shasum": "" }, "require": { @@ -1491,17 +3153,17 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.2" }, - "time": "2026-01-12T11:33:04+00:00" + "time": "2026-01-25T14:56:51+00:00" }, { "name": "phpstan/phpstan", - "version": "2.1.33", + "version": "2.1.46", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9e800e6bee7d5bd02784d4c6069b48032d16224f", - "reference": "9e800e6bee7d5bd02784d4c6069b48032d16224f", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/a193923fc2d6325ef4e741cf3af8c3e8f54dbf25", + "reference": "a193923fc2d6325ef4e741cf3af8c3e8f54dbf25", "shasum": "" }, "require": { @@ -1546,7 +3208,7 @@ "type": "github" } ], - "time": "2025-12-05T10:24:31+00:00" + "time": "2026-04-01T09:25:14+00:00" }, { "name": "psr/container", @@ -1848,31 +3510,43 @@ }, { "name": "roave/backward-compatibility-check", - "version": "8.17.0", + "version": "8.20.0", "source": { "type": "git", "url": "https://github.com/Roave/BackwardCompatibilityCheck.git", - "reference": "b3aab0b917d127c3e048b4f96a7f588388e30ac9" + "reference": "ba4f4b2c4d388d2bf974d1fefa28557e628d8da4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/BackwardCompatibilityCheck/zipball/b3aab0b917d127c3e048b4f96a7f588388e30ac9", - "reference": "b3aab0b917d127c3e048b4f96a7f588388e30ac9", + "url": "https://api.github.com/repos/Roave/BackwardCompatibilityCheck/zipball/ba4f4b2c4d388d2bf974d1fefa28557e628d8da4", + "reference": "ba4f4b2c4d388d2bf974d1fefa28557e628d8da4", "shasum": "" }, "require": { - "azjezz/psl": "^4.2.0", - "composer/composer": "^2.9.2", + "composer/composer": "^2.9.5", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-simplexml": "*", - "nikic/php-parser": "^5.6.2", + "nikic/php-parser": "^5.7.0", "nikolaposa/version": "^4.2.1", "ocramius/package-versions": "^2.11.0", - "php": "~8.3.0 || ~8.4.0 || ~8.5.0", - "roave/better-reflection": "^6.66.0", - "symfony/console": "^7.4.0" + "php": "~8.4.0 || ~8.5.0", + "php-standard-library/async": "^6.0", + "php-standard-library/dict": "^6.0", + "php-standard-library/env": "^6.0", + "php-standard-library/file": "^6.0", + "php-standard-library/filesystem": "^6.0", + "php-standard-library/foundation": "^6.0", + "php-standard-library/iter": "^6.0", + "php-standard-library/json": "^6.0", + "php-standard-library/regex": "^6.0", + "php-standard-library/shell": "^6.0", + "php-standard-library/str": "^6.0", + "php-standard-library/type": "^6.0", + "php-standard-library/vec": "^6.0", + "roave/better-reflection": "^6.69.0", + "symfony/console": "^7.4.4" }, "conflict": { "marc-mabe/php-enum": "<4.7.2", @@ -1881,14 +3555,16 @@ }, "require-dev": { "doctrine/coding-standard": "^14.0.0", - "justinrainbow/json-schema": "^6.6.2", + "justinrainbow/json-schema": "^6.7.2", + "php-standard-library/hash": "^6.0", "php-standard-library/psalm-plugin": "^2.3.0", - "phpunit/phpunit": "^12.4.4", + "php-standard-library/secure-random": "^6.0", + "phpunit/phpunit": "^12.5.12", "psalm/plugin-phpunit": "^0.19.5", - "roave/infection-static-analysis-plugin": "^1.41.0", + "roave/infection-static-analysis-plugin": "^1.43.0", "roave/security-advisories": "dev-master", "squizlabs/php_codesniffer": "^4.0.1", - "vimeo/psalm": "^6.13.1" + "vimeo/psalm": "^6.15.1" }, "bin": [ "bin/roave-backward-compatibility-check" @@ -1916,27 +3592,27 @@ "description": "Tool to compare two revisions of a public API to check for BC breaks", "support": { "issues": "https://github.com/Roave/BackwardCompatibilityCheck/issues", - "source": "https://github.com/Roave/BackwardCompatibilityCheck/tree/8.17.0" + "source": "https://github.com/Roave/BackwardCompatibilityCheck/tree/8.20.0" }, - "time": "2025-11-29T01:02:22+00:00" + "time": "2026-03-20T13:02:25+00:00" }, { "name": "roave/better-reflection", - "version": "6.67.0", + "version": "6.69.0", "source": { "type": "git", "url": "https://github.com/Roave/BetterReflection.git", - "reference": "59ed7abcddba98b3a0533cbfbf6d033b9d239fc4" + "reference": "dccbd10b5b3da8718f2945ad50faf90a1cb2db55" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/BetterReflection/zipball/59ed7abcddba98b3a0533cbfbf6d033b9d239fc4", - "reference": "59ed7abcddba98b3a0533cbfbf6d033b9d239fc4", + "url": "https://api.github.com/repos/Roave/BetterReflection/zipball/dccbd10b5b3da8718f2945ad50faf90a1cb2db55", + "reference": "dccbd10b5b3da8718f2945ad50faf90a1cb2db55", "shasum": "" }, "require": { "ext-json": "*", - "jetbrains/phpstorm-stubs": "2024.3", + "jetbrains/phpstorm-stubs": "2025.3", "nikic/php-parser": "^5.7.0", "php": "~8.3.2 || ~8.4.1 || ~8.5.0" }, @@ -1945,7 +3621,7 @@ }, "require-dev": { "phpbench/phpbench": "^1.4.3", - "phpunit/phpunit": "^11.5.46" + "phpunit/phpunit": "^12.5.8" }, "suggest": { "composer/composer": "Required to use the ComposerSourceLocator" @@ -1985,9 +3661,9 @@ "description": "Better Reflection - an improved code reflection API", "support": { "issues": "https://github.com/Roave/BetterReflection/issues", - "source": "https://github.com/Roave/BetterReflection/tree/6.67.0" + "source": "https://github.com/Roave/BetterReflection/tree/6.69.0" }, - "time": "2026-01-13T16:19:15+00:00" + "time": "2026-02-01T13:20:30+00:00" }, { "name": "seld/jsonlint", @@ -2164,34 +3840,33 @@ }, { "name": "symfony/config", - "version": "v7.4.3", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "800ce889e358a53a9678b3212b0c8cecd8c6aace" + "reference": "c7369cc1da250fcbfe0c5a9d109e419661549c39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/800ce889e358a53a9678b3212b0c8cecd8c6aace", - "reference": "800ce889e358a53a9678b3212b0c8cecd8c6aace", + "url": "https://api.github.com/repos/symfony/config/zipball/c7369cc1da250fcbfe0c5a9d109e419661549c39", + "reference": "c7369cc1da250fcbfe0c5a9d109e419661549c39", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.4", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/filesystem": "^7.1|^8.0", - "symfony/polyfill-ctype": "~1.8" + "symfony/filesystem": "^7.4|^8.0", + "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/finder": "<6.4", "symfony/service-contracts": "<2.5" }, "require-dev": { - "symfony/event-dispatcher": "^6.4|^7.0|^8.0", - "symfony/finder": "^6.4|^7.0|^8.0", - "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/event-dispatcher": "^7.4|^8.0", + "symfony/finder": "^7.4|^8.0", + "symfony/messenger": "^7.4|^8.0", "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^6.4|^7.0|^8.0" + "symfony/yaml": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -2219,7 +3894,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v7.4.3" + "source": "https://github.com/symfony/config/tree/v8.0.8" }, "funding": [ { @@ -2239,20 +3914,20 @@ "type": "tidelift" } ], - "time": "2025-12-23T14:24:27+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/console", - "version": "v7.4.3", + "version": "v7.4.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "732a9ca6cd9dfd940c639062d5edbde2f6727fb6" + "reference": "1e92e39c51f95b88e3d66fa2d9f06d1fb45dd707" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/732a9ca6cd9dfd940c639062d5edbde2f6727fb6", - "reference": "732a9ca6cd9dfd940c639062d5edbde2f6727fb6", + "url": "https://api.github.com/repos/symfony/console/zipball/1e92e39c51f95b88e3d66fa2d9f06d1fb45dd707", + "reference": "1e92e39c51f95b88e3d66fa2d9f06d1fb45dd707", "shasum": "" }, "require": { @@ -2317,7 +3992,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.4.3" + "source": "https://github.com/symfony/console/tree/v7.4.8" }, "funding": [ { @@ -2337,43 +4012,40 @@ "type": "tidelift" } ], - "time": "2025-12-23T14:50:43+00:00" + "time": "2026-03-30T13:54:39+00:00" }, { "name": "symfony/dependency-injection", - "version": "v7.4.3", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "54122901b6d772e94f1e71a75e0533bc16563499" + "reference": "3ce58b0fa844dc647ca1d66ea34748af985728c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/54122901b6d772e94f1e71a75e0533bc16563499", - "reference": "54122901b6d772e94f1e71a75e0533bc16563499", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/3ce58b0fa844dc647ca1d66ea34748af985728c5", + "reference": "3ce58b0fa844dc647ca1d66ea34748af985728c5", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.4", "psr/container": "^1.1|^2.0", "symfony/deprecation-contracts": "^2.5|^3", "symfony/service-contracts": "^3.6", - "symfony/var-exporter": "^6.4.20|^7.2.5|^8.0" + "symfony/var-exporter": "^7.4|^8.0" }, "conflict": { - "ext-psr": "<1.1|>=2", - "symfony/config": "<6.4", - "symfony/finder": "<6.4", - "symfony/yaml": "<6.4" + "ext-psr": "<1.1|>=2" }, "provide": { "psr/container-implementation": "1.1|2.0", "symfony/service-implementation": "1.1|2.0|3.0" }, "require-dev": { - "symfony/config": "^6.4|^7.0|^8.0", - "symfony/expression-language": "^6.4|^7.0|^8.0", - "symfony/yaml": "^6.4|^7.0|^8.0" + "symfony/config": "^7.4|^8.0", + "symfony/expression-language": "^7.4|^8.0", + "symfony/yaml": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -2401,7 +4073,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v7.4.3" + "source": "https://github.com/symfony/dependency-injection/tree/v8.0.8" }, "funding": [ { @@ -2421,7 +4093,7 @@ "type": "tidelift" } ], - "time": "2025-12-28T10:55:46+00:00" + "time": "2026-03-31T07:15:36+00:00" }, { "name": "symfony/deprecation-contracts", @@ -2492,24 +4164,24 @@ }, { "name": "symfony/event-dispatcher", - "version": "v7.4.0", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "9dddcddff1ef974ad87b3708e4b442dc38b2261d" + "reference": "f662acc6ab22a3d6d716dcb44c381c6002940df6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9dddcddff1ef974ad87b3708e4b442dc38b2261d", - "reference": "9dddcddff1ef974ad87b3708e4b442dc38b2261d", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f662acc6ab22a3d6d716dcb44c381c6002940df6", + "reference": "f662acc6ab22a3d6d716dcb44c381c6002940df6", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.4", "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { - "symfony/dependency-injection": "<6.4", + "symfony/security-http": "<7.4", "symfony/service-contracts": "<2.5" }, "provide": { @@ -2518,14 +4190,14 @@ }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0|^8.0", - "symfony/dependency-injection": "^6.4|^7.0|^8.0", - "symfony/error-handler": "^6.4|^7.0|^8.0", - "symfony/expression-language": "^6.4|^7.0|^8.0", - "symfony/framework-bundle": "^6.4|^7.0|^8.0", - "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/config": "^7.4|^8.0", + "symfony/dependency-injection": "^7.4|^8.0", + "symfony/error-handler": "^7.4|^8.0", + "symfony/expression-language": "^7.4|^8.0", + "symfony/framework-bundle": "^7.4|^8.0", + "symfony/http-foundation": "^7.4|^8.0", "symfony/service-contracts": "^2.5|^3", - "symfony/stopwatch": "^6.4|^7.0|^8.0" + "symfony/stopwatch": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -2553,7 +4225,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.4.0" + "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.8" }, "funding": [ { @@ -2573,7 +4245,7 @@ "type": "tidelift" } ], - "time": "2025-10-28T09:38:46+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -2653,25 +4325,25 @@ }, { "name": "symfony/filesystem", - "version": "v7.4.0", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "d551b38811096d0be9c4691d406991b47c0c630a" + "reference": "66b769ae743ce2d13e435528fbef4af03d623e5a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/d551b38811096d0be9c4691d406991b47c0c630a", - "reference": "d551b38811096d0be9c4691d406991b47c0c630a", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/66b769ae743ce2d13e435528fbef4af03d623e5a", + "reference": "66b769ae743ce2d13e435528fbef4af03d623e5a", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.4", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, "require-dev": { - "symfony/process": "^6.4|^7.0|^8.0" + "symfony/process": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -2699,7 +4371,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.4.0" + "source": "https://github.com/symfony/filesystem/tree/v8.0.8" }, "funding": [ { @@ -2719,27 +4391,27 @@ "type": "tidelift" } ], - "time": "2025-11-27T13:27:24+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/finder", - "version": "v7.4.3", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "fffe05569336549b20a1be64250b40516d6e8d06" + "reference": "8da41214757b87d97f181e3d14a4179286151007" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/fffe05569336549b20a1be64250b40516d6e8d06", - "reference": "fffe05569336549b20a1be64250b40516d6e8d06", + "url": "https://api.github.com/repos/symfony/finder/zipball/8da41214757b87d97f181e3d14a4179286151007", + "reference": "8da41214757b87d97f181e3d14a4179286151007", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.4" }, "require-dev": { - "symfony/filesystem": "^6.4|^7.0|^8.0" + "symfony/filesystem": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -2767,7 +4439,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.4.3" + "source": "https://github.com/symfony/finder/tree/v8.0.8" }, "funding": [ { @@ -2787,7 +4459,7 @@ "type": "tidelift" } ], - "time": "2025-12-23T14:50:43+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/polyfill-ctype", @@ -3450,16 +5122,16 @@ }, { "name": "symfony/process", - "version": "v8.0.3", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "0cbbd88ec836f8757641c651bb995335846abb78" + "reference": "cb8939aff03470d1a9d1d1b66d08c6fa71b3bbdc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/0cbbd88ec836f8757641c651bb995335846abb78", - "reference": "0cbbd88ec836f8757641c651bb995335846abb78", + "url": "https://api.github.com/repos/symfony/process/zipball/cb8939aff03470d1a9d1d1b66d08c6fa71b3bbdc", + "reference": "cb8939aff03470d1a9d1d1b66d08c6fa71b3bbdc", "shasum": "" }, "require": { @@ -3491,7 +5163,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v8.0.3" + "source": "https://github.com/symfony/process/tree/v8.0.8" }, "funding": [ { @@ -3511,7 +5183,7 @@ "type": "tidelift" } ], - "time": "2025-12-19T10:01:18+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/service-contracts", @@ -3602,16 +5274,16 @@ }, { "name": "symfony/string", - "version": "v8.0.1", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc" + "reference": "ae9488f874d7603f9d2dfbf120203882b645d963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ba65a969ac918ce0cc3edfac6cdde847eba231dc", - "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc", + "url": "https://api.github.com/repos/symfony/string/zipball/ae9488f874d7603f9d2dfbf120203882b645d963", + "reference": "ae9488f874d7603f9d2dfbf120203882b645d963", "shasum": "" }, "require": { @@ -3668,7 +5340,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v8.0.1" + "source": "https://github.com/symfony/string/tree/v8.0.8" }, "funding": [ { @@ -3688,20 +5360,20 @@ "type": "tidelift" } ], - "time": "2025-12-01T09:13:36+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/var-exporter", - "version": "v8.0.0", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "7345f46c251f2eb27c7b3ebdb5bb076b3ffcae04" + "reference": "15776bb07a91b089037da89f8832fa41d5fa6ec6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/7345f46c251f2eb27c7b3ebdb5bb076b3ffcae04", - "reference": "7345f46c251f2eb27c7b3ebdb5bb076b3ffcae04", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/15776bb07a91b089037da89f8832fa41d5fa6ec6", + "reference": "15776bb07a91b089037da89f8832fa41d5fa6ec6", "shasum": "" }, "require": { @@ -3748,7 +5420,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v8.0.0" + "source": "https://github.com/symfony/var-exporter/tree/v8.0.8" }, "funding": [ { @@ -3768,32 +5440,31 @@ "type": "tidelift" } ], - "time": "2025-11-05T18:53:00+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/yaml", - "version": "v7.4.1", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "24dd4de28d2e3988b311751ac49e684d783e2345" + "reference": "54174ab48c0c0f9e21512b304be17f8150ccf8f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/24dd4de28d2e3988b311751ac49e684d783e2345", - "reference": "24dd4de28d2e3988b311751ac49e684d783e2345", + "url": "https://api.github.com/repos/symfony/yaml/zipball/54174ab48c0c0f9e21512b304be17f8150ccf8f1", + "reference": "54174ab48c0c0f9e21512b304be17f8150ccf8f1", "shasum": "" }, "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.4", "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/console": "<6.4" + "symfony/console": "<7.4" }, "require-dev": { - "symfony/console": "^6.4|^7.0|^8.0" + "symfony/console": "^7.4|^8.0" }, "bin": [ "Resources/bin/yaml-lint" @@ -3824,7 +5495,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v7.4.1" + "source": "https://github.com/symfony/yaml/tree/v8.0.8" }, "funding": [ { @@ -3844,7 +5515,7 @@ "type": "tidelift" } ], - "time": "2025-12-04T18:11:45+00:00" + "time": "2026-03-30T15:14:47+00:00" } ], "packages-dev": [],