Browse Source

Move Console namespace one level up

pull/7075/head
Philipp Holzer 3 years ago
parent
commit
d716a3326f
No known key found for this signature in database GPG Key ID: 517BE60E2CE5C8A5
  1. 2
      src/Console/ArchiveContact.php
  2. 2
      src/Console/AutomaticInstallation.php
  3. 2
      src/Console/Cache.php
  4. 2
      src/Console/Config.php
  5. 2
      src/Console/CreateDoxygen.php
  6. 2
      src/Console/DatabaseStructure.php
  7. 2
      src/Console/DocBloxErrorChecker.php
  8. 2
      src/Console/Extract.php
  9. 2
      src/Console/GlobalCommunityBlock.php
  10. 2
      src/Console/GlobalCommunitySilence.php
  11. 2
      src/Console/Maintenance.php
  12. 2
      src/Console/NewPassword.php
  13. 2
      src/Console/PhpToPo.php
  14. 2
      src/Console/PoToPhp.php
  15. 2
      src/Console/PostUpdate.php
  16. 2
      src/Console/ServerBlock.php
  17. 2
      src/Console/Storage.php
  18. 2
      src/Console/Typo.php
  19. 38
      src/Core/Console.php
  20. 4
      tests/src/Console/AutomaticInstallationConsoleTest.php
  21. 6
      tests/src/Console/ConfigConsoleTest.php
  22. 2
      tests/src/Console/ConsoleTest.php
  23. 4
      tests/src/Console/ServerBlockConsoleTest.php

2
src/Core/Console/ArchiveContact.php → src/Console/ArchiveContact.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Console;
namespace Friendica\Console;
use Friendica\Core\L10n;
use Friendica\Database\DBA;

2
src/Core/Console/AutomaticInstallation.php → src/Console/AutomaticInstallation.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Console;
namespace Friendica\Console;
use Asika\SimpleConsole\Console;
use Friendica\BaseObject;

2
src/Core/Console/Cache.php → src/Console/Cache.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Console;
namespace Friendica\Console;
use Asika\SimpleConsole\CommandArgsException;
use Friendica\App;

2
src/Core/Console/Config.php → src/Console/Config.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Console;
namespace Friendica\Console;
use Asika\SimpleConsole\CommandArgsException;
use Friendica\App;

