Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Don't create folders for extensions any more #918

Merged
merged 1 commit into from May 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -16,11 +16,10 @@

use Helhum\Typo3Console\Command\AbstractConvertedCommand;
use Helhum\Typo3Console\Command\RelatableCommandInterface;
use Helhum\Typo3Console\Install\FolderStructure\ExtensionFactory;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use TYPO3\CMS\Core\Package\PackageManager;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Install\FolderStructure\DefaultFactory;

class InstallFixFolderStructureCommand extends AbstractConvertedCommand implements RelatableCommandInterface
{
Expand Down Expand Up @@ -72,16 +71,17 @@ protected function handleDeprecatedArgumentsAndOptions(InputInterface $input, Ou
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
$folderStructureFactory = new ExtensionFactory(GeneralUtility::makeInstance(PackageManager::class));
$fixedStatusObjects = $folderStructureFactory
$folderStructureFactory = GeneralUtility::makeInstance(DefaultFactory::class);
$messages = $folderStructureFactory
->getStructure()
->fix();
->fix()
->getAllMessagesAndFlush();

if (empty($fixedStatusObjects)) {
if (empty($messages)) {
$output->writeln('<info>No action performed!</info>');
} else {
$output->writeln('<info>The following directory structure has been fixed:</info>');
foreach ($fixedStatusObjects as $fixedStatusObject) {
foreach ($messages as $fixedStatusObject) {
$output->writeln($fixedStatusObject->getTitle());
}
}
Expand Down
10 changes: 0 additions & 10 deletions Classes/Console/Extension/ExtensionSetup.php
Expand Up @@ -15,23 +15,16 @@
*/

use Helhum\Typo3Console\Database\Schema\SchemaUpdateType;
use Helhum\Typo3Console\Install\FolderStructure\ExtensionFactory;
use Helhum\Typo3Console\Service\CacheService;
use Helhum\Typo3Console\Service\Database\SchemaService;
use TYPO3\CMS\Core\Package\PackageInterface;
use TYPO3\CMS\Core\Package\PackageManager;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\PathUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use TYPO3\CMS\Extensionmanager\Utility\InstallUtility;

class ExtensionSetup
{
/**
* @var ExtensionFactory
*/
private $extensionFactory;

/**
* @var InstallUtility
*/
Expand All @@ -48,12 +41,10 @@ class ExtensionSetup
private $extensionConfiguration;

public function __construct(
ExtensionFactory $extensionFactory = null,
InstallUtility $extensionInstaller = null,
SchemaService $schemaService = null,
ExtensionConfiguration $extensionConfiguration = null
) {
$this->extensionFactory = $extensionFactory ?? new ExtensionFactory(GeneralUtility::makeInstance(PackageManager::class));
$this->extensionInstaller = $extensionInstaller ?? GeneralUtility::makeInstance(ObjectManager::class)->get(InstallUtility::class);
$this->schemaService = $schemaService ?? GeneralUtility::makeInstance(ObjectManager::class)->get(SchemaService::class);
$this->extensionConfiguration = $extensionConfiguration ?? new ExtensionConfiguration();
Expand Down Expand Up @@ -83,7 +74,6 @@ public function deactivateExtensions(array $packageKeys)
public function setupExtensions(array $packages)
{
foreach ($packages as $package) {
$this->extensionFactory->getExtensionStructure($package)->fix();
$this->callInstaller('importInitialFiles', [PathUtility::stripPathSitePrefix($package->getPackagePath()), $package->getPackageKey()]);
$this->extensionConfiguration->saveDefaultConfiguration($package->getPackageKey());
}
Expand Down
188 changes: 0 additions & 188 deletions Classes/Console/Install/FolderStructure/ExtensionFactory.php

This file was deleted.

2 changes: 0 additions & 2 deletions Resources/Private/ExtensionArtifacts/ext_emconf.php
Expand Up @@ -4,8 +4,6 @@
'description' => 'A reliable and powerful command line interface for TYPO3 CMS',
'category' => 'cli',
'state' => 'stable',
'uploadfolder' => 0,
'createDirs' => '',
'modify_tables' => '',
'clearCacheOnLoad' => 0,
'author' => 'Helmut Hummel',
Expand Down
Expand Up @@ -4,8 +4,6 @@
'description' => 'Extension fixture to prove extension compat check is working correctly',
'category' => 'cli',
'state' => 'stable',
'uploadfolder' => 0,
'createDirs' => '',
'modify_tables' => '',
'clearCacheOnLoad' => 0,
'author' => 'Helmut Hummel',
Expand Down
Expand Up @@ -4,8 +4,6 @@
'description' => 'Extension fixture to prove extension setup working correctly',
'category' => 'cli',
'state' => 'stable',
'uploadfolder' => 0,
'createDirs' => '',
'modify_tables' => '',
'clearCacheOnLoad' => 0,
'author' => 'Helmut Hummel',
Expand Down
Expand Up @@ -4,8 +4,6 @@
'description' => 'Extension fixture to prove extension setup working correctly',
'category' => 'cli',
'state' => 'stable',
'uploadfolder' => 0,
'createDirs' => '',
'modify_tables' => '',
'clearCacheOnLoad' => 0,
'author' => 'Helmut Hummel',
Expand Down
Expand Up @@ -4,8 +4,6 @@
'description' => 'Extension fixture to prove generating package states working correctly',
'category' => 'cli',
'state' => 'stable',
'uploadfolder' => 0,
'createDirs' => '',
'modify_tables' => '',
'clearCacheOnLoad' => 0,
'author' => 'Helmut Hummel',
Expand Down
Expand Up @@ -4,8 +4,6 @@
'description' => 'Extension fixture to prove extension setup working correctly',
'category' => 'cli',
'state' => 'stable',
'uploadfolder' => 0,
'createDirs' => '',
'modify_tables' => '',
'clearCacheOnLoad' => 0,
'author' => 'Helmut Hummel',
Expand Down
Expand Up @@ -4,8 +4,6 @@
'description' => 'Extension fixture to prove extension setup working correctly',
'category' => 'cli',
'state' => 'stable',
'uploadfolder' => 0,
'createDirs' => '',
'modify_tables' => '',
'clearCacheOnLoad' => 0,
'author' => 'Helmut Hummel',
Expand Down
Expand Up @@ -4,8 +4,6 @@
'description' => 'Extension fixture to prove upgrade working correctly',
'category' => 'cli',
'state' => 'stable',
'uploadfolder' => 0,
'createDirs' => '',
'modify_tables' => '',
'clearCacheOnLoad' => 0,
'author' => 'Helmut Hummel',
Expand Down
Expand Up @@ -4,8 +4,6 @@
'description' => 'Extension fixture to prove generating package states working correctly',
'category' => 'cli',
'state' => 'stable',
'uploadfolder' => 0,
'createDirs' => '',
'modify_tables' => '',
'clearCacheOnLoad' => 0,
'author' => 'Helmut Hummel',
Expand Down