Project

General

Profile

Bug #85318

Updated by Feeela no-lastname-given over 6 years ago

When defining a scheduler task class by inheriting from @\TYPO3\CMS\Scheduler\Task\AbstractTask@, an existing constructor does never get executed. 

 The @execute@ method is not static, but anyway it is called with the class being instantiated in a "normal" way, i.e. executing a constructor. 

 What to expect: 
 When I define a constructor in a class inherited from @\TYPO3\CMS\Scheduler\Task\AbstractTask@ it must be executed to allow for variable instantiation. 

 Example: 
 <pre><code class="php"> 
 class ExampleTask extends \TYPO3\CMS\Scheduler\Task\AbstractTask 
 { 
     /** 
      * @var \TYPO3\CMS\Extbase\Object\ObjectManager 
      */ 
     protected $objectManager; 

     /** 
      * PerformMatchingTask constructor. 
      */ 
     public function __construct() 
     { 
         parent::__construct(); 

         // This point is never reached, even a debug-breakpoint here would not be respected. 
         DebuggerUtility::var_dump($this); 
         exit; 
     } 
 } 
 </code></pre> 

Back