Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #72 from punktDe/bugfix/replace-injects-for-typo3-v10
Browse files Browse the repository at this point in the history
BUGFIX: replace @injects for typo3v10
  • Loading branch information
daniellienert committed Feb 24, 2020
2 parents 093b310 + 1320e39 commit 075d687
Show file tree
Hide file tree
Showing 16 changed files with 279 additions and 94 deletions.
19 changes: 17 additions & 2 deletions Classes/Extbase/Property/TypeConverter/ObjectConverter.php
Expand Up @@ -53,17 +53,32 @@ class Tx_PtExtbase_Extbase_Property_TypeConverter_ObjectConverter extends \TYPO3
protected $priority = 0;

/**
* @inject
* @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
*/
protected $objectManager;

/**
* @inject
* @var \TYPO3\CMS\Extbase\Reflection\ReflectionService
*/
protected $reflectionService;


/**
* @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
*/
public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager): void
{
$this->objectManager = $objectManager;
}

/**
* @param \TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService
*/
public function injectReflectionService(\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService): void
{
$this->reflectionService = $reflectionService;
}

/**
* Only convert non-persistent types
*
Expand Down
18 changes: 10 additions & 8 deletions Classes/Logger/Logger.php
Expand Up @@ -35,36 +35,38 @@ class Logger implements SingletonInterface
*/
protected $loggerManager;


/**
* @var \TYPO3\CMS\Core\Log\Logger
*/
protected $logger;


/**
* @var string
*/
protected $logFilePath;


/**
* @var string
*/
protected $exceptionDirectory;

/**
* @var string
*/
protected $defaultLogComponent;

/**
* @inject
* @var \PunktDe\PtExtbase\Logger\LoggerConfiguration
* @var LoggerConfiguration
*/
protected $loggerConfiguration;


/**
* @var string
* @param LoggerConfiguration $loggerConfiguration
*/
protected $defaultLogComponent;
public function injectLoggerConfiguration(LoggerConfiguration $loggerConfiguration): void
{
$this->loggerConfiguration = $loggerConfiguration;
}


public function __construct()
Expand Down
59 changes: 41 additions & 18 deletions Classes/Utility/GenericShellCommandWrapper/AbstractResult.php
Expand Up @@ -21,6 +21,8 @@
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/

use PunktDe\PtExtbase\Logger\Logger;
use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;

