-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit aa80306
Showing
19 changed files
with
2,065 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
<?php | ||
/* | ||
* This file is part of the TYPO3 CMS project. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
namespace TYPO3\CMS\Install\Command; | ||
|
||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Helper\FormatterHelper; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
use TYPO3\CMS\Install\Status\StatusInterface; | ||
use TYPO3\CMS\Install\SystemEnvironment\Check; | ||
|
||
/** | ||
* Class TYPO3\CMS\Install\Command\CheckCommand | ||
*/ | ||
class CheckCommand extends Command | ||
{ | ||
|
||
/** | ||
* @return void | ||
*/ | ||
protected function configure() | ||
{ | ||
$this->setName('check'); | ||
} | ||
|
||
/** | ||
* @param InputInterface $input | ||
* @param OutputInterface $output | ||
* | ||
* @return int | ||
*/ | ||
protected function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
$statuus = (new Check())->getStatus(); | ||
|
||
$dots = []; | ||
$oks = []; | ||
$warnings = []; | ||
$errors = []; | ||
foreach ($statuus as $status) { | ||
/** @var StatusInterface $status */ | ||
|
||
switch ($status->getSeverity()) { | ||
case 'notice': | ||
$dots[] = '<info>.</info>'; | ||
$oks[] = $status->getTitle(); | ||
break; | ||
case 'information': | ||
$dots[] = '<info>.</info>'; | ||
$oks[] = $status->getTitle(); | ||
break; | ||
case 'ok': | ||
$dots[] = '<info>.</info>'; | ||
$oks[] = $status->getTitle(); | ||
break; | ||
case 'warning': | ||
$dots[] = '<comment>W</comment>'; | ||
$warnings[] = $status->getTitle(); | ||
break; | ||
case 'error': | ||
$dots[] = '<error>E</error>'; | ||
$errors[] = $status->getTitle(); | ||
break; | ||
case 'alert': | ||
$dots[] = '<error>E</error>'; | ||
$errors[] = $status->getTitle(); | ||
break; | ||
default: | ||
break; | ||
} | ||
} | ||
|
||
/** @var FormatterHelper $formatter */ | ||
$formatter = $this->getHelper('formatter'); | ||
|
||
$output->writeln(''); | ||
$output->writeln('> PHP is using the following php.ini file:'); | ||
$output->writeln(' <info>' . get_cfg_var('cfg_file_path') . '</info>'); | ||
$output->writeln(''); | ||
|
||
$output->writeln('> Checking TYPO3 requirements:'); | ||
$output->writeln(' ' . implode('', $dots)); | ||
$output->writeln(''); | ||
|
||
$output->writeln($formatter->formatSection('Errors', '', 'error')); | ||
$output->writeln($formatter->formatBlock($errors, 'error')); | ||
$output->writeln(''); | ||
|
||
$output->writeln($formatter->formatSection('Warning', '', 'comment')); | ||
$output->writeln($formatter->formatBlock($warnings, 'comment')); | ||
$output->writeln(''); | ||
|
||
$output->writeln($formatter->formatSection('OK', '', 'info')); | ||
$output->writeln($formatter->formatBlock($oks, 'info')); | ||
|
||
return 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
namespace TYPO3\CMS\Install; | ||
|
||
/* | ||
* This file is part of the TYPO3 CMS project. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
/** | ||
* A generic install exception | ||
*/ | ||
class Exception extends \Exception | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<?php | ||
namespace TYPO3\CMS\Install\Status; | ||
|
||
/* | ||
* This file is part of the TYPO3 CMS project. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
/** | ||
* Abstract status | ||
*/ | ||
abstract class AbstractStatus implements StatusInterface | ||
{ | ||
/** | ||
* @var string Severity | ||
*/ | ||
protected $severity = ''; | ||
|
||
/** | ||
* @var string Title | ||
*/ | ||
protected $title = ''; | ||
|
||
/** | ||
* @var string Status message | ||
*/ | ||
protected $message = ''; | ||
|
||
/** | ||
* @return string The severity | ||
*/ | ||
public function getSeverity() | ||
{ | ||
return $this->severity; | ||
} | ||
|
||
/** | ||
* @return string The title | ||
*/ | ||
public function getTitle() | ||
{ | ||
return $this->title; | ||
} | ||
|
||
/** | ||
* Set title | ||
* | ||
* @param string $title The title | ||
* @return void | ||
*/ | ||
public function setTitle($title) | ||
{ | ||
$this->title = $title; | ||
} | ||
|
||
/** | ||
* Get status message | ||
* | ||
* @return string Status message | ||
*/ | ||
public function getMessage() | ||
{ | ||
return $this->message; | ||
} | ||
|
||
/** | ||
* Set status message | ||
* | ||
* @param string $message Status message | ||
* @return void | ||
*/ | ||
public function setMessage($message) | ||
{ | ||
$this->message = $message; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
namespace TYPO3\CMS\Install\Status; | ||
|
||
/* | ||
* This file is part of the TYPO3 CMS project. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
/** | ||
* Alert level status | ||
*/ | ||
class AlertStatus extends AbstractStatus implements StatusInterface | ||
{ | ||
/** | ||
* @var string The severity | ||
*/ | ||
protected $severity = 'alert'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
namespace TYPO3\CMS\Install\Status; | ||
|
||
/* | ||
* This file is part of the TYPO3 CMS project. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
/** | ||
* Error level status | ||
*/ | ||
class ErrorStatus extends AbstractStatus implements StatusInterface | ||
{ | ||
/** | ||
* @var string The severity | ||
*/ | ||
protected $severity = 'error'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
namespace TYPO3\CMS\Install\Status; | ||
|
||
/* | ||
* This file is part of the TYPO3 CMS project. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
/** | ||
* A status exception | ||
*/ | ||
class Exception extends \TYPO3\CMS\Install\Exception | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
namespace TYPO3\CMS\Install\Status; | ||
|
||
/* | ||
* This file is part of the TYPO3 CMS project. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
/** | ||
* Info level status | ||
*/ | ||
class InfoStatus extends AbstractStatus implements StatusInterface | ||
{ | ||
/** | ||
* @var string The severity | ||
*/ | ||
protected $severity = 'information'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
namespace TYPO3\CMS\Install\Status; | ||
|
||
/* | ||
* This file is part of the TYPO3 CMS project. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
/** | ||
* Loading level status - Used in Extension compatibility tester | ||
*/ | ||
class LoadingStatus extends AbstractStatus implements StatusInterface | ||
{ | ||
/** | ||
* @var string The severity | ||
*/ | ||
protected $severity = 'loading'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
namespace TYPO3\CMS\Install\Status; | ||
|
||
/* | ||
* This file is part of the TYPO3 CMS project. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
/** | ||
* Notice level status | ||
*/ | ||
class NoticeStatus extends AbstractStatus implements StatusInterface | ||
{ | ||
/** | ||
* @var string The severity | ||
*/ | ||
protected $severity = 'notice'; | ||
} |
Oops, something went wrong.