Move utils classes to Shaarli\Helper namespace and folder

This commit is contained in:
ArthurHoaro 2020-10-16 13:34:59 +02:00
parent 977db7eabc
commit c2cd15dac2
15 changed files with 17 additions and 12 deletions

View file

@ -4,6 +4,7 @@
use DateTime; use DateTime;
use Exception; use Exception;
use Shaarli\Bookmark\Bookmark; use Shaarli\Bookmark\Bookmark;
use Shaarli\Helper\FileUtils;
/** /**
* Class History * Class History

View file

@ -4,10 +4,10 @@
namespace Shaarli\Front\Controller\Visitor; namespace Shaarli\Front\Controller\Visitor;
use Shaarli\ApplicationUtils;
use Shaarli\Container\ShaarliContainer; use Shaarli\Container\ShaarliContainer;
use Shaarli\Front\Exception\AlreadyInstalledException; use Shaarli\Front\Exception\AlreadyInstalledException;
use Shaarli\Front\Exception\ResourcePermissionException; use Shaarli\Front\Exception\ResourcePermissionException;
use Shaarli\Helper\ApplicationUtils;
use Shaarli\Languages; use Shaarli\Languages;
use Shaarli\Security\SessionManager; use Shaarli\Security\SessionManager;
use Slim\Http\Request; use Slim\Http\Request;

View file

@ -1,5 +1,5 @@
<?php <?php
namespace Shaarli; namespace Shaarli\Helper;
use Exception; use Exception;
use Shaarli\Config\ConfigManager; use Shaarli\Config\ConfigManager;

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Shaarli; namespace Shaarli\Helper;
use Shaarli\Exceptions\IOException; use Shaarli\Exceptions\IOException;

View file

@ -8,7 +8,7 @@
use Iterator; use Iterator;
use Shaarli\Bookmark\Exception\BookmarkNotFoundException; use Shaarli\Bookmark\Exception\BookmarkNotFoundException;
use Shaarli\Exceptions\IOException; use Shaarli\Exceptions\IOException;
use Shaarli\FileUtils; use Shaarli\Helper\FileUtils;
use Shaarli\Render\PageCacheManager; use Shaarli\Render\PageCacheManager;
/** /**

View file

@ -7,7 +7,6 @@
use ReflectionClass; use ReflectionClass;
use ReflectionException; use ReflectionException;
use ReflectionMethod; use ReflectionMethod;
use Shaarli\ApplicationUtils;
use Shaarli\Bookmark\Bookmark; use Shaarli\Bookmark\Bookmark;
use Shaarli\Bookmark\BookmarkArray; use Shaarli\Bookmark\BookmarkArray;
use Shaarli\Bookmark\BookmarkFilter; use Shaarli\Bookmark\BookmarkFilter;
@ -17,6 +16,7 @@
use Shaarli\Config\ConfigManager; use Shaarli\Config\ConfigManager;
use Shaarli\Config\ConfigPhp; use Shaarli\Config\ConfigPhp;
use Shaarli\Exceptions\IOException; use Shaarli\Exceptions\IOException;
use Shaarli\Helper\ApplicationUtils;
use Shaarli\Thumbnailer; use Shaarli\Thumbnailer;
use Shaarli\Updater\Exception\UpdaterException; use Shaarli\Updater\Exception\UpdaterException;

View file

@ -5,9 +5,9 @@
use Exception; use Exception;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use RainTPL; use RainTPL;
use Shaarli\ApplicationUtils;
use Shaarli\Bookmark\BookmarkServiceInterface; use Shaarli\Bookmark\BookmarkServiceInterface;
use Shaarli\Config\ConfigManager; use Shaarli\Config\ConfigManager;
use Shaarli\Helper\ApplicationUtils;
use Shaarli\Security\SessionManager; use Shaarli\Security\SessionManager;
use Shaarli\Thumbnailer; use Shaarli\Thumbnailer;

View file

@ -4,7 +4,7 @@
namespace Shaarli\Security; namespace Shaarli\Security;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Shaarli\FileUtils; use Shaarli\Helper\FileUtils;
/** /**
* Class BanManager * Class BanManager

View file

@ -59,6 +59,7 @@
"Shaarli\\Front\\Controller\\Admin\\": "application/front/controller/admin", "Shaarli\\Front\\Controller\\Admin\\": "application/front/controller/admin",
"Shaarli\\Front\\Controller\\Visitor\\": "application/front/controller/visitor", "Shaarli\\Front\\Controller\\Visitor\\": "application/front/controller/visitor",
"Shaarli\\Front\\Exception\\": "application/front/exceptions", "Shaarli\\Front\\Exception\\": "application/front/exceptions",
"Shaarli\\Helper\\": "application/helper",
"Shaarli\\Http\\": "application/http", "Shaarli\\Http\\": "application/http",
"Shaarli\\Legacy\\": "application/legacy", "Shaarli\\Legacy\\": "application/legacy",
"Shaarli\\Netscape\\": "application/netscape", "Shaarli\\Netscape\\": "application/netscape",

View file

@ -2,7 +2,7 @@
require_once __DIR__ . '/vendor/autoload.php'; require_once __DIR__ . '/vendor/autoload.php';
use Shaarli\ApplicationUtils; use Shaarli\Helper\ApplicationUtils;
use Shaarli\Security\SessionManager; use Shaarli\Security\SessionManager;
// Set 'UTC' as the default timezone if it is not defined in php.ini // Set 'UTC' as the default timezone if it is not defined in php.ini

View file

@ -1,7 +1,8 @@
<?php <?php
namespace Shaarli; namespace Shaarli\Helper;
use Shaarli\Config\ConfigManager; use Shaarli\Config\ConfigManager;
use Shaarli\FakeApplicationUtils;
require_once 'tests/utils/FakeApplicationUtils.php'; require_once 'tests/utils/FakeApplicationUtils.php';

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Shaarli; namespace Shaarli\Helper;
use Exception; use Exception;
use Shaarli\Exceptions\IOException; use Shaarli\Exceptions\IOException;

View file

@ -4,7 +4,7 @@
namespace Shaarli\Security; namespace Shaarli\Security;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Shaarli\FileUtils; use Shaarli\Helper\FileUtils;
use Shaarli\TestCase; use Shaarli\TestCase;
/** /**

View file

@ -2,6 +2,8 @@
namespace Shaarli; namespace Shaarli;
use Shaarli\Helper\ApplicationUtils;
/** /**
* Fake ApplicationUtils class to avoid HTTP requests * Fake ApplicationUtils class to avoid HTTP requests
*/ */

View file

@ -1,6 +1,6 @@
<?php <?php
use Shaarli\FileUtils; use Shaarli\Helper\FileUtils;
use Shaarli\History; use Shaarli\History;
/** /**