/**
Expand All @@ -30,53 +32,74 @@
*/
abstract class AbstractResult
{

/**
* @inject
* @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
* @var GenericShellCommand
*/
protected $objectManager;
protected $command;


/**
* @inject
* @var \PunktDe\PtExtbase\Logger\Logger
* @var int
*/
protected $logger;
protected $exitCode;


/**
* @inject
* @var \PunktDe\PtExtbase\Utility\GenericShellCommandWrapper\ExecutionManager
* @var string
*/
protected $executionManager;
protected $rawResult = '';


/**
* @var \PunktDe\PtExtbase\Utility\GenericShellCommandWrapper\GenericShellCommand
* @var ResultObjectStorage
*/
protected $command;
protected $result;


/**
* @var integer
* @var ObjectManagerInterface
*/
protected $exitCode;
protected $objectManager;

/**
* @var Logger
*/
protected $logger;

/**
* @var string
* @var ExecutionManager
*/
protected $rawResult = '';
protected $executionManager;


/**
* @var ResultObjectStorage
* @param ObjectManagerInterface $objectManager
*/
protected $result;
public function injectObjectManager(ObjectManagerInterface $objectManager): void
{
$this->objectManager = $objectManager;
}

/**
* @param Logger $logger
*/
public function injectLogger(Logger $logger): void
{
$this->logger = $logger;
}

/**
* @param ExecutionManager $executionManager
*/
public function injectExecutionManager(ExecutionManager $executionManager): void
{
$this->executionManager = $executionManager;
}


/**
* @param \PunktDe\PtExtbase\Utility\GenericShellCommandWrapper\GenericShellCommand $command
* @param GenericShellCommand $command
*/
public function __construct($command)
{
Expand Down
27 changes: 22 additions & 5 deletions Classes/Utility/GenericShellCommandWrapper/ExecutionManager.php
Expand Up @@ -21,6 +21,8 @@
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/

use PunktDe\PtExtbase\Logger\Logger;
use PunktDe\PtExtbase\Utility\ShellCommandService;
use TYPO3\CMS\Core\SingletonInterface;

/**
Expand All @@ -30,20 +32,35 @@
*/
class ExecutionManager implements SingletonInterface
{

/**
* @inject
* @var \PunktDe\PtExtbase\Utility\ShellCommandService
* @var ShellCommandService
*/
protected $shellCommandService;


/**
* @inject
* @var \PunktDe\PtExtbase\Logger\Logger
* @var Logger
*/
protected $logger;


/**
* @param ShellCommandService $shellCommandService
*/
public function injectShellCommandService(ShellCommandService $shellCommandService): void
{
$this->shellCommandService = $shellCommandService;
}

/**
* @param Logger $logger
*/
public function injectLogger(Logger $logger): void
{
$this->logger = $logger;
}


/**
* @var GenericShellCommand
*/
Expand Down
27 changes: 21 additions & 6 deletions Classes/Utility/GenericShellCommandWrapper/GenericShellCommand.php
Expand Up @@ -21,6 +21,9 @@
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/

use PunktDe\PtExtbase\Logger\Logger;
use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;

/**
* Generic Shell Command
*
Expand Down Expand Up @@ -53,20 +56,32 @@ class GenericShellCommand
*/
protected $subCommand;


/**
* @inject
* @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
* @var ObjectManagerInterface
*/
protected $objectManager;


/**
* @inject
* @var \PunktDe\PtExtbase\Logger\Logger
* @var Logger
*/
protected $logger;

/**
* @param ObjectManagerInterface $objectManager
*/
public function injectObjectManager(ObjectManagerInterface $objectManager): void
{
$this->objectManager = $objectManager;
}

/**
* @param Logger $logger
*/
public function injectLogger(Logger $logger): void
{
$this->logger = $logger;
}


/**
* @return string
Expand Down
39 changes: 31 additions & 8 deletions Classes/Utility/Git/GitRepository.php
Expand Up @@ -21,8 +21,10 @@
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/

use PunktDe\PtExtbase\Logger\Logger;
use PunktDe\PtExtbase\Utility\GenericShellCommandWrapper\GenericShellCommand;
use PunktDe\PtExtbase\Utility\Files;
use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;

/**
* Git Repository
Expand All @@ -31,27 +33,48 @@
*/
class GitRepository
{

/**
* @inject
* @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
* @var ObjectManagerInterface
*/
protected $objectManager;


/**
* @inject
* @var \PunktDe\PtExtbase\Logger\Logger
* @var Logger
*/
protected $logger;


/**
* @inject
* @var \PunktDe\PtExtbase\Utility\Git\GitExecutionManager
* @var GitExecutionManager
*/
protected $gitExecutionManager;


/**
* @param ObjectManagerInterface $objectManager
*/
public function injectObjectManager(ObjectManagerInterface $objectManager): void
{
$this->objectManager = $objectManager;
}

/**
* @param Logger $logger
*/
public function injectLogger(Logger $logger): void
{
$this->logger = $logger;
}

/**
* @param GitExecutionManager $gitExecutionManager
*/
public function injectGitExecutionManager(GitExecutionManager $gitExecutionManager): void
{
$this->gitExecutionManager = $gitExecutionManager;
}


/**
* @var string
*/
Expand Down
13 changes: 11 additions & 2 deletions Classes/Utility/Git/Result/Result.php
Expand Up @@ -22,6 +22,7 @@
***************************************************************/

use PunktDe\PtExtbase\Utility\GenericShellCommandWrapper\AbstractResult;
use PunktDe\PtExtbase\Utility\Git\GitExecutionManager;

/**
* Result
Expand All @@ -30,12 +31,20 @@
*/
class Result extends AbstractResult
{

/**
* @inject
* @var \PunktDe\PtExtbase\Utility\Git\GitExecutionManager
* @var GitExecutionManager
*/
protected $executionManager;

/**
* @param GitExecutionManager $executionManager
*/
public function injectExecutionManager(GitExecutionManager $executionManager): void
{
$this->executionManager = $executionManager;
}


/**
* @return void
Expand Down

0 comments on commit 075d687

Please sign in to comment.