Review main Merged

61274[TASK] Instantiate Context through dependency injection

Benjamin Franzke CR +2 V +2 Normal +125 −89 updated 07/20/19, 13:05

Commit message

Context is stateful as Aspects dependent on the (currently dispatched)
request type (frontend/backend/installtool/CLI).
Reqest-dependent arguments can not be injected during service
creation; therefore the Context class is now created without default
aspects and enhanced by the application classes (on demand).

Note: The UserAspect constructor is adapted to use an explicit stdClass
allocation instead of an immutable array casted to an object for the
(fallback) pseudo user. This is to avoid php segmentation faults in
functional tests (and also random unit test runs). The segmentation
faults would be triggered due to the constructor change in the Context
class, which now uses ondemand instead of preemptive Aspect creation.
Background: immutable arrays are stored on stack. The cast to an object
probably didn't relocate this memory to the heap which then causes
segmentations faults when the static memory area (on stack) is exceeded.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 10