From ef4b288f1606a01b4bc2a9332226d2d13d3be9f5 Mon Sep 17 00:00:00 2001 From: berfinyuksel Date: Wed, 4 Feb 2026 11:43:57 +0100 Subject: [PATCH 1/2] Fix PHPUnit MockObject Generator missing class error - Update codeception/module-asserts from ^2.0.1 to ^3.0 for Codeception 5.x compatibility - Add codeception/stub ^4.0 to provide PHPUnit mock/stub wrapper - Ensures compatibility with PHPUnit 10.5 and PHP 8.1-8.3 Fixes the "Class PHPUnit\Framework\MockObject\Generator not found" error in Codeception tests. --- composer.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index ffd7353d..222e0f06 100644 --- a/composer.json +++ b/composer.json @@ -26,9 +26,11 @@ "require-dev": { "phpstan/phpstan": "^1.10.30", "phpstan/phpstan-symfony": "^1.3.2", + "phpunit/phpunit": "^10.5", "codeception/codeception": "^5.0.11", - "codeception/module-asserts": "^2.0.1", - "codeception/module-symfony":"^3.1.1", + "codeception/module-asserts": "^3.0", + "codeception/module-symfony": "^3.1.1", + "codeception/stub": "^4.0", "pimcore/elasticsearch-client": "^1.0.0", "pimcore/opensearch-client": "^1.0.0" }, From 5b1ace1f75c7ea0157c535df05783e80097a5e5e Mon Sep 17 00:00:00 2001 From: berfinyuksel Date: Wed, 4 Feb 2026 11:53:17 +0100 Subject: [PATCH 2/2] Fix codeception/stub minimum version for PHPUnit 10 compatibility Set codeception/stub to ^4.1.3 (instead of ^4.0) to ensure PHPUnit 10 support. Version 4.0.x only supports PHPUnit ^8.4 | ^9.0, which causes "Class PHPUnit\Framework\MockObject\Generator not found" errors when CI runs with --prefer-lowest dependencies. Version 4.1.3+ supports PHPUnit ^8.4 | ^9.0 | ^10.0 | ^11, fixing the issue for all dependency resolution strategies. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 222e0f06..121316cb 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ "codeception/codeception": "^5.0.11", "codeception/module-asserts": "^3.0", "codeception/module-symfony": "^3.1.1", - "codeception/stub": "^4.0", + "codeception/stub": "^4.1.3", "pimcore/elasticsearch-client": "^1.0.0", "pimcore/opensearch-client": "^1.0.0" },