-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[!!!][TASK] Switch to Symfony Console command, close #1
This commit is breaking because it removes support for TYPO3 7.6 LTS by switching to Symfony Console commands as described in the following link: https://docs.typo3.org/typo3cms/extensions/core/Changelog/9.4/Deprecation-85977-ExtbaseCommandControllersAndCliAnnotation.html
- Loading branch information
Showing
7 changed files
with
58 additions
and
52 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,44 @@ | ||
<?php | ||
|
||
namespace VV\T3fetch\Command; | ||
|
||
use TYPO3\CMS\Core\Core\Environment; | ||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputArgument; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
class FetchWebsiteCommand extends Command | ||
{ | ||
/** | ||
* Configure the command by defining the name, options and arguments | ||
*/ | ||
protected function configure() | ||
{ | ||
$this | ||
->setDescription('Fetches a website (including all subpages), so the TYPO3 cache gets filled.') | ||
->addArgument( | ||
'baseUrl', | ||
InputArgument::REQUIRED, | ||
'The base url.' | ||
);; | ||
} | ||
|
||
/** | ||
* @param InputInterface $input | ||
* @param OutputInterface $output | ||
*/ | ||
protected function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
$fetchDirectory = Environment::getPublicPath() . '/typo3temp/t3fetch'; | ||
|
||
// Remove fetch directory | ||
exec('rm -rf ' . $fetchDirectory); | ||
|
||
// Create fetch directory | ||
exec('mkdir ' . $fetchDirectory); | ||
|
||
// Fetch website recursively | ||
exec('wget -q -r ' . $input->getArgument('baseUrl') . ' -P ' . $fetchDirectory); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
<?php | ||
|
||
return [ | ||
'fetchWebsite:fetchAll' => [ | ||
'class' => \VV\T3fetch\Command\FetchWebsiteCommand::class, | ||
'schedulable' => true, | ||
], | ||
]; |
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
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
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 |
---|---|---|
|
@@ -7,12 +7,12 @@ | |
'author' => 'visuellverstehen', | ||
'author_email' => '[email protected]', | ||
'author_company' => 'visuellverstehen', | ||
'state' => 'beta', | ||
'state' => 'stable', | ||
'clearCacheOnLoad' => false, | ||
'version' => '0.2.0', | ||
'version' => '1.0.0', | ||
'constraints' => [ | ||
'depends' => [ | ||
'typo3' => '7.6.0-9.5.99', | ||
'typo3' => '8.7.0-9.5.99', | ||
] | ||
] | ||
]; |
This file was deleted.
Oops, something went wrong.