Context
softwarecatalog#230 (closed today by softwarecatalog#232) surfaced a subtle bug pattern: autoload-dev PSR-4 mapping OCA\\OpenRegister\\ → tests/Stubs/ shadows the real OpenRegister classes in any production deployment that retains dev autoloads (the standard composer install --no-dev is supposed to drop these, but not every deploy path enforces it).
The exact same pattern is plausibly present in any other Conduction PHP app that has unit tests stubbing OpenRegister entities — i.e. all of them.
Action
Why this is non-code-adjacent
Silent prod bug — runtime symptoms manifest as "ObjectEntity has no method getSchema" or method-cannot-be-configured exceptions, easy to misdiagnose as an upstream OR issue.
Context
softwarecatalog#230 (closed today by softwarecatalog#232) surfaced a subtle bug pattern:
autoload-devPSR-4 mappingOCA\\OpenRegister\\→tests/Stubs/shadows the real OpenRegister classes in any production deployment that retains dev autoloads (the standardcomposer install --no-devis supposed to drop these, but not every deploy path enforces it).The exact same pattern is plausibly present in any other Conduction PHP app that has unit tests stubbing OpenRegister entities — i.e. all of them.
Action
composer.jsonforautoload-dev.psr-4entries that mapOCA\\OpenRegister\\(or other OR namespaces)tests/bootstrap.php(not via composer autoload) so prodvendor/can't shadow real classesWhy this is non-code-adjacent
Silent prod bug — runtime symptoms manifest as "ObjectEntity has no method getSchema" or method-cannot-be-configured exceptions, easy to misdiagnose as an upstream OR issue.