Review main Merged

61342[BUGFIX] Prevent ReflectionException when scheduler/reports is unavailable

Benjamin Franzke CR +2 V +2 Easy +9 −0 updated 08/04/19, 08:24

Commit message

When symfony/dependency-injection crawls the available classes
a ReflectionException [1] occurs when the base class or interface of an
analyzed class is not available.

This currently happens for scheduler tasks and status reports in composer
mode. The dependency to external base classes/interfaces is missing in the
respective composer.json files and therefore EXT:scheduler and EXT:reports
are not guaranteed to be availble.

Exclude the affected status report and scheduler task classes from
autowiring and autoconfiguration in order to fix this issue.

Note: Dependency injection can still be added for these classes,
but as long as the implicit dependencies to EXT:scheduler and EXT:reports
are not fixed, these classes will need to be wired manually. Example:

  TYPO3\CMS\Reports\Task\SystemStatusUpdateTask:
    autoconfigure: false
    autowire: false
    public: true
    arguments:
      - '@cache.core'

[1] Uncaught ReflectionException:
    Class TYPO3\CMS\Scheduler\Task\AbstractTask not found in
    […]/typo3/sysext/reports/Classes/Task/SystemStatusUpdateTask.php:28

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 2

Files 4