2
src/Core/Console/CreateDoxygen.php → src/Console/CreateDoxygen.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Console;
namespace Friendica\Console;
/**
* Description of CreateDoxygen

2
src/Core/Console/DatabaseStructure.php → src/Console/DatabaseStructure.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Console;
namespace Friendica\Console;
use Friendica\Core;
use Friendica\Core\Update;

2
src/Core/Console/DocBloxErrorChecker.php → src/Console/DocBloxErrorChecker.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Console;
namespace Friendica\Console;
/**
* When I installed docblox, I had the experience that it does not generate any output at all.

2
src/Core/Console/Extract.php → src/Console/Extract.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Console;
namespace Friendica\Console;
/**
* Extracts translation strings from the Friendica project's files to be exported

2
src/Core/Console/GlobalCommunityBlock.php → src/Console/GlobalCommunityBlock.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Console;
namespace Friendica\Console;
use Friendica\Core\L10n;
use Friendica\Model\Contact;

2
src/Core/Console/GlobalCommunitySilence.php → src/Console/GlobalCommunitySilence.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Console;
namespace Friendica\Console;
use Friendica\Core\Protocol;
use Friendica\Database\DBA;

2
src/Core/Console/Maintenance.php → src/Console/Maintenance.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Console;
namespace Friendica\Console;
use Friendica\Core;

2
src/Core/Console/NewPassword.php → src/Console/NewPassword.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Console;
namespace Friendica\Console;
use Friendica\Core\L10n;
use Friendica\Database\DBA;

2
src/Core/Console/PhpToPo.php → src/Console/PhpToPo.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Console;
namespace Friendica\Console;
/**
* Read a strings.php file and create messages.po in the same directory

2
src/Core/Console/PoToPhp.php → src/Console/PoToPhp.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Console;
namespace Friendica\Console;
/**
* Read a messages.po file and create strings.php in the same directory

2
src/Core/Console/PostUpdate.php → src/Console/PostUpdate.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Console;
namespace Friendica\Console;
use Friendica\Core\Config;
use Friendica\Core\L10n;

2
src/Core/Console/ServerBlock.php → src/Console/ServerBlock.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Console;
namespace Friendica\Console;
use Asika\SimpleConsole\CommandArgsException;
use Asika\SimpleConsole\Console;

2
src/Core/Console/Storage.php → src/Console/Storage.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Console;
namespace Friendica\Console;
use Asika\SimpleConsole\CommandArgsException;
use Friendica\Core\StorageManager;

2
src/Core/Console/Typo.php → src/Console/Typo.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Console;
namespace Friendica\Console;
use Friendica\BaseObject;

38
src/Core/Console.php

@ -2,6 +2,8 @@
namespace Friendica\Core;
use Friendica;
/**
* Description of Console
*
@ -47,24 +49,24 @@ HELP;
}
protected $subConsoles = [
'cache' => __NAMESPACE__ . '\Console\Cache',
'config' => __NAMESPACE__ . '\Console\Config',
'createdoxygen' => __NAMESPACE__ . '\Console\CreateDoxygen',
'docbloxerrorchecker' => __NAMESPACE__ . '\Console\DocBloxErrorChecker',
'dbstructure' => __NAMESPACE__ . '\Console\DatabaseStructure',
'extract' => __NAMESPACE__ . '\Console\Extract',
'globalcommunityblock' => __NAMESPACE__ . '\Console\GlobalCommunityBlock',
'globalcommunitysilence' => __NAMESPACE__ . '\Console\GlobalCommunitySilence',
'archivecontact' => __NAMESPACE__ . '\Console\ArchiveContact',
'autoinstall' => __NAMESPACE__ . '\Console\AutomaticInstallation',
'maintenance' => __NAMESPACE__ . '\Console\Maintenance',
'newpassword' => __NAMESPACE__ . '\Console\NewPassword',
'php2po' => __NAMESPACE__ . '\Console\PhpToPo',
'po2php' => __NAMESPACE__ . '\Console\PoToPhp',
'typo' => __NAMESPACE__ . '\Console\Typo',
'postupdate' => __NAMESPACE__ . '\Console\PostUpdate',
'serverblock' => __NAMESPACE__ . '\Console\ServerBlock',
'storage' => __NAMESPACE__ . '\Console\Storage',
'cache' => Friendica\Console\Cache::class,
'config' => Friendica\Console\Config::class,
'createdoxygen' => Friendica\Console\CreateDoxygen::class,
'docbloxerrorchecker' => Friendica\Console\DocBloxErrorChecker::class,
'dbstructure' => Friendica\Console\DatabaseStructure::class,
'extract' => Friendica\Console\Extract::class,
'globalcommunityblock' => Friendica\Console\GlobalCommunityBlock::class,
'globalcommunitysilence' => Friendica\Console\GlobalCommunitySilence::class,
'archivecontact' => Friendica\Console\ArchiveContact::class,
'autoinstall' => Friendica\Console\AutomaticInstallation::class,
'maintenance' => Friendica\Console\Maintenance::class,
'newpassword' => Friendica\Console\NewPassword::class,
'php2po' => Friendica\Console\PhpToPo::class,
'po2php' => Friendica\Console\PoToPhp::class,
'typo' => Friendica\Console\Typo::class,
'postupdate' => Friendica\Console\PostUpdate::class,
'serverblock' => Friendica\Console\ServerBlock::class,
'storage' => Friendica\Console\Storage::class,
];
protected function doExecute()

4
tests/src/Core/Console/AutomaticInstallationConsoleTest.php → tests/src/Console/AutomaticInstallationConsoleTest.php

@ -1,9 +1,9 @@
<?php
namespace Friendica\Test\src\Core\Console;
namespace Friendica\Test\src\Console;
use Friendica\Console\AutomaticInstallation;
use Friendica\Core\Config\Cache\ConfigCache;
use Friendica\Core\Console\AutomaticInstallation;
use Friendica\Core\Installer;
use Friendica\Core\Logger;
use Friendica\Test\Util\DBAMockTrait;

6
tests/src/Core/Console/ConfigConsoleTest.php → tests/src/Console/ConfigConsoleTest.php

@ -1,9 +1,9 @@
<?php
namespace Friendica\Test\src\Core\Console;
namespace Friendica\Test\src\Console;
use Friendica\App\Mode;
use Friendica\Core\Console\Config;
use Friendica\Console\Config;
/**
* @runTestsInSeparateProcesses
@ -116,7 +116,7 @@ class ConfigConsoleTest extends ConsoleTest
$executable = $this->consoleArgv[0];
$assertion = <<<CONF
Executable: {$executable}
Class: Friendica\Core\Console\Config
Class: Friendica\Console\Config
Arguments: array (
0 => 'test',
1 => 'it',

2
tests/src/Core/Console/ConsoleTest.php → tests/src/Console/ConsoleTest.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Test\src\Core\Console;
namespace Friendica\Test\src\Console;
use Asika\SimpleConsole\Console;
use Friendica\Test\MockedTest;

4
tests/src/Core/Console/ServerBlockConsoleTest.php → tests/src/Console/ServerBlockConsoleTest.php

@ -1,8 +1,8 @@
<?php
namespace Friendica\Test\src\Core\Console;
namespace Friendica\Test\src\Console;
use Friendica\Core\Console\ServerBlock;
use Friendica\Console\ServerBlock;
/**
* @runTestsInSeparateProcesses
Loading…
Cancel
Save