composer.json declares
"autoload-dev": { "psr-4": { "OCA\\OpenRegister\\": "tests/Stubs/" } }
and tests/Stubs/Db/ObjectEntity.php is an abstract stub. When SoftwareCatalog's vendor/ is built with a plain composer install (i.e. with dev deps — which is what gets deployed to the dev container / Nextcloud apps dir), the dev autoloader is active, so its vendor/composer/autoload_psr4.php / autoload_classmap.php map OCA\OpenRegister\Db\ObjectEntity → tests/Stubs/Db/ObjectEntity.php. Because every enabled app's vendor/autoload.php is registered globally, that mapping then shadows the real OCA\OpenRegister\Db\ObjectEntity for all apps — so OpenRegister's own MagicSearchHandler::convertRowToObjectEntity() does new ObjectEntity() and PHP fatals with Cannot instantiate abstract class OCA\OpenRegister\Db\ObjectEntity. This takes down OpenRegister's entire object-read path (and therefore every OR-backed app) on a dev install that has SoftwareCatalog enabled. Disabling SoftwareCatalog (so its autoloader is no longer registered) restores OR.
Fixes (any of):
- Deploy SoftwareCatalog with
composer install --no-dev so the dev autoloader isn't loaded in production.
- Don't PSR-4-map a foreign namespace (
OCA\OpenRegister\) at all — load the stubs only from the PHPUnit bootstrap (tests/bootstrap.php require), not via composer autoload.
- Namespace the stubs under
OCA\SoftwareCatalog\Tests\Stubs\… and class_alias() them to OCA\OpenRegister\… only inside the test bootstrap.
(Surfaced while resetting the OpenRegister dev environment — clean-env.sh + re-enabling all ConductionNL apps left OR's object layer crashing until SoftwareCatalog was disabled.)
composer.jsondeclaresand
tests/Stubs/Db/ObjectEntity.phpis an abstract stub. When SoftwareCatalog'svendor/is built with a plaincomposer install(i.e. with dev deps — which is what gets deployed to the dev container / Nextcloud apps dir), the dev autoloader is active, so itsvendor/composer/autoload_psr4.php/autoload_classmap.phpmapOCA\OpenRegister\Db\ObjectEntity→tests/Stubs/Db/ObjectEntity.php. Because every enabled app'svendor/autoload.phpis registered globally, that mapping then shadows the realOCA\OpenRegister\Db\ObjectEntityfor all apps — so OpenRegister's ownMagicSearchHandler::convertRowToObjectEntity()doesnew ObjectEntity()and PHP fatals withCannot instantiate abstract class OCA\OpenRegister\Db\ObjectEntity. This takes down OpenRegister's entire object-read path (and therefore every OR-backed app) on a dev install that has SoftwareCatalog enabled. Disabling SoftwareCatalog (so its autoloader is no longer registered) restores OR.Fixes (any of):
composer install --no-devso the dev autoloader isn't loaded in production.OCA\OpenRegister\) at all — load the stubs only from the PHPUnit bootstrap (tests/bootstrap.phprequire), not via composer autoload.OCA\SoftwareCatalog\Tests\Stubs\…andclass_alias()them toOCA\OpenRegister\…only inside the test bootstrap.(Surfaced while resetting the OpenRegister dev environment —
clean-env.sh+ re-enabling all ConductionNL apps left OR's object layer crashing until SoftwareCatalog was disabled.)