diff --git a/flexiapi/app/Http/Kernel.php b/flexiapi/app/Http/Kernel.php deleted file mode 100644 index 4b9a831..0000000 --- a/flexiapi/app/Http/Kernel.php +++ /dev/null @@ -1,117 +0,0 @@ -. -*/ - -namespace App\Http; - -use Illuminate\Foundation\Http\Kernel as HttpKernel; - -class Kernel extends HttpKernel -{ - /** - * The application's global HTTP middleware stack. - * - * These middleware are run during every request to your application. - * - * @var array - */ - protected $middleware = [ - \App\Http\Middleware\TrustProxies::class, - \App\Http\Middleware\CheckForMaintenanceMode::class, - \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, - \App\Http\Middleware\TrimStrings::class, - \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class - ]; - - /** - * The application's route middleware groups. - * - * @var array - */ - protected $middlewareGroups = [ - 'web' => [ - \App\Http\Middleware\EncryptCookies::class, - \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, - \Illuminate\Session\Middleware\StartSession::class, - \Illuminate\View\Middleware\ShareErrorsFromSession::class, - \App\Http\Middleware\VerifyCsrfToken::class, - \Illuminate\Routing\Middleware\SubstituteBindings::class, - \App\Http\Middleware\Localization::class, - 'space.check' - ], - - 'api' => [ - 'throttle:600,1', // move to 600 instead of 60 - 'bindings', - 'validate_json', - 'localization', - 'space.check' - ], - ]; - - /** - * The application's route middleware. - * - * These middleware may be assigned to groups or used individually. - * - * @var array - */ - protected $middlewareAliases = [ - 'auth.admin' => \App\Http\Middleware\AuthenticateAdmin::class, - 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, - 'auth.check_blocked' => \App\Http\Middleware\CheckBlocked::class, - 'auth.digest_or_key' => \App\Http\Middleware\AuthenticateDigestOrKey::class, - 'auth.jwt' => \App\Http\Middleware\AuthenticateJWT::class, - 'auth.super_admin' => \App\Http\Middleware\AuthenticateSuperAdmin::class, - 'auth' => \App\Http\Middleware\Authenticate::class, - 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, - 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, - 'can' => \Illuminate\Auth\Middleware\Authorize::class, - 'cookie.encrypt' => \App\Http\Middleware\EncryptCookies::class, - 'cookie' => \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, - 'feature.carddav_user_credentials' => \App\Http\Middleware\IsCardDavCredentialsEnabled::class, - 'feature.intercom' => \App\Http\Middleware\IsIntercomFeatures::class, - 'feature.phone_registration' => \App\Http\Middleware\IsPhoneRegistration::class, - 'feature.public_registration' => \App\Http\Middleware\IsPublicRegistration::class, - 'feature.web_panel_enabled' => \App\Http\Middleware\IsWebPanelEnabled::class, - 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, - 'localization' => \App\Http\Middleware\Localization::class, - 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, - 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, - 'space.check' => \App\Http\Middleware\SpaceCheck::class, - 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, - 'validate_json' => \App\Http\Middleware\ValidateJSON::class, - 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, - ]; - - /** - * The priority-sorted list of middleware. - * - * This forces non-global middleware to always be in the given order. - * - * @var array - */ - protected $middlewarePriority = [ - \Illuminate\Session\Middleware\StartSession::class, - \Illuminate\View\Middleware\ShareErrorsFromSession::class, - \Illuminate\Routing\Middleware\ThrottleRequests::class, - \Illuminate\Session\Middleware\AuthenticateSession::class, - \Illuminate\Routing\Middleware\SubstituteBindings::class, - \Illuminate\Auth\Middleware\Authorize::class, - ]; -} diff --git a/flexiapi/app/Http/Middleware/AuthenticateJWT.php b/flexiapi/app/Http/Middleware/AuthenticateJWT.php index d99d24d..b1eb0fb 100644 --- a/flexiapi/app/Http/Middleware/AuthenticateJWT.php +++ b/flexiapi/app/Http/Middleware/AuthenticateJWT.php @@ -81,13 +81,13 @@ class AuthenticateJWT list($username, $domain) = parseSIP($token->claims()->get(config('services.jwt.sip_identifier'))); $account = Account::withoutGlobalScopes() - ->where('username', $username) - ->where('domain', $domain) - ->first(); + ->where('username', $username) + ->where('domain', $domain) + ->first(); } elseif ($token->claims()->has('email')) { $account = Account::withoutGlobalScopes() - ->where('email', $token->claims()->get('email')) - ->first(); + ->where('email', $token->claims()->get('email')) + ->first(); } if (!$account) { @@ -99,8 +99,7 @@ class AuthenticateJWT return $next($request); } - if ( - !empty(config('app.account_authentication_bearer')) + if (!empty(config('app.account_authentication_bearer')) // Bypass the JWT auth if we have an API Key && !$request->header('x-api-key') && !$request->cookie('x-api-key') @@ -130,7 +129,7 @@ class AuthenticateJWT $response = new Response(); $response->header( 'WWW-Authenticate', - $bearer . 'error="' . $error . '", error_description="'. $description . '"' + $bearer . 'error="' . $error . '", error_description="' . $description . '"' ); $response->setStatusCode(401); diff --git a/flexiapi/app/Http/Middleware/CheckForMaintenanceMode.php b/flexiapi/app/Http/Middleware/CheckForMaintenanceMode.php deleted file mode 100644 index 35b9824..0000000 --- a/flexiapi/app/Http/Middleware/CheckForMaintenanceMode.php +++ /dev/null @@ -1,17 +0,0 @@ -host())->first(); if ($space != null) { if (!str_ends_with($space->host, config('app.root_host'))) { - return abort(503, 'The APP_ROOT_HOST configured does not match with the current root domain'); + abort(503, 'The APP_ROOT_HOST configured does not match with the current root domain'); } $request->merge(['space' => $space]); @@ -53,6 +53,6 @@ class SpaceCheck return $next($request); } - return abort(404, 'Host not configured'); + abort(404, 'Host not configured'); } } diff --git a/flexiapi/app/Http/Middleware/TrimStrings.php b/flexiapi/app/Http/Middleware/TrimStrings.php deleted file mode 100644 index 5a50e7b..0000000 --- a/flexiapi/app/Http/Middleware/TrimStrings.php +++ /dev/null @@ -1,18 +0,0 @@ -handleCommand(new ArgvInput); -$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class); - -$status = $kernel->handle( - $input = new Symfony\Component\Console\Input\ArgvInput, - new Symfony\Component\Console\Output\ConsoleOutput -); - -/* -|-------------------------------------------------------------------------- -| Shutdown The Application -|-------------------------------------------------------------------------- -| -| Once Artisan has finished running, we will fire off the shutdown events -| so that any final work may be done by the application before we shut -| down the process. This is the last thing to happen to the request. -| -*/ - -$kernel->terminate($input, $status); - -exit($status); +exit($status); \ No newline at end of file diff --git a/flexiapi/bootstrap/app.php b/flexiapi/bootstrap/app.php index 037e17d..a54a744 100644 --- a/flexiapi/bootstrap/app.php +++ b/flexiapi/bootstrap/app.php @@ -1,55 +1,50 @@ withRouting( + web: __DIR__ . '/../routes/web.php', + commands: __DIR__ . '/../routes/console.php', + health: '/up', + ) + ->withMiddleware(function (Middleware $middleware) { + $middleware->append(SpaceCheck::class); + $middleware->append(Localization::class); + $middleware->api(append: [ValidateJSON::class]); -/* -|-------------------------------------------------------------------------- -| Bind Important Interfaces -|-------------------------------------------------------------------------- -| -| Next, we need to bind some important interfaces into the container so -| we will be able to resolve them when needed. The kernels serve the -| incoming requests to this application from both the web and CLI. -| -*/ + $middleware->alias([ + 'auth.admin' => AuthenticateAdmin::class, + 'auth.check_blocked' => CheckBlocked::class, + 'auth.digest_or_key' => AuthenticateDigestOrKey::class, + 'auth.jwt' => AuthenticateJWT::class, + 'auth.super_admin' => AuthenticateSuperAdmin::class, + 'auth' => Authenticate::class, + 'feature.carddav_user_credentials' => IsCardDavCredentialsEnabled::class, + 'feature.intercom' => IsIntercomFeatures::class, + 'feature.phone_registration' => IsPhoneRegistration::class, + 'feature.public_registration' => IsPublicRegistration::class, + 'feature.web_panel_enabled' => IsWebPanelEnabled::class, + ]); + }) + ->withExceptions(function (Exceptions $exceptions) { + // + })->create(); -$app->singleton( - Illuminate\Contracts\Http\Kernel::class, - App\Http\Kernel::class -); -$app->singleton( - Illuminate\Contracts\Console\Kernel::class, - App\Console\Kernel::class -); - -$app->singleton( - Illuminate\Contracts\Debug\ExceptionHandler::class, - App\Exceptions\Handler::class -); - -/* -|-------------------------------------------------------------------------- -| Return The Application -|-------------------------------------------------------------------------- -| -| This script returns the application instance. The instance is given to -| the calling script so we can separate the building of the instances -| from the actual running of the application and sending responses. -| -*/ - -return $app; diff --git a/flexiapi/composer.lock b/flexiapi/composer.lock index 0952622..b59510a 100644 --- a/flexiapi/composer.lock +++ b/flexiapi/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "awobaz/compoships", - "version": "2.4.1", + "version": "2.5.1", "source": { "type": "git", "url": "https://github.com/topclaudy/compoships.git", - "reference": "49ef79d912201c8649651d63b5682afae092502e" + "reference": "d8de30b57949d6021bb0312105f6d9d0920266b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/topclaudy/compoships/zipball/49ef79d912201c8649651d63b5682afae092502e", - "reference": "49ef79d912201c8649651d63b5682afae092502e", + "url": "https://api.github.com/repos/topclaudy/compoships/zipball/d8de30b57949d6021bb0312105f6d9d0920266b6", + "reference": "d8de30b57949d6021bb0312105f6d9d0920266b6", "shasum": "" }, "require": { @@ -26,7 +26,7 @@ "require-dev": { "ext-sqlite3": "*", "fakerphp/faker": "^1.18", - "phpunit/phpunit": "^6.0|^8.0|^9.0|^10.0|^11.0" + "phpunit/phpunit": "^6.0|^8.0|^9.0|^10.0|^11.0|^12.0" }, "suggest": { "awobaz/blade-active": "Blade directives for the Laravel 'Active' package", @@ -58,7 +58,7 @@ ], "support": { "issues": "https://github.com/topclaudy/compoships/issues", - "source": "https://github.com/topclaudy/compoships/tree/2.4.1" + "source": "https://github.com/topclaudy/compoships/tree/2.5.1" }, "funding": [ { @@ -66,7 +66,7 @@ "type": "custom" } ], - "time": "2025-02-24T15:12:08+00:00" + "time": "2025-10-10T14:07:12+00:00" }, { "name": "bacon/bacon-qr-code", @@ -378,16 +378,16 @@ }, { "name": "doctrine/dbal", - "version": "3.10.2", + "version": "3.10.3", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "c6c16cf787eaba3112203dfcd715fa2059c62282" + "reference": "65edaca19a752730f290ec2fb89d593cb40afb43" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/c6c16cf787eaba3112203dfcd715fa2059c62282", - "reference": "c6c16cf787eaba3112203dfcd715fa2059c62282", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/65edaca19a752730f290ec2fb89d593cb40afb43", + "reference": "65edaca19a752730f290ec2fb89d593cb40afb43", "shasum": "" }, "require": { @@ -403,14 +403,14 @@ }, "require-dev": { "doctrine/cache": "^1.11|^2.0", - "doctrine/coding-standard": "13.0.1", + "doctrine/coding-standard": "14.0.0", "fig/log-test": "^1", "jetbrains/phpstorm-stubs": "2023.1", - "phpstan/phpstan": "2.1.22", + "phpstan/phpstan": "2.1.30", "phpstan/phpstan-strict-rules": "^2", - "phpunit/phpunit": "9.6.23", - "slevomat/coding-standard": "8.16.2", - "squizlabs/php_codesniffer": "3.13.1", + "phpunit/phpunit": "9.6.29", + "slevomat/coding-standard": "8.24.0", + "squizlabs/php_codesniffer": "4.0.0", "symfony/cache": "^5.4|^6.0|^7.0", "symfony/console": "^4.4|^5.4|^6.0|^7.0" }, @@ -472,7 +472,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.10.2" + "source": "https://github.com/doctrine/dbal/tree/3.10.3" }, "funding": [ { @@ -488,7 +488,7 @@ "type": "tidelift" } ], - "time": "2025-09-04T23:51:27+00:00" + "time": "2025-10-09T09:05:12+00:00" }, { "name": "doctrine/deprecations", @@ -798,29 +798,28 @@ }, { "name": "dragonmantank/cron-expression", - "version": "v3.4.0", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "8c784d071debd117328803d86b2097615b457500" + "reference": "d61a8a9604ec1f8c3d150d09db6ce98b32675013" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/8c784d071debd117328803d86b2097615b457500", - "reference": "8c784d071debd117328803d86b2097615b457500", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/d61a8a9604ec1f8c3d150d09db6ce98b32675013", + "reference": "d61a8a9604ec1f8c3d150d09db6ce98b32675013", "shasum": "" }, "require": { - "php": "^7.2|^8.0", - "webmozart/assert": "^1.0" + "php": "^8.2|^8.3|^8.4|^8.5" }, "replace": { "mtdowling/cron-expression": "^1.0" }, "require-dev": { - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.0", - "phpunit/phpunit": "^7.0|^8.0|^9.0" + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.32|^2.1.31", + "phpunit/phpunit": "^8.5.48|^9.0" }, "type": "library", "extra": { @@ -851,7 +850,7 @@ ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v3.4.0" + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.6.0" }, "funding": [ { @@ -859,7 +858,7 @@ "type": "github" } ], - "time": "2024-10-09T13:47:03+00:00" + "time": "2025-10-31T18:51:33+00:00" }, { "name": "egulias/email-validator", @@ -1233,16 +1232,16 @@ }, { "name": "giggsey/libphonenumber-for-php-lite", - "version": "9.0.14", + "version": "9.0.18", "source": { "type": "git", "url": "https://github.com/giggsey/libphonenumber-for-php-lite.git", - "reference": "af794cc2ed18edeebadf5ffe08eb6add04275709" + "reference": "e3faa62034db1ad42456a673cd568f99564a95f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/giggsey/libphonenumber-for-php-lite/zipball/af794cc2ed18edeebadf5ffe08eb6add04275709", - "reference": "af794cc2ed18edeebadf5ffe08eb6add04275709", + "url": "https://api.github.com/repos/giggsey/libphonenumber-for-php-lite/zipball/e3faa62034db1ad42456a673cd568f99564a95f7", + "reference": "e3faa62034db1ad42456a673cd568f99564a95f7", "shasum": "" }, "require": { @@ -1307,7 +1306,7 @@ "issues": "https://github.com/giggsey/libphonenumber-for-php-lite/issues", "source": "https://github.com/giggsey/libphonenumber-for-php-lite" }, - "time": "2025-09-16T07:09:25+00:00" + "time": "2025-11-10T15:55:40+00:00" }, { "name": "graham-campbell/result-type", @@ -1784,16 +1783,16 @@ }, { "name": "laravel/framework", - "version": "v11.46.0", + "version": "v11.46.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "2c6d85f22d08123ad45aa3a6726b16f06e68eecd" + "reference": "5fd457f807570a962a53b403b1346efe4cc80bb8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/2c6d85f22d08123ad45aa3a6726b16f06e68eecd", - "reference": "2c6d85f22d08123ad45aa3a6726b16f06e68eecd", + "url": "https://api.github.com/repos/laravel/framework/zipball/5fd457f807570a962a53b403b1346efe4cc80bb8", + "reference": "5fd457f807570a962a53b403b1346efe4cc80bb8", "shasum": "" }, "require": { @@ -1995,20 +1994,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2025-09-08T21:54:34+00:00" + "time": "2025-09-30T14:51:32+00:00" }, { "name": "laravel/prompts", - "version": "v0.3.6", + "version": "v0.3.7", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "86a8b692e8661d0fb308cec64f3d176821323077" + "reference": "a1891d362714bc40c8d23b0b1d7090f022ea27cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/86a8b692e8661d0fb308cec64f3d176821323077", - "reference": "86a8b692e8661d0fb308cec64f3d176821323077", + "url": "https://api.github.com/repos/laravel/prompts/zipball/a1891d362714bc40c8d23b0b1d7090f022ea27cc", + "reference": "a1891d362714bc40c8d23b0b1d7090f022ea27cc", "shasum": "" }, "require": { @@ -2025,8 +2024,8 @@ "illuminate/collections": "^10.0|^11.0|^12.0", "mockery/mockery": "^1.5", "pestphp/pest": "^2.3|^3.4", - "phpstan/phpstan": "^1.11", - "phpstan/phpstan-mockery": "^1.1" + "phpstan/phpstan": "^1.12.28", + "phpstan/phpstan-mockery": "^1.1.3" }, "suggest": { "ext-pcntl": "Required for the spinner to be animated." @@ -2052,22 +2051,22 @@ "description": "Add beautiful and user-friendly forms to your command-line applications.", "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.3.6" + "source": "https://github.com/laravel/prompts/tree/v0.3.7" }, - "time": "2025-07-07T14:17:42+00:00" + "time": "2025-09-19T13:47:56+00:00" }, { "name": "laravel/serializable-closure", - "version": "v2.0.4", + "version": "v2.0.6", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "b352cf0534aa1ae6b4d825d1e762e35d43f8a841" + "reference": "038ce42edee619599a1debb7e81d7b3759492819" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/b352cf0534aa1ae6b4d825d1e762e35d43f8a841", - "reference": "b352cf0534aa1ae6b4d825d1e762e35d43f8a841", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/038ce42edee619599a1debb7e81d7b3759492819", + "reference": "038ce42edee619599a1debb7e81d7b3759492819", "shasum": "" }, "require": { @@ -2115,7 +2114,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2025-03-19T13:51:03+00:00" + "time": "2025-10-09T13:42:30+00:00" }, { "name": "laravel/tinker", @@ -2512,16 +2511,16 @@ }, { "name": "league/flysystem", - "version": "3.30.0", + "version": "3.30.2", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "2203e3151755d874bb2943649dae1eb8533ac93e" + "reference": "5966a8ba23e62bdb518dd9e0e665c2dbd4b5b277" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/2203e3151755d874bb2943649dae1eb8533ac93e", - "reference": "2203e3151755d874bb2943649dae1eb8533ac93e", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/5966a8ba23e62bdb518dd9e0e665c2dbd4b5b277", + "reference": "5966a8ba23e62bdb518dd9e0e665c2dbd4b5b277", "shasum": "" }, "require": { @@ -2589,22 +2588,22 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.30.0" + "source": "https://github.com/thephpleague/flysystem/tree/3.30.2" }, - "time": "2025-06-25T13:29:59+00:00" + "time": "2025-11-10T17:13:11+00:00" }, { "name": "league/flysystem-local", - "version": "3.30.0", + "version": "3.30.2", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem-local.git", - "reference": "6691915f77c7fb69adfb87dcd550052dc184ee10" + "reference": "ab4f9d0d672f601b102936aa728801dd1a11968d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/6691915f77c7fb69adfb87dcd550052dc184ee10", - "reference": "6691915f77c7fb69adfb87dcd550052dc184ee10", + "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/ab4f9d0d672f601b102936aa728801dd1a11968d", + "reference": "ab4f9d0d672f601b102936aa728801dd1a11968d", "shasum": "" }, "require": { @@ -2638,9 +2637,9 @@ "local" ], "support": { - "source": "https://github.com/thephpleague/flysystem-local/tree/3.30.0" + "source": "https://github.com/thephpleague/flysystem-local/tree/3.30.2" }, - "time": "2025-05-21T10:34:19+00:00" + "time": "2025-11-10T11:23:37+00:00" }, { "name": "league/mime-type-detection", @@ -3268,25 +3267,25 @@ }, { "name": "nette/schema", - "version": "v1.3.2", + "version": "v1.3.3", "source": { "type": "git", "url": "https://github.com/nette/schema.git", - "reference": "da801d52f0354f70a638673c4a0f04e16529431d" + "reference": "2befc2f42d7c715fd9d95efc31b1081e5d765004" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/schema/zipball/da801d52f0354f70a638673c4a0f04e16529431d", - "reference": "da801d52f0354f70a638673c4a0f04e16529431d", + "url": "https://api.github.com/repos/nette/schema/zipball/2befc2f42d7c715fd9d95efc31b1081e5d765004", + "reference": "2befc2f42d7c715fd9d95efc31b1081e5d765004", "shasum": "" }, "require": { "nette/utils": "^4.0", - "php": "8.1 - 8.4" + "php": "8.1 - 8.5" }, "require-dev": { "nette/tester": "^2.5.2", - "phpstan/phpstan-nette": "^1.0", + "phpstan/phpstan-nette": "^2.0@stable", "tracy/tracy": "^2.8" }, "type": "library", @@ -3296,6 +3295,9 @@ } }, "autoload": { + "psr-4": { + "Nette\\": "src" + }, "classmap": [ "src/" ] @@ -3324,9 +3326,9 @@ ], "support": { "issues": "https://github.com/nette/schema/issues", - "source": "https://github.com/nette/schema/tree/v1.3.2" + "source": "https://github.com/nette/schema/tree/v1.3.3" }, - "time": "2024-10-06T23:10:23+00:00" + "time": "2025-10-30T22:57:59+00:00" }, { "name": "nette/utils", @@ -3419,16 +3421,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.6.1", + "version": "v5.6.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2" + "reference": "3a454ca033b9e06b63282ce19562e892747449bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", - "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/3a454ca033b9e06b63282ce19562e892747449bb", + "reference": "3a454ca033b9e06b63282ce19562e892747449bb", "shasum": "" }, "require": { @@ -3471,37 +3473,37 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.2" }, - "time": "2025-08-13T20:13:15+00:00" + "time": "2025-10-21T19:32:17+00:00" }, { "name": "nunomaduro/termwind", - "version": "v2.3.1", + "version": "v2.3.2", "source": { "type": "git", "url": "https://github.com/nunomaduro/termwind.git", - "reference": "dfa08f390e509967a15c22493dc0bac5733d9123" + "reference": "eb61920a53057a7debd718a5b89c2178032b52c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/dfa08f390e509967a15c22493dc0bac5733d9123", - "reference": "dfa08f390e509967a15c22493dc0bac5733d9123", + "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/eb61920a53057a7debd718a5b89c2178032b52c0", + "reference": "eb61920a53057a7debd718a5b89c2178032b52c0", "shasum": "" }, "require": { "ext-mbstring": "*", "php": "^8.2", - "symfony/console": "^7.2.6" + "symfony/console": "^7.3.4" }, "require-dev": { - "illuminate/console": "^11.44.7", - "laravel/pint": "^1.22.0", + "illuminate/console": "^11.46.1", + "laravel/pint": "^1.25.1", "mockery/mockery": "^1.6.12", - "pestphp/pest": "^2.36.0 || ^3.8.2", - "phpstan/phpstan": "^1.12.25", + "pestphp/pest": "^2.36.0 || ^3.8.4", + "phpstan/phpstan": "^1.12.32", "phpstan/phpstan-strict-rules": "^1.6.2", - "symfony/var-dumper": "^7.2.6", + "symfony/var-dumper": "^7.3.4", "thecodingmachine/phpstan-strict-rules": "^1.0.0" }, "type": "library", @@ -3544,7 +3546,7 @@ ], "support": { "issues": "https://github.com/nunomaduro/termwind/issues", - "source": "https://github.com/nunomaduro/termwind/tree/v2.3.1" + "source": "https://github.com/nunomaduro/termwind/tree/v2.3.2" }, "funding": [ { @@ -3560,7 +3562,7 @@ "type": "github" } ], - "time": "2025-05-08T08:14:37+00:00" + "time": "2025-10-18T11:10:27+00:00" }, { "name": "ovh/ovh", @@ -4191,16 +4193,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.55", + "version": "10.5.58", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "4b2d546b336876bd9562f24641b08a25335b06b6" + "reference": "e24fb46da450d8e6a5788670513c1af1424f16ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4b2d546b336876bd9562f24641b08a25335b06b6", - "reference": "4b2d546b336876bd9562f24641b08a25335b06b6", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e24fb46da450d8e6a5788670513c1af1424f16ca", + "reference": "e24fb46da450d8e6a5788670513c1af1424f16ca", "shasum": "" }, "require": { @@ -4224,7 +4226,7 @@ "sebastian/comparator": "^5.0.4", "sebastian/diff": "^5.1.1", "sebastian/environment": "^6.1.0", - "sebastian/exporter": "^5.1.2", + "sebastian/exporter": "^5.1.4", "sebastian/global-state": "^6.0.2", "sebastian/object-enumerator": "^5.0.0", "sebastian/recursion-context": "^5.0.1", @@ -4272,7 +4274,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.55" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.58" }, "funding": [ { @@ -4296,7 +4298,7 @@ "type": "tidelift" } ], - "time": "2025-09-14T06:19:20+00:00" + "time": "2025-09-28T12:04:46+00:00" }, { "name": "propaganistas/laravel-phone", @@ -4832,16 +4834,16 @@ }, { "name": "psy/psysh", - "version": "v0.12.10", + "version": "v0.12.14", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "6e80abe6f2257121f1eb9a4c55bf29d921025b22" + "reference": "95c29b3756a23855a30566b745d218bee690bef2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/6e80abe6f2257121f1eb9a4c55bf29d921025b22", - "reference": "6e80abe6f2257121f1eb9a4c55bf29d921025b22", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/95c29b3756a23855a30566b745d218bee690bef2", + "reference": "95c29b3756a23855a30566b745d218bee690bef2", "shasum": "" }, "require": { @@ -4856,11 +4858,12 @@ "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.2" + "bamarni/composer-bin-plugin": "^1.2", + "composer/class-map-generator": "^1.6" }, "suggest": { + "composer/class-map-generator": "Improved tab completion performance with better class discovery.", "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", - "ext-pdo-sqlite": "The doc command requires SQLite to work.", "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well." }, "bin": [ @@ -4904,9 +4907,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.12.10" + "source": "https://github.com/bobthecow/psysh/tree/v0.12.14" }, - "time": "2025-08-04T12:39:37+00:00" + "time": "2025-10-27T17:15:31+00:00" }, { "name": "ralouphie/getallheaders", @@ -6436,16 +6439,16 @@ }, { "name": "sebastian/exporter", - "version": "5.1.2", + "version": "5.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "955288482d97c19a372d3f31006ab3f37da47adf" + "reference": "0735b90f4da94969541dac1da743446e276defa6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf", - "reference": "955288482d97c19a372d3f31006ab3f37da47adf", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0735b90f4da94969541dac1da743446e276defa6", + "reference": "0735b90f4da94969541dac1da743446e276defa6", "shasum": "" }, "require": { @@ -6454,7 +6457,7 @@ "sebastian/recursion-context": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^10.5" }, "type": "library", "extra": { @@ -6502,15 +6505,27 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2" + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.4" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter", + "type": "tidelift" } ], - "time": "2024-03-02T07:17:12+00:00" + "time": "2025-09-24T06:09:11+00:00" }, { "name": "sebastian/global-state", @@ -7005,16 +7020,16 @@ }, { "name": "symfony/console", - "version": "v7.3.3", + "version": "v7.3.6", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "cb0102a1c5ac3807cf3fdf8bea96007df7fdbea7" + "reference": "c28ad91448f86c5f6d9d2c70f0cf68bf135f252a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/cb0102a1c5ac3807cf3fdf8bea96007df7fdbea7", - "reference": "cb0102a1c5ac3807cf3fdf8bea96007df7fdbea7", + "url": "https://api.github.com/repos/symfony/console/zipball/c28ad91448f86c5f6d9d2c70f0cf68bf135f252a", + "reference": "c28ad91448f86c5f6d9d2c70f0cf68bf135f252a", "shasum": "" }, "require": { @@ -7079,7 +7094,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.3" + "source": "https://github.com/symfony/console/tree/v7.3.6" }, "funding": [ { @@ -7099,20 +7114,20 @@ "type": "tidelift" } ], - "time": "2025-08-25T06:35:40+00:00" + "time": "2025-11-04T01:21:42+00:00" }, { "name": "symfony/css-selector", - "version": "v7.3.0", + "version": "v7.3.6", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "601a5ce9aaad7bf10797e3663faefce9e26c24e2" + "reference": "84321188c4754e64273b46b406081ad9b18e8614" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/601a5ce9aaad7bf10797e3663faefce9e26c24e2", - "reference": "601a5ce9aaad7bf10797e3663faefce9e26c24e2", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/84321188c4754e64273b46b406081ad9b18e8614", + "reference": "84321188c4754e64273b46b406081ad9b18e8614", "shasum": "" }, "require": { @@ -7148,7 +7163,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v7.3.0" + "source": "https://github.com/symfony/css-selector/tree/v7.3.6" }, "funding": [ { @@ -7159,12 +7174,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-25T14:21:43+00:00" + "time": "2025-10-29T17:24:25+00:00" }, { "name": "symfony/deprecation-contracts", @@ -7235,16 +7254,16 @@ }, { "name": "symfony/error-handler", - "version": "v7.3.2", + "version": "v7.3.6", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "0b31a944fcd8759ae294da4d2808cbc53aebd0c3" + "reference": "bbe40bfab84323d99dab491b716ff142410a92a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/0b31a944fcd8759ae294da4d2808cbc53aebd0c3", - "reference": "0b31a944fcd8759ae294da4d2808cbc53aebd0c3", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/bbe40bfab84323d99dab491b716ff142410a92a8", + "reference": "bbe40bfab84323d99dab491b716ff142410a92a8", "shasum": "" }, "require": { @@ -7292,7 +7311,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v7.3.2" + "source": "https://github.com/symfony/error-handler/tree/v7.3.6" }, "funding": [ { @@ -7312,7 +7331,7 @@ "type": "tidelift" } ], - "time": "2025-07-07T08:17:57+00:00" + "time": "2025-10-31T19:12:50+00:00" }, { "name": "symfony/event-dispatcher", @@ -7476,16 +7495,16 @@ }, { "name": "symfony/finder", - "version": "v7.3.2", + "version": "v7.3.5", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe" + "reference": "9f696d2f1e340484b4683f7853b273abff94421f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/2a6614966ba1074fa93dae0bc804227422df4dfe", - "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe", + "url": "https://api.github.com/repos/symfony/finder/zipball/9f696d2f1e340484b4683f7853b273abff94421f", + "reference": "9f696d2f1e340484b4683f7853b273abff94421f", "shasum": "" }, "require": { @@ -7520,7 +7539,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.3.2" + "source": "https://github.com/symfony/finder/tree/v7.3.5" }, "funding": [ { @@ -7540,20 +7559,20 @@ "type": "tidelift" } ], - "time": "2025-07-15T13:41:35+00:00" + "time": "2025-10-15T18:45:57+00:00" }, { "name": "symfony/http-foundation", - "version": "v7.3.3", + "version": "v7.3.6", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "7475561ec27020196c49bb7c4f178d33d7d3dc00" + "reference": "6379e490d6ecfc5c4224ff3a754b90495ecd135c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/7475561ec27020196c49bb7c4f178d33d7d3dc00", - "reference": "7475561ec27020196c49bb7c4f178d33d7d3dc00", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/6379e490d6ecfc5c4224ff3a754b90495ecd135c", + "reference": "6379e490d6ecfc5c4224ff3a754b90495ecd135c", "shasum": "" }, "require": { @@ -7603,7 +7622,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.3.3" + "source": "https://github.com/symfony/http-foundation/tree/v7.3.6" }, "funding": [ { @@ -7623,20 +7642,20 @@ "type": "tidelift" } ], - "time": "2025-08-20T08:04:18+00:00" + "time": "2025-11-06T11:05:57+00:00" }, { "name": "symfony/http-kernel", - "version": "v7.3.3", + "version": "v7.3.6", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "72c304de37e1a1cec6d5d12b81187ebd4850a17b" + "reference": "f9a34dc0196677250e3609c2fac9de9e1551a262" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/72c304de37e1a1cec6d5d12b81187ebd4850a17b", - "reference": "72c304de37e1a1cec6d5d12b81187ebd4850a17b", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/f9a34dc0196677250e3609c2fac9de9e1551a262", + "reference": "f9a34dc0196677250e3609c2fac9de9e1551a262", "shasum": "" }, "require": { @@ -7721,7 +7740,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v7.3.3" + "source": "https://github.com/symfony/http-kernel/tree/v7.3.6" }, "funding": [ { @@ -7741,20 +7760,20 @@ "type": "tidelift" } ], - "time": "2025-08-29T08:23:45+00:00" + "time": "2025-11-06T20:58:12+00:00" }, { "name": "symfony/mailer", - "version": "v7.3.3", + "version": "v7.3.5", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "a32f3f45f1990db8c4341d5122a7d3a381c7e575" + "reference": "fd497c45ba9c10c37864e19466b090dcb60a50ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/a32f3f45f1990db8c4341d5122a7d3a381c7e575", - "reference": "a32f3f45f1990db8c4341d5122a7d3a381c7e575", + "url": "https://api.github.com/repos/symfony/mailer/zipball/fd497c45ba9c10c37864e19466b090dcb60a50ba", + "reference": "fd497c45ba9c10c37864e19466b090dcb60a50ba", "shasum": "" }, "require": { @@ -7805,7 +7824,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v7.3.3" + "source": "https://github.com/symfony/mailer/tree/v7.3.5" }, "funding": [ { @@ -7825,20 +7844,20 @@ "type": "tidelift" } ], - "time": "2025-08-13T11:49:31+00:00" + "time": "2025-10-24T14:27:20+00:00" }, { "name": "symfony/mime", - "version": "v7.3.2", + "version": "v7.3.4", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "e0a0f859148daf1edf6c60b398eb40bfc96697d1" + "reference": "b1b828f69cbaf887fa835a091869e55df91d0e35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/e0a0f859148daf1edf6c60b398eb40bfc96697d1", - "reference": "e0a0f859148daf1edf6c60b398eb40bfc96697d1", + "url": "https://api.github.com/repos/symfony/mime/zipball/b1b828f69cbaf887fa835a091869e55df91d0e35", + "reference": "b1b828f69cbaf887fa835a091869e55df91d0e35", "shasum": "" }, "require": { @@ -7893,7 +7912,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v7.3.2" + "source": "https://github.com/symfony/mime/tree/v7.3.4" }, "funding": [ { @@ -7913,7 +7932,7 @@ "type": "tidelift" } ], - "time": "2025-07-15T13:41:35+00:00" + "time": "2025-09-16T08:38:17+00:00" }, { "name": "symfony/polyfill-ctype", @@ -8586,16 +8605,16 @@ }, { "name": "symfony/process", - "version": "v7.3.3", + "version": "v7.3.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "32241012d521e2e8a9d713adb0812bb773b907f1" + "reference": "f24f8f316367b30810810d4eb30c543d7003ff3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/32241012d521e2e8a9d713adb0812bb773b907f1", - "reference": "32241012d521e2e8a9d713adb0812bb773b907f1", + "url": "https://api.github.com/repos/symfony/process/zipball/f24f8f316367b30810810d4eb30c543d7003ff3b", + "reference": "f24f8f316367b30810810d4eb30c543d7003ff3b", "shasum": "" }, "require": { @@ -8627,7 +8646,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.3.3" + "source": "https://github.com/symfony/process/tree/v7.3.4" }, "funding": [ { @@ -8647,20 +8666,20 @@ "type": "tidelift" } ], - "time": "2025-08-18T09:42:54+00:00" + "time": "2025-09-11T10:12:26+00:00" }, { "name": "symfony/routing", - "version": "v7.3.2", + "version": "v7.3.6", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "7614b8ca5fa89b9cd233e21b627bfc5774f586e4" + "reference": "c97abe725f2a1a858deca629a6488c8fc20c3091" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/7614b8ca5fa89b9cd233e21b627bfc5774f586e4", - "reference": "7614b8ca5fa89b9cd233e21b627bfc5774f586e4", + "url": "https://api.github.com/repos/symfony/routing/zipball/c97abe725f2a1a858deca629a6488c8fc20c3091", + "reference": "c97abe725f2a1a858deca629a6488c8fc20c3091", "shasum": "" }, "require": { @@ -8712,7 +8731,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v7.3.2" + "source": "https://github.com/symfony/routing/tree/v7.3.6" }, "funding": [ { @@ -8732,20 +8751,20 @@ "type": "tidelift" } ], - "time": "2025-07-15T11:36:08+00:00" + "time": "2025-11-05T07:57:47+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.6.0", + "version": "v3.6.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" + "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", - "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43", + "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43", "shasum": "" }, "require": { @@ -8799,7 +8818,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.6.1" }, "funding": [ { @@ -8810,25 +8829,29 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-04-25T09:37:31+00:00" + "time": "2025-07-15T11:30:57+00:00" }, { "name": "symfony/string", - "version": "v7.3.3", + "version": "v7.3.4", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "17a426cce5fd1f0901fefa9b2a490d0038fd3c9c" + "reference": "f96476035142921000338bad71e5247fbc138872" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/17a426cce5fd1f0901fefa9b2a490d0038fd3c9c", - "reference": "17a426cce5fd1f0901fefa9b2a490d0038fd3c9c", + "url": "https://api.github.com/repos/symfony/string/zipball/f96476035142921000338bad71e5247fbc138872", + "reference": "f96476035142921000338bad71e5247fbc138872", "shasum": "" }, "require": { @@ -8843,7 +8866,6 @@ }, "require-dev": { "symfony/emoji": "^7.1", - "symfony/error-handler": "^6.4|^7.0", "symfony/http-client": "^6.4|^7.0", "symfony/intl": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3.0", @@ -8886,7 +8908,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.3.3" + "source": "https://github.com/symfony/string/tree/v7.3.4" }, "funding": [ { @@ -8906,20 +8928,20 @@ "type": "tidelift" } ], - "time": "2025-08-25T06:35:40+00:00" + "time": "2025-09-11T14:36:48+00:00" }, { "name": "symfony/translation", - "version": "v7.3.3", + "version": "v7.3.4", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "e0837b4cbcef63c754d89a4806575cada743a38d" + "reference": "ec25870502d0c7072d086e8ffba1420c85965174" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/e0837b4cbcef63c754d89a4806575cada743a38d", - "reference": "e0837b4cbcef63c754d89a4806575cada743a38d", + "url": "https://api.github.com/repos/symfony/translation/zipball/ec25870502d0c7072d086e8ffba1420c85965174", + "reference": "ec25870502d0c7072d086e8ffba1420c85965174", "shasum": "" }, "require": { @@ -8986,7 +9008,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v7.3.3" + "source": "https://github.com/symfony/translation/tree/v7.3.4" }, "funding": [ { @@ -9006,20 +9028,20 @@ "type": "tidelift" } ], - "time": "2025-08-01T21:02:37+00:00" + "time": "2025-09-07T11:39:36+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.6.0", + "version": "v3.6.1", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "df210c7a2573f1913b2d17cc95f90f53a73d8f7d" + "reference": "65a8bc82080447fae78373aa10f8d13b38338977" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/df210c7a2573f1913b2d17cc95f90f53a73d8f7d", - "reference": "df210c7a2573f1913b2d17cc95f90f53a73d8f7d", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/65a8bc82080447fae78373aa10f8d13b38338977", + "reference": "65a8bc82080447fae78373aa10f8d13b38338977", "shasum": "" }, "require": { @@ -9068,7 +9090,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.6.0" + "source": "https://github.com/symfony/translation-contracts/tree/v3.6.1" }, "funding": [ { @@ -9079,12 +9101,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-27T08:32:26+00:00" + "time": "2025-07-15T13:41:35+00:00" }, { "name": "symfony/uid", @@ -9162,16 +9188,16 @@ }, { "name": "symfony/var-dumper", - "version": "v7.3.3", + "version": "v7.3.5", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "34d8d4c4b9597347306d1ec8eb4e1319b1e6986f" + "reference": "476c4ae17f43a9a36650c69879dcf5b1e6ae724d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/34d8d4c4b9597347306d1ec8eb4e1319b1e6986f", - "reference": "34d8d4c4b9597347306d1ec8eb4e1319b1e6986f", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/476c4ae17f43a9a36650c69879dcf5b1e6ae724d", + "reference": "476c4ae17f43a9a36650c69879dcf5b1e6ae724d", "shasum": "" }, "require": { @@ -9225,7 +9251,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.3.3" + "source": "https://github.com/symfony/var-dumper/tree/v7.3.5" }, "funding": [ { @@ -9245,7 +9271,7 @@ "type": "tidelift" } ], - "time": "2025-08-13T11:49:31+00:00" + "time": "2025-09-27T09:00:46+00:00" }, { "name": "theseer/tokenizer", @@ -9509,64 +9535,6 @@ } ], "time": "2024-11-21T01:49:47+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "php": "^7.2 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" - }, - "time": "2022-06-03T18:03:27+00:00" } ], "packages-dev": [ @@ -10165,16 +10133,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.13.4", + "version": "3.13.5", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "ad545ea9c1b7d270ce0fc9cbfb884161cd706119" + "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/ad545ea9c1b7d270ce0fc9cbfb884161cd706119", - "reference": "ad545ea9c1b7d270ce0fc9cbfb884161cd706119", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0ca86845ce43291e8f5692c7356fccf3bcf02bf4", + "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4", "shasum": "" }, "require": { @@ -10191,11 +10159,6 @@ "bin/phpcs" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" @@ -10245,20 +10208,20 @@ "type": "thanks_dev" } ], - "time": "2025-09-05T05:47:09+00:00" + "time": "2025-11-04T16:30:35+00:00" }, { "name": "symfony/config", - "version": "v7.3.2", + "version": "v7.3.6", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "faef36e271bbeb74a9d733be4b56419b157762e2" + "reference": "9d18eba95655a3152ae4c1d53c6cc34eb4d4a0b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/faef36e271bbeb74a9d733be4b56419b157762e2", - "reference": "faef36e271bbeb74a9d733be4b56419b157762e2", + "url": "https://api.github.com/repos/symfony/config/zipball/9d18eba95655a3152ae4c1d53c6cc34eb4d4a0b7", + "reference": "9d18eba95655a3152ae4c1d53c6cc34eb4d4a0b7", "shasum": "" }, "require": { @@ -10304,7 +10267,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v7.3.2" + "source": "https://github.com/symfony/config/tree/v7.3.6" }, "funding": [ { @@ -10324,20 +10287,20 @@ "type": "tidelift" } ], - "time": "2025-07-26T13:55:06+00:00" + "time": "2025-11-02T08:04:43+00:00" }, { "name": "symfony/dependency-injection", - "version": "v7.3.3", + "version": "v7.3.6", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "ab6c38dad5da9b15b1f7afb2f5c5814112e70261" + "reference": "98af8bb46c56aedd9dd5a7f0414fc72bf2dcfe69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/ab6c38dad5da9b15b1f7afb2f5c5814112e70261", - "reference": "ab6c38dad5da9b15b1f7afb2f5c5814112e70261", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/98af8bb46c56aedd9dd5a7f0414fc72bf2dcfe69", + "reference": "98af8bb46c56aedd9dd5a7f0414fc72bf2dcfe69", "shasum": "" }, "require": { @@ -10388,7 +10351,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v7.3.3" + "source": "https://github.com/symfony/dependency-injection/tree/v7.3.6" }, "funding": [ { @@ -10408,20 +10371,20 @@ "type": "tidelift" } ], - "time": "2025-08-14T09:54:27+00:00" + "time": "2025-10-31T10:11:11+00:00" }, { "name": "symfony/filesystem", - "version": "v7.3.2", + "version": "v7.3.6", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd" + "reference": "e9bcfd7837928ab656276fe00464092cc9e1826a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edcbb768a186b5c3f25d0643159a787d3e63b7fd", - "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/e9bcfd7837928ab656276fe00464092cc9e1826a", + "reference": "e9bcfd7837928ab656276fe00464092cc9e1826a", "shasum": "" }, "require": { @@ -10458,7 +10421,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.3.2" + "source": "https://github.com/symfony/filesystem/tree/v7.3.6" }, "funding": [ { @@ -10478,20 +10441,20 @@ "type": "tidelift" } ], - "time": "2025-07-07T08:17:47+00:00" + "time": "2025-11-05T09:52:27+00:00" }, { "name": "symfony/var-exporter", - "version": "v7.3.3", + "version": "v7.3.4", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "d4dfcd2a822cbedd7612eb6fbd260e46f87b7137" + "reference": "0f020b544a30a7fe8ba972e53ee48a74c0bc87f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/d4dfcd2a822cbedd7612eb6fbd260e46f87b7137", - "reference": "d4dfcd2a822cbedd7612eb6fbd260e46f87b7137", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/0f020b544a30a7fe8ba972e53ee48a74c0bc87f4", + "reference": "0f020b544a30a7fe8ba972e53ee48a74c0bc87f4", "shasum": "" }, "require": { @@ -10539,7 +10502,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v7.3.3" + "source": "https://github.com/symfony/var-exporter/tree/v7.3.4" }, "funding": [ { @@ -10559,7 +10522,7 @@ "type": "tidelift" } ], - "time": "2025-08-18T13:10:53+00:00" + "time": "2025-09-11T10:12:26+00:00" } ], "aliases": [], diff --git a/flexiapi/composer.phar b/flexiapi/composer.phar index ee830d1..7f8a37d 100755 Binary files a/flexiapi/composer.phar and b/flexiapi/composer.phar differ diff --git a/flexiapi/phpcs.xml b/flexiapi/phpcs.xml index 3547cde..66af9fd 100644 --- a/flexiapi/phpcs.xml +++ b/flexiapi/phpcs.xml @@ -97,10 +97,7 @@ */migrations/* */config/* */public/index.php - */Middleware/* - */Console/Kernel.php */Exceptions/Handler.php - */Http/Kernel.php */Providers/* diff --git a/flexiapi/public/index.php b/flexiapi/public/index.php index 4584cbc..5a488cb 100644 --- a/flexiapi/public/index.php +++ b/flexiapi/public/index.php @@ -1,60 +1,20 @@ - */ +use Illuminate\Foundation\Application; +use Illuminate\Http\Request; define('LARAVEL_START', microtime(true)); -/* -|-------------------------------------------------------------------------- -| Register The Auto Loader -|-------------------------------------------------------------------------- -| -| Composer provides a convenient, automatically generated class loader for -| our application. We just need to utilize it! We'll simply require it -| into the script here so that we don't have to worry about manual -| loading any of our classes later on. It feels great to relax. -| -*/ +// Determine if the application is in maintenance mode... +if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) { + require $maintenance; +} +// Register the Composer autoloader... require __DIR__.'/../vendor/autoload.php'; -/* -|-------------------------------------------------------------------------- -| Turn On The Lights -|-------------------------------------------------------------------------- -| -| We need to illuminate PHP development, so let us turn on the lights. -| This bootstraps the framework and gets it ready for use, then it -| will load up this application so that we can run it and send -| the responses back to the browser and delight our users. -| -*/ - +// Bootstrap Laravel and handle the request... +/** @var Application $app */ $app = require_once __DIR__.'/../bootstrap/app.php'; -/* -|-------------------------------------------------------------------------- -| Run The Application -|-------------------------------------------------------------------------- -| -| Once we have the application, we can handle the incoming request -| through the kernel, and send the associated response back to -| the client's browser allowing them to enjoy the creative -| and wonderful application we have prepared for them. -| -*/ - -$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); - -$response = $kernel->handle( - $request = Illuminate\Http\Request::capture() -); - -$response->send(); - -$kernel->terminate($request, $response); +$app->handleRequest(Request::capture()); \ No newline at end of file diff --git a/flexiapi/routes/api.php b/flexiapi/routes/api.php index 5a988ee..c008060 100644 --- a/flexiapi/routes/api.php +++ b/flexiapi/routes/api.php @@ -17,80 +17,98 @@ along with this program. If not, see . */ +use App\Http\Controllers\Api\Account\AccountController; +use App\Http\Controllers\Api\Account\ApiKeyController; +use App\Http\Controllers\Api\Account\AuthTokenController; +use App\Http\Controllers\Api\Account\ContactController; +use App\Http\Controllers\Api\Account\CreationRequestToken; +use App\Http\Controllers\Api\Account\CreationTokenController; +use App\Http\Controllers\Api\Account\DeviceController; +use App\Http\Controllers\Api\Account\EmailController; +use App\Http\Controllers\Api\Account\PasswordController; +use App\Http\Controllers\Api\Account\PhoneController; +use App\Http\Controllers\Api\Account\PushNotificationController; +use App\Http\Controllers\Api\Account\RecoveryTokenController; use App\Http\Controllers\Api\Account\VcardsStorageController; use App\Http\Controllers\Api\Admin\Account\ActionController; use App\Http\Controllers\Api\Admin\Account\CardDavCredentialsController; -use App\Http\Controllers\Api\Admin\Account\ContactController; +use App\Http\Controllers\Api\Admin\Account\ContactController as AdminContactController; +use App\Http\Controllers\Api\Admin\Account\CreationTokenController as AdminCreationTokenController; use App\Http\Controllers\Api\Admin\Account\DictionaryController; use App\Http\Controllers\Api\Admin\Account\TypeController; use App\Http\Controllers\Api\Admin\AccountController as AdminAccountController; use App\Http\Controllers\Api\Admin\ContactsListController; use App\Http\Controllers\Api\Admin\ExternalAccountController; +use App\Http\Controllers\Api\Admin\MessageController; use App\Http\Controllers\Api\Admin\Space\CardDavServerController; use App\Http\Controllers\Api\Admin\Space\EmailServerController; use App\Http\Controllers\Api\Admin\SpaceController; use App\Http\Controllers\Api\Admin\VcardsStorageController as AdminVcardsStorageController; +use App\Http\Controllers\Api\ApiController; +use App\Http\Controllers\Api\PhoneCountryController; +use App\Http\Controllers\Api\PingController; use App\Http\Controllers\Api\StatisticsCallController; use App\Http\Controllers\Api\StatisticsMessageController; +use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse; use Illuminate\Http\Request; -Route::get('/', 'Api\ApiController@documentation')->name('api'); +Route::get('/', [ApiController::class, 'documentation'])->name('api'); Route::middleware('auth:api')->get('/user', function (Request $request) { return $request->user(); }); -Route::get('ping', 'Api\PingController@ping'); +Route::get('ping', [PingController::class, 'ping']); -Route::post('account_creation_request_tokens', 'Api\Account\CreationRequestToken@create'); -Route::post('account_creation_tokens/send-by-push', 'Api\Account\CreationTokenController@sendByPush'); -Route::post('account_creation_tokens/using-account-creation-request-token', 'Api\Account\CreationTokenController@usingAccountRequestToken'); -Route::post('accounts/with-account-creation-token', 'Api\Account\AccountController@store'); -Route::post('account_recovery_tokens/send-by-push', 'Api\Account\RecoveryTokenController@sendByPush'); +Route::post('account_creation_request_tokens', [CreationRequestToken::class, 'create']); +Route::post('account_creation_tokens/send-by-push', [CreationTokenController::class, 'sendByPush']); +Route::post('account_creation_tokens/using-account-creation-request-token', [CreationTokenController::class, 'usingAccountRequestToken']); +Route::post('accounts/with-account-creation-token', [AccountController::class, 'store']); +Route::post('account_recovery_tokens/send-by-push', [RecoveryTokenController::class, 'sendByPush']); -Route::get('accounts/{sip}/info', 'Api\Account\AccountController@info'); +Route::get('accounts/{sip}/info', [AccountController::class, 'info']); -Route::post('accounts/auth_token', 'Api\Account\AuthTokenController@store'); +Route::post('accounts/auth_token', [AuthTokenController::class, 'store']); -Route::get('accounts/me/api_key/{auth_token}', 'Api\Account\ApiKeyController@generateFromToken')->middleware('cookie', 'cookie.encrypt'); +Route::get('accounts/me/api_key/{auth_token}', [ApiKeyController::class, 'generateFromToken'])->middleware(AddQueuedCookiesToResponse::class); -Route::get('phone_countries', 'Api\PhoneCountryController@index'); +Route::get('phone_countries', [PhoneCountryController::class, 'index']); Route::group(['middleware' => ['auth.jwt', 'auth.digest_or_key', 'auth.check_blocked']], function () { - Route::get('accounts/auth_token/{auth_token}/attach', 'Api\Account\AuthTokenController@attach'); - Route::post('account_creation_tokens/consume', 'Api\Account\CreationTokenController@consume'); + Route::get('accounts/auth_token/{auth_token}/attach', [AuthTokenController::class, 'attach']); + Route::post('account_creation_tokens/consume', [CreationTokenController::class, 'consume']); - Route::post('push_notification', 'Api\Account\PushNotificationController@push'); + Route::post('push_notification', [PushNotificationController::class, 'push']); Route::prefix('accounts/me')->group(function () { - Route::get('api_key', 'Api\Account\ApiKeyController@generate')->middleware('cookie', 'cookie.encrypt'); + Route::get('api_key', [ApiKeyController::class, 'generate'])->middleware(AddQueuedCookiesToResponse::class); - Route::get('services/turn', 'Api\Account\AccountController@turnService'); + Route::get('services/turn', [AccountController::class, 'turnService']); - Route::get('/', 'Api\Account\AccountController@show'); - Route::delete('/', 'Api\Account\AccountController@delete'); - Route::get('provision', 'Api\Account\AccountController@provision'); + Route::get('/', [AccountController::class, 'show']); + Route::delete('/', [AccountController::class, 'delete']); + Route::get('provision', [AccountController::class, 'provision']); - Route::post('phone/request', 'Api\Account\PhoneController@requestUpdate'); - Route::post('phone', 'Api\Account\PhoneController@update'); + Route::post('phone/request', [PhoneController::class, 'requestUpdate']); + Route::post('phone', [PhoneController::class, 'update']); - Route::get('devices', 'Api\Account\DeviceController@index'); - Route::delete('devices/{uuid}', 'Api\Account\DeviceController@destroy'); + Route::get('devices', [DeviceController::class, 'index']); + Route::delete('devices/{uuid}', [DeviceController::class, 'destroy']); - Route::post('email/request', 'Api\Account\EmailController@requestUpdate'); - Route::post('email', 'Api\Account\EmailController@update'); + Route::post('email/request', [EmailController::class, 'requestUpdate']); + Route::post('email', [EmailController::class, 'update']); - Route::post('password', 'Api\Account\PasswordController@update'); + Route::post('password', [PasswordController::class, 'update']); - Route::get('contacts/{sip}', 'Api\Account\ContactController@show'); - Route::get('contacts', 'Api\Account\ContactController@index'); + Route::get('contacts/{sip}', [ContactController::class, 'show']); + Route::get('contacts', [ContactController::class, 'index']); Route::apiResource('vcards-storage', VcardsStorageController::class); }); Route::group(['middleware' => ['auth.admin']], function () { if (!empty(config('app.linphone_daemon_unix_pipe'))) { - Route::post('messages', 'Api\Admin\MessageController@send'); + Route::post('messages', [MessageController::class, 'send']); } // Super admin @@ -107,7 +125,7 @@ Route::group(['middleware' => ['auth.jwt', 'auth.digest_or_key', 'auth.check_blo }); // Account creation token - Route::post('account_creation_tokens', 'Api\Admin\Account\CreationTokenController@create'); + Route::post('account_creation_tokens', [AdminCreationTokenController::class, 'create']); // Accounts Route::prefix('accounts')->controller(AdminAccountController::class)->group(function () { @@ -127,8 +145,8 @@ Route::group(['middleware' => ['auth.jwt', 'auth.digest_or_key', 'auth.check_blo Route::get('{sip}/search', 'search'); Route::get('{email}/search-by-email', 'searchByEmail'); - Route::get('{account_id}/devices', 'Api\Admin\DeviceController@index'); - Route::delete('{account_id}/devices/{uuid}', 'Api\Admin\DeviceController@destroy'); + Route::get('{account_id}/devices', [DeviceController::class, 'index']); + Route::delete('{account_id}/devices/{uuid}', [DeviceController::class, 'destroy']); Route::post('{account_id}/types/{type_id}', 'typeAdd'); Route::delete('{account_id}/types/{type_id}', 'typeRemove'); @@ -138,7 +156,7 @@ Route::group(['middleware' => ['auth.jwt', 'auth.digest_or_key', 'auth.check_blo }); // Account contacts - Route::prefix('accounts/{id}/contacts')->controller(ContactController::class)->group(function () { + Route::prefix('accounts/{id}/contacts')->controller(AdminContactController::class)->group(function () { Route::get('/', 'index'); Route::get('{contact_id}', 'show'); Route::post('{contact_id}', 'add'); diff --git a/flexiapi/routes/console.php b/flexiapi/routes/console.php index 75dd0cd..def2870 100644 --- a/flexiapi/routes/console.php +++ b/flexiapi/routes/console.php @@ -1,18 +1,4 @@ comment(Inspiring::quote()); -})->describe('Display an inspiring quote'); +use Illuminate\Support\Facades\Schedule; diff --git a/flexiapi/routes/web.php b/flexiapi/routes/web.php index 88b29e3..41b22e5 100644 --- a/flexiapi/routes/web.php +++ b/flexiapi/routes/web.php @@ -17,8 +17,12 @@ along with this program. If not, see . */ +use App\Http\Controllers\AboutController; use App\Http\Controllers\Account\AccountController; use App\Http\Controllers\Account\ApiKeyController; +use App\Http\Controllers\Account\AuthenticateController; +use App\Http\Controllers\Account\AuthTokenController; +use App\Http\Controllers\Account\ContactVcardController; use App\Http\Controllers\Account\CreationRequestTokenController; use App\Http\Controllers\Account\DeviceController; use App\Http\Controllers\Account\EmailController; @@ -26,6 +30,8 @@ use App\Http\Controllers\Account\PasswordController; use App\Http\Controllers\Account\PhoneController; use App\Http\Controllers\Account\ProvisioningController; use App\Http\Controllers\Account\RecoveryController; +use App\Http\Controllers\Account\RegisterController; +use App\Http\Controllers\Account\VcardsStorageController; use App\Http\Controllers\Admin\AccountController as AdminAccountController; use App\Http\Controllers\Admin\Account\AccountTypeController; use App\Http\Controllers\Admin\Account\ActionController; @@ -51,18 +57,18 @@ use App\Http\Controllers\Admin\StatisticsController; use Illuminate\Support\Facades\Route; Route::redirect('/', 'login')->name('account.home'); -Route::get('about', 'AboutController@about')->name('about'); +Route::get('about', [AboutController::class, 'about'])->name('about'); Route::middleware(['feature.web_panel_enabled'])->group(function () { - Route::get('wizard/{provisioning_token}', 'Account\ProvisioningController@wizard')->name('provisioning.wizard'); + Route::get('wizard/{provisioning_token}', [ProvisioningController::class, 'wizard'])->name('provisioning.wizard'); - Route::get('login', 'Account\AuthenticateController@login')->name('account.login'); - Route::post('authenticate', 'Account\AuthenticateController@authenticate')->name('account.authenticate'); - Route::get('authenticate/qrcode/{token?}', 'Account\AuthenticateController@loginAuthToken')->name('account.authenticate.auth_token'); - Route::get('logout', 'Account\AuthenticateController@logout')->name('account.logout'); + Route::get('login', [AuthenticateController::class, 'login'])->name('account.login'); + Route::post('authenticate', [AuthenticateController::class, 'authenticate'])->name('account.authenticate'); + Route::get('authenticate/qrcode/{token?}', [AuthenticateController::class, 'loginAuthToken'])->name('account.authenticate.auth_token'); + Route::get('logout', [AuthenticateController::class, 'logout'])->name('account.logout'); - Route::get('reset_password/{token}', 'Account\ResetPasswordEmailController@change')->name('account.reset_password_email.change'); - Route::post('reset_password', 'Account\ResetPasswordEmailController@reset')->name('account.reset_password_email.reset'); + Route::get('reset_password/{token}', [ResetPasswordEmailController::class, 'change'])->name('account.reset_password_email.change'); + Route::post('reset_password', [ResetPasswordEmailController::class, 'reset'])->name('account.reset_password_email.reset'); Route::prefix('creation_token')->controller(CreationRequestTokenController::class)->group(function () { Route::get('check/{token}', 'check')->name('account.creation_request_token.check'); @@ -71,15 +77,15 @@ Route::middleware(['feature.web_panel_enabled'])->group(function () { }); Route::group(['middleware' => ['auth.jwt', 'auth.digest_or_key']], function () { - Route::get('provisioning/me', 'Account\ProvisioningController@me')->name('provisioning.me'); + Route::get('provisioning/me', [ProvisioningController::class, 'me'])->name('provisioning.me'); // vCard 4.0 - Route::get('contacts/vcard/{sip}', 'Account\ContactVcardController@show')->name('account.contacts.vcard.show'); - Route::get('contacts/vcard', 'Account\ContactVcardController@index')->name('account.contacts.vcard.index'); + Route::get('contacts/vcard/{sip}', [ContactVcardController::class, 'show'])->name('account.contacts.vcard.show'); + Route::get('contacts/vcard', [ContactVcardController::class, 'index'])->name('account.contacts.vcard.index'); // vCards Storage - Route::get('vcards-storage/{uuid}', 'Account\VcardsStorageController@show')->name('account.vcards-storage.show'); - Route::get('vcards-storage/', 'Account\VcardsStorageController@index')->name('account.vcards-storage.index'); + Route::get('vcards-storage/{uuid}', [VcardsStorageController::class, 'show'])->name('account.vcards-storage.show'); + Route::get('vcards-storage/', [VcardsStorageController::class, 'index'])->name('account.vcards-storage.index'); }); Route::name('provisioning.')->prefix('provisioning')->controller(ProvisioningController::class)->group(function () { @@ -95,11 +101,11 @@ Route::middleware(['feature.web_panel_enabled'])->group(function () { Route::redirect('register', 'register/email')->name('account.register'); Route::middleware(['feature.phone_registration'])->group(function () { - Route::get('register/phone', 'Account\RegisterController@registerPhone')->name('account.register.phone'); + Route::get('register/phone', [RegisterController::class, 'registerPhone'])->name('account.register.phone'); }); - Route::get('register/email', 'Account\RegisterController@registerEmail')->name('account.register.email'); - Route::post('accounts', 'Account\AccountController@store')->name('account.store'); + Route::get('register/email', [RegisterController::class, 'registerEmail'])->name('account.register.email'); + Route::post('accounts', [AccountController::class, 'store'])->name('account.store'); }); Route::prefix('recovery')->controller(RecoveryController::class)->group(function () { @@ -110,7 +116,7 @@ Route::middleware(['feature.web_panel_enabled'])->group(function () { }); Route::name('account.')->middleware(['auth', 'auth.check_blocked'])->group(function () { - Route::get('blocked', 'Account\AccountController@blocked')->name('blocked'); + Route::get('blocked', [AccountController::class, 'blocked'])->name('blocked'); Route::prefix('email')->controller(EmailController::class)->group(function () { Route::get('change', 'change')->name('email.change'); @@ -151,19 +157,19 @@ Route::middleware(['feature.web_panel_enabled'])->group(function () { Route::post('/', 'update')->name('update'); }); - Route::post('auth_tokens', 'Account\AuthTokenController@create')->name('auth_tokens.create'); - Route::get('auth_tokens/auth/external/{token}', 'Account\AuthTokenController@authExternal')->name('auth_tokens.auth.external'); + Route::post('auth_tokens', [AuthTokenController::class, 'create'])->name('auth_tokens.create'); + Route::get('auth_tokens/auth/external/{token}', [AuthTokenController::class, 'authExternal'])->name('auth_tokens.auth.external'); }); - Route::get('auth_tokens/qrcode/{token}', 'Account\AuthTokenController@qrcode')->name('auth_tokens.qrcode'); - Route::get('auth_tokens/auth/{token}', 'Account\AuthTokenController@auth')->name('auth_tokens.auth'); + Route::get('auth_tokens/qrcode/{token}', [AuthTokenController::class, 'qrcode'])->name('auth_tokens.qrcode'); + Route::get('auth_tokens/auth/{token}', [AuthTokenController::class, 'auth'])->name('auth_tokens.auth'); Route::name('admin.')->prefix('admin')->middleware(['auth.admin', 'auth.check_blocked'])->group(function () { Route::name('spaces.')->prefix('spaces')->group(function () { - Route::get('me', 'Admin\SpaceController@me')->name('me'); - Route::get('{space}/configuration', 'Admin\SpaceController@configuration')->name('configuration'); - Route::put('{space}/configuration', 'Admin\SpaceController@configurationUpdate')->name('configuration.update'); - Route::get('{space}/integration', 'Admin\SpaceController@integration')->name('integration'); + Route::get('me', [SpaceController::class, 'me'])->name('me'); + Route::get('{space}/configuration', [SpaceController::class, 'configuration'])->name('configuration'); + Route::put('{space}/configuration', [SpaceController::class, 'configurationUpdate'])->name('configuration.update'); + Route::get('{space}/integration', [SpaceController::class, 'integration'])->name('integration'); Route::name('email.')->prefix('{space}/email')->controller(EmailServerController::class)->group(function () { Route::get('/', 'show')->name('show'); @@ -172,7 +178,7 @@ Route::middleware(['feature.web_panel_enabled'])->group(function () { Route::delete('/', 'destroy')->name('destroy'); }); Route::resource('{space}/carddavs', CardDavServerController::class, ['except' => ['index', 'show']]); - Route::get('{space}/carddavs/{carddav}/delete', 'Admin\Space\CardDavServerController@delete')->name('carddavs.delete'); + Route::get('{space}/carddavs/{carddav}/delete', [CardDavServerController::class, 'delete'])->name('carddavs.delete'); }); Route::name('api_keys.')->prefix('api_keys')->controller(AdminApiKeyController::class)->group(function () { @@ -185,10 +191,10 @@ Route::middleware(['feature.web_panel_enabled'])->group(function () { Route::middleware(['auth.super_admin'])->group(function () { Route::resource('spaces', SpaceController::class); - Route::get('spaces/delete/{id}', 'Admin\SpaceController@delete')->name('spaces.delete'); + Route::get('spaces/delete/{id}', [SpaceController::class, 'delete'])->name('spaces.delete'); - Route::get('spaces/{space}/administration', 'Admin\SpaceController@administration')->name('spaces.administration'); - Route::put('spaces/{space}/administration', 'Admin\SpaceController@administrationUpdate')->name('spaces.administration.update'); + Route::get('spaces/{space}/administration', [SpaceController::class, 'administration'])->name('spaces.administration'); + Route::put('spaces/{space}/administration', [SpaceController::class, 'administrationUpdate'])->name('spaces.administration.update'); Route::name('phone_countries.')->controller(PhoneCountryController::class)->prefix('phone_countries')->group(function () { Route::get('/', 'index')->name('index'); @@ -286,7 +292,7 @@ Route::middleware(['feature.web_panel_enabled'])->group(function () { }); Route::resource('{account}/carddavs', CardDavCredentialsController::class, ['only' => ['create', 'store', 'destroy']]); - Route::get('{account}/carddavs/{carddav}/delete', 'Admin\Account\CardDavCredentialsController@delete')->name('carddavs.delete'); + Route::get('{account}/carddavs/{carddav}/delete', [CardDavCredentialsController::class, 'delete'])->name('carddavs.delete'); Route::name('dictionary.')->prefix('{account}/dictionary')->controller(DictionaryController::class)->group(function () { Route::get('create', 'create')->name('create'); diff --git a/flexiapi/tests/Feature/ApiAccountCreationTokenTest.php b/flexiapi/tests/Feature/ApiAccountCreationTokenTest.php index 6b1f6e3..87d5bc1 100644 --- a/flexiapi/tests/Feature/ApiAccountCreationTokenTest.php +++ b/flexiapi/tests/Feature/ApiAccountCreationTokenTest.php @@ -43,6 +43,8 @@ class ApiAccountCreationTokenTest extends TestCase public function testInvalidJSON() { + Space::factory()->create(); + $this->call( $this->method, $this->tokenRoute,