diff --git a/app/app.php b/app/app.php index 3f40c7e8ff..97ac33942f 100644 --- a/app/app.php +++ b/app/app.php @@ -11,13 +11,12 @@ use Utopia\Response; use Utopia\Validator\Range; use Utopia\View; use Utopia\Exception; -use Auth\Auth; -use Database\Database; -use Database\Document; -use Database\Validator\Authorization; -use Event\Event; use Utopia\Domains\Domain; -use Utopia\Validator\WhiteList; +use Appwrite\Auth\Auth; +use Appwrite\Database\Database; +use Appwrite\Database\Document; +use Appwrite\Database\Validator\Authorization; +use Appwrite\Event\Event; /* * Configuration files diff --git a/app/config/collections.php b/app/config/collections.php index 52b6b143bf..1314db6894 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -2,7 +2,7 @@ global $providers, $request; -use Database\Database; +use Appwrite\Database\Database; $collections = [ 'console' => [ diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 4ffdd752cf..7c319d296d 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -14,17 +14,17 @@ use Utopia\Validator\URL; use Utopia\Audit\Audit; use Utopia\Audit\Adapters\MySQL as AuditAdapter; use Utopia\Locale\Locale; -use Auth\Auth; -use Auth\Validator\Password; -use Database\Database; -use Database\Document; -use Database\Exception\Duplicate; -use Database\Validator\UID; -use Database\Validator\Authorization; +use Appwrite\Auth\Auth; +use Appwrite\Auth\Validator\Password; +use Appwrite\Database\Database; +use Appwrite\Database\Document; +use Appwrite\Database\Exception\Duplicate; +use Appwrite\Database\Validator\UID; +use Appwrite\Database\Validator\Authorization; +use Appwrite\Template\Template; +use Appwrite\OpenSSL\OpenSSL; use DeviceDetector\DeviceDetector; use GeoIp2\Database\Reader; -use Template\Template; -use OpenSSL\OpenSSL; include_once __DIR__ . '/../shared/api.php'; @@ -264,7 +264,7 @@ $utopia->get('/v1/account/sessions/oauth2/:provider') throw new Exception('Provider is undefined, configure provider app ID and app secret key to continue', 412); } - $classname = 'Auth\\OAuth2\\'.ucfirst($provider); + $classname = 'Appwrite\\Auth\\OAuth2\\'.ucfirst($provider); if (!class_exists($classname)) { throw new Exception('Provider is not supported', 501); @@ -319,7 +319,7 @@ $utopia->get('/v1/account/sessions/oauth2/:provider/redirect') $appSecret = OpenSSL::decrypt($appSecret['data'], $appSecret['method'], $key, 0, hex2bin($appSecret['iv']), hex2bin($appSecret['tag'])); } - $classname = 'Auth\\OAuth2\\'.ucfirst($provider); + $classname = 'Appwrite\\Auth\\OAuth2\\'.ucfirst($provider); if (!class_exists($classname)) { throw new Exception('Provider is not supported', 501); diff --git a/app/controllers/api/avatars.php b/app/controllers/api/avatars.php index 675a871731..fb00725c43 100644 --- a/app/controllers/api/avatars.php +++ b/app/controllers/api/avatars.php @@ -9,7 +9,7 @@ use Utopia\Validator\Range; use Utopia\Validator\URL; use Utopia\Cache\Cache; use Utopia\Cache\Adapter\Filesystem; -use Resize\Resize; +use Appwrite\Resize\Resize; use BaconQrCode\Renderer\ImageRenderer; use BaconQrCode\Renderer\Image\ImagickImageBackEnd; use BaconQrCode\Renderer\RendererStyle\RendererStyle; diff --git a/app/controllers/api/database.php b/app/controllers/api/database.php index 6fb44715a3..94dec67e90 100644 --- a/app/controllers/api/database.php +++ b/app/controllers/api/database.php @@ -9,15 +9,15 @@ use Utopia\Validator\Range; use Utopia\Validator\WhiteList; use Utopia\Validator\Text; use Utopia\Validator\ArrayList; -use Database\Database; -use Database\Document; -use Database\Validator\UID; -use Database\Validator\Key; -use Database\Validator\Structure; -use Database\Validator\Collection; -use Database\Validator\Authorization; -use Database\Exception\Authorization as AuthorizationException; -use Database\Exception\Structure as StructureException; +use Appwrite\Database\Database; +use Appwrite\Database\Document; +use Appwrite\Database\Validator\UID; +use Appwrite\Database\Validator\Key; +use Appwrite\Database\Validator\Structure; +use Appwrite\Database\Validator\Collection; +use Appwrite\Database\Validator\Authorization; +use Appwrite\Database\Exception\Authorization as AuthorizationException; +use Appwrite\Database\Exception\Structure as StructureException; include_once __DIR__ . '/../shared/api.php'; diff --git a/app/controllers/api/health.php b/app/controllers/api/health.php index b5f239046c..5ad1f5b788 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -3,8 +3,8 @@ global $utopia, $request, $response, $register, $project; use Utopia\Exception; -use Storage\Devices\Local; -use Storage\Storage; +use Appwrite\Storage\Devices\Local; +use Appwrite\Storage\Storage; use Appwrite\ClamAV\Network; $utopia->get('/v1/health') diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 80a2706534..43dbf5877e 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -2,7 +2,6 @@ global $utopia, $request, $response, $register, $user, $consoleDB, $projectDB, $providers; -use Auth\Auth; use Utopia\Exception; use Utopia\Response; use Utopia\Validator\ArrayList; @@ -12,13 +11,14 @@ use Utopia\Validator\WhiteList; use Utopia\Validator\Range; use Utopia\Validator\URL; use Utopia\Domains\Domain; -use Task\Validator\Cron; -use Database\Database; -use Database\Document; -use Database\Validator\UID; -use OpenSSL\OpenSSL; +use Appwrite\Auth\Auth; +use Appwrite\Task\Validator\Cron; +use Appwrite\Database\Database; +use Appwrite\Database\Document; +use Appwrite\Database\Validator\UID; +use Appwrite\OpenSSL\OpenSSL; +use Appwrite\Network\Validators\CNAME; use Cron\CronExpression; -use Network\Validators\CNAME; include_once __DIR__ . '/../shared/api.php'; diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index c74b9412c2..2f0000beb7 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -12,16 +12,16 @@ use Utopia\Validator\HexColor; use Utopia\Cache\Cache; use Utopia\Cache\Adapter\Filesystem; use Appwrite\ClamAV\Network; -use Database\Database; -use Database\Validator\UID; -use Storage\Storage; -use Storage\Devices\Local; -use Storage\Validators\File; -use Storage\Validators\FileSize; -use Storage\Validators\Upload; -use Storage\Compression\Algorithms\GZIP; -use Resize\Resize; -use OpenSSL\OpenSSL; +use Appwrite\Database\Database; +use Appwrite\Database\Validator\UID; +use Appwrite\Storage\Storage; +use Appwrite\Storage\Devices\Local; +use Appwrite\Storage\Validators\File; +use Appwrite\Storage\Validators\FileSize; +use Appwrite\Storage\Validators\Upload; +use Appwrite\Storage\Compression\Algorithms\GZIP; +use Appwrite\Resize\Resize; +use Appwrite\OpenSSL\OpenSSL; include_once __DIR__ . '/../shared/api.php'; diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index f7c4020800..a410bcc9af 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -11,13 +11,13 @@ use Utopia\Validator\Range; use Utopia\Validator\ArrayList; use Utopia\Validator\WhiteList; use Utopia\Locale\Locale; -use Database\Database; -use Database\Document; -use Database\Validator\UID; -use Database\Validator\Authorization; -use Database\Exception\Duplicate; -use Template\Template; -use Auth\Auth; +use Appwrite\Auth\Auth; +use Appwrite\Database\Database; +use Appwrite\Database\Document; +use Appwrite\Database\Validator\UID; +use Appwrite\Database\Validator\Authorization; +use Appwrite\Database\Exception\Duplicate; +use Appwrite\Template\Template; include_once __DIR__ . '/../shared/api.php'; diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index a38b545f08..7563264ecf 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -2,8 +2,6 @@ global $utopia, $response, $projectDB, $providers; -use Auth\Auth; -use Auth\Validator\Password; use Utopia\Exception; use Utopia\Response; use Utopia\Validator\Assoc; @@ -14,9 +12,11 @@ use Utopia\Validator\Range; use Utopia\Audit\Audit; use Utopia\Audit\Adapters\MySQL as AuditAdapter; use Utopia\Locale\Locale; -use Database\Database; -use Database\Exception\Duplicate; -use Database\Validator\UID; +use Appwrite\Auth\Auth; +use Appwrite\Auth\Validator\Password; +use Appwrite\Database\Database; +use Appwrite\Database\Exception\Duplicate; +use Appwrite\Database\Validator\UID; use DeviceDetector\DeviceDetector; use GeoIp2\Database\Reader; diff --git a/app/controllers/mock.php b/app/controllers/mock.php index eb84a5b2ba..c964de1019 100644 --- a/app/controllers/mock.php +++ b/app/controllers/mock.php @@ -5,9 +5,9 @@ global $utopia, $request, $response; use Utopia\Validator\Numeric; use Utopia\Validator\Text; use Utopia\Validator\ArrayList; -use Storage\Validators\File; use Utopia\Response; use Utopia\Validator\Host; +use Appwrite\Storage\Validators\File; $result = []; diff --git a/app/controllers/web/console.php b/app/controllers/web/console.php index 47c19ea8ea..4a7f2c8002 100644 --- a/app/controllers/web/console.php +++ b/app/controllers/web/console.php @@ -6,9 +6,9 @@ global $utopia, $response, $request, $layout, $version, $providers, $projectDB; use Utopia\View; use Utopia\Domains\Domain; -use Database\Database; -use Database\Validator\UID; -use Storage\Storage; +use Appwrite\Database\Database; +use Appwrite\Database\Validator\UID; +use Appwrite\Storage\Storage; $utopia->init(function () use ($layout, $utopia) { $layout diff --git a/app/init.php b/app/init.php index 59ac3310e6..6a1a6853ce 100644 --- a/app/init.php +++ b/app/init.php @@ -8,14 +8,14 @@ if (file_exists(__DIR__.'/../vendor/autoload.php')) { use Utopia\App; use Utopia\Request; use Utopia\Response; -use Auth\Auth; -use Database\Database; -use Database\Document; -use Database\Validator\Authorization; -use Database\Adapter\MySQL as MySQLAdapter; -use Database\Adapter\Redis as RedisAdapter; use Utopia\Locale\Locale; use Utopia\Registry\Registry; +use Appwrite\Auth\Auth; +use Appwrite\Database\Database; +use Appwrite\Database\Document; +use Appwrite\Database\Validator\Authorization; +use Appwrite\Database\Adapter\MySQL as MySQLAdapter; +use Appwrite\Database\Adapter\Redis as RedisAdapter; use PHPMailer\PHPMailer\PHPMailer; const APP_NAME = 'Appwrite'; diff --git a/app/tasks/upgrade.php b/app/tasks/upgrade.php index 3652ae824c..80c3b96b9b 100644 --- a/app/tasks/upgrade.php +++ b/app/tasks/upgrade.php @@ -5,11 +5,11 @@ require_once __DIR__.'/../init.php'; global $register, $projectDB, $console, $providers, $request; -use Database\Database; -use Database\Document; -use Database\Validator\Authorization; use Utopia\CLI\CLI; use Utopia\CLI\Console; +use Appwrite\Database\Database; +use Appwrite\Database\Document; +use Appwrite\Database\Validator\Authorization; $cli = new CLI(); $db = $register->get('db'); diff --git a/app/views/console/users/index.phtml b/app/views/console/users/index.phtml index 62febcc212..38643da6c0 100644 --- a/app/views/console/users/index.phtml +++ b/app/views/console/users/index.phtml @@ -124,7 +124,7 @@ $providers = $this->getParam('providers', []); Unverified - + Blocked diff --git a/app/views/console/users/view.phtml b/app/views/console/users/view.phtml index 6bdd63b844..b428300d88 100644 --- a/app/views/console/users/view.phtml +++ b/app/views/console/users/view.phtml @@ -20,7 +20,7 @@
  • General

    - -
    +
    - +
    -
    +
    - +
    diff --git a/app/workers/certificates.php b/app/workers/certificates.php index 038b63a3d9..c087a59e34 100644 --- a/app/workers/certificates.php +++ b/app/workers/certificates.php @@ -1,11 +1,10 @@ assertEquals(get_class(Storage::getDevice('disk-a')), 'Storage\Devices\Local'); - $this->assertEquals(get_class(Storage::getDevice('disk-b')), 'Storage\Devices\Local'); + $this->assertEquals(get_class(Storage::getDevice('disk-a')), 'Appwrite\Storage\Devices\Local'); + $this->assertEquals(get_class(Storage::getDevice('disk-b')), 'Appwrite\Storage\Devices\Local'); try { get_class(Storage::getDevice('disk-c')); diff --git a/tests/unit/Storage/Validators/FileNameTest.php b/tests/unit/Storage/Validators/FileNameTest.php index c22182ea9f..4e021d6891 100644 --- a/tests/unit/Storage/Validators/FileNameTest.php +++ b/tests/unit/Storage/Validators/FileNameTest.php @@ -2,7 +2,7 @@ namespace Appwrite\Tests; -use Storage\Validators\FileName; +use Appwrite\Storage\Validators\FileName; use PHPUnit\Framework\TestCase; class FileNameTest extends TestCase diff --git a/tests/unit/Storage/Validators/FileSizeTest.php b/tests/unit/Storage/Validators/FileSizeTest.php index c4acd175e9..3ce1235916 100644 --- a/tests/unit/Storage/Validators/FileSizeTest.php +++ b/tests/unit/Storage/Validators/FileSizeTest.php @@ -2,7 +2,7 @@ namespace Appwrite\Tests; -use Storage\Validators\FileSize; +use Appwrite\Storage\Validators\FileSize; use PHPUnit\Framework\TestCase; class FileSizeTest extends TestCase diff --git a/tests/unit/Storage/Validators/FileTypeTest.php b/tests/unit/Storage/Validators/FileTypeTest.php index a6cb115aaf..c913baab08 100644 --- a/tests/unit/Storage/Validators/FileTypeTest.php +++ b/tests/unit/Storage/Validators/FileTypeTest.php @@ -2,7 +2,7 @@ namespace Appwrite\Tests; -use Storage\Validators\FileType; +use Appwrite\Storage\Validators\FileType; use PHPUnit\Framework\TestCase; class FileTypeTest extends TestCase diff --git a/tests/unit/Storage/Validators/UploadTest.php b/tests/unit/Storage/Validators/UploadTest.php index 19c14f0d44..50644b66fe 100644 --- a/tests/unit/Storage/Validators/UploadTest.php +++ b/tests/unit/Storage/Validators/UploadTest.php @@ -2,7 +2,7 @@ namespace Appwrite\Tests; -use Storage\Validators\Upload; +use Appwrite\Storage\Validators\Upload; use PHPUnit\Framework\TestCase; class UploadTest extends TestCase diff --git a/tests/unit/Task/Validator/CronTest.php b/tests/unit/Task/Validator/CronTest.php index eed1f9d01e..2813ebab0e 100644 --- a/tests/unit/Task/Validator/CronTest.php +++ b/tests/unit/Task/Validator/CronTest.php @@ -2,7 +2,7 @@ namespace Appwrite\Tests; -use Task\Validator\Cron; +use Appwrite\Task\Validator\Cron; use PHPUnit\Framework\TestCase; class CronTest extends TestCase diff --git a/tests/unit/Template/TemplateTest.php b/tests/unit/Template/TemplateTest.php index 29d6cb507d..b09fe67b2e 100644 --- a/tests/unit/Template/TemplateTest.php +++ b/tests/unit/Template/TemplateTest.php @@ -2,7 +2,7 @@ namespace Appwrite\Tests; -use Template\Template; +use Appwrite\Template\Template; use PHPUnit\Framework\TestCase; class TemplateTest extends TestCase