Skip to content

Commit

Permalink
#50: drop isStandalone support
Browse files Browse the repository at this point in the history
  • Loading branch information
yiendos committed Dec 15, 2020
1 parent 006c2eb commit 8d01d9f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 25 deletions.
4 changes: 1 addition & 3 deletions src/Joomlatools/Composer/ExtensionInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ public function __construct(IOInterface $io)

public function execute()
{
$isStandalone = Util::isStandalone();

if ($isStandalone){
if (!Util::isJoomla() && !Util::isJoomlatoolsPlatform()) {
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Joomlatools/Composer/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Plugin implements PluginInterface, EventSubscriberInterface
*/
public function activate(Composer $composer, IOInterface $io)
{
if (!Util::isJoomla() && !Util::isJoomlatoolsPlatform() && !Util::isStandalone()) {
if (!Util::isJoomla() && !Util::isJoomlatoolsPlatform()) {
throw new \RuntimeException('Working directory is not a valid install destination');
}

Expand Down
21 changes: 0 additions & 21 deletions src/Joomlatools/Joomla/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,6 @@ public static function getPlatformName()
return static::isJoomlatoolsPlatform() ? 'Joomlatools Platform' : 'Joomla';
}

/**
* Validate if the current working directory is a Standalone app
*
* @return bool
*/
public static function isStandalone()
{
$directories = array('./components', './web');

foreach ($directories as $directory)
{
$path = realpath($directory);

if (!file_exists($path)){
return false;
}
}

return true;
}

/**
* Validate if the current working directory has a valid Joomla installation
*
Expand Down

0 comments on commit 8d01d9f

Please sign in to comment.