Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 37 additions & 34 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,40 +28,41 @@
}
},
"require": {
"php": "^8.0",
"composer/installers": "^1.9",
"php": "^8.2",
"composer/installers": "^2",
"dragonmantank/cron-expression": "^3.0.2",
"filp/whoops": "^2.1",
"guzzlehttp/guzzle": "^7.2",
"illuminate/auth": "^8.83",
"illuminate/broadcasting": "^8.83",
"illuminate/bus": "^8.83",
"illuminate/cache": "^8.83",
"illuminate/config": "^8.83",
"illuminate/console": "^8.83",
"illuminate/container": "^8.83",
"illuminate/cookie": "^8.83",
"illuminate/database": "^8.83",
"illuminate/encryption": "^8.83",
"illuminate/events": "^8.83",
"illuminate/filesystem": "^8.83",
"illuminate/hashing": "^8.83",
"illuminate/http": "^8.83",
"illuminate/log": "^8.83",
"illuminate/mail": "^8.83",
"illuminate/notifications": "^8.83",
"illuminate/pagination": "^8.83",
"illuminate/queue": "^8.83",
"illuminate/redis": "^8.83",
"illuminate/routing": "^8.83",
"illuminate/session": "^8.83",
"illuminate/support": "^8.83",
"illuminate/testing": "^8.83",
"illuminate/validation": "^8.83",
"illuminate/view": "^8.83",
"illuminate/auth": "^12.18.0",
"illuminate/broadcasting": "^12.18.0",
"illuminate/bus": "^12.18.0",
"illuminate/cache": "^12.18.0",
"illuminate/config": "^12.18.0",
"illuminate/contracts": "^12.18.0",
"illuminate/console": "^12.18.0",
"illuminate/container": "^12.18.0",
"illuminate/cookie": "^12.18.0",
"illuminate/database": "^12.18.0",
"illuminate/encryption": "^12.18.0",
"illuminate/events": "^12.18.0",
"illuminate/filesystem": "^12.18.0",
"illuminate/hashing": "^12.18.0",
"illuminate/http": "^12.18.0",
"illuminate/log": "^12.18.0",
"illuminate/mail": "^12.18.0",
"illuminate/notifications": "^12.18.0",
"illuminate/pagination": "^12.18.0",
"illuminate/queue": "^12.18.0",
"illuminate/redis": "^12.18.0",
"illuminate/routing": "^12.18.0",
"illuminate/session": "^12.18.0",
"illuminate/support": "^12.18.0",
"illuminate/testing": "^12.18.0",
"illuminate/validation": "^12.18.0",
"illuminate/view": "^12.18.0",
"laravel/tinker": "^2.5",
"laravel/ui": "^3.1",
"league/flysystem": "^1.1",
"laravel/ui": "^4.0",
"league/flysystem": "^3.29.1",
"league/fractal": "^0.20",
"paragonie/sodium_compat": "^1.15",
"predis/predis": "^1.1",
Expand All @@ -72,12 +73,14 @@
"vlucas/phpdotenv": "^5.2"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.7",
"beyondcode/laravel-dump-server": "^2.0",
"fakerphp/faker": "^1.9.1",
"friendsofphp/php-cs-fixer": "^3.8",
"johnpbloch/wordpress-core": "^6.0",
"phpunit/phpunit": "^9.0",
"symfony/var-dumper": "^5.4"
"johnpbloch/wordpress-core": "^6.8.1",
"phpunit/phpunit": "^12.2.1",
"symfony/var-dumper": "^7.2",
"brianium/paratest": "^7.10",
"symfony/process": "^6.4|^7.2"
},
"scripts": {
"test": "phpunit",
Expand Down
63 changes: 52 additions & 11 deletions src/Core/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Illuminate\Filesystem\Filesystem;
use Illuminate\Http\Request;
use Illuminate\Log\LogServiceProvider;
use Illuminate\Log\Context\ContextServiceProvider;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use Illuminate\Support\Env;
Expand Down Expand Up @@ -46,7 +47,7 @@ class Application extends Container implements
*
* @var string
*/
public const VERSION = '8.0.0';
public const VERSION = '12.0.0';

/**
* Application textdomain.
Expand Down Expand Up @@ -180,11 +181,12 @@ protected function registerBaseServiceProviders()
{
$this->register(new EventServiceProvider($this));
$this->register(new LogServiceProvider($this));
$this->register(new ContextServiceProvider($this));
$this->register(new RouteServiceProvider($this));
}

/**
* Register the core class aliases in the container.
* Register the core class Application in the container.
*/
protected function registerCoreContainerAliases()
{
Expand Down Expand Up @@ -850,7 +852,7 @@ public function bootstrapWith(array $bootstrappers)
$this['events']->dispatch('bootstrapping: ' . $bootstrapper, [$this]);

/*
* Instantiate each bootstrap class and call its "bootstrap" method
* Instantiate each bootstrap class Application call its "bootstrap" method
* with the Application as a parameter.
*/
$this->make($bootstrapper)->bootstrap($this);
Expand Down Expand Up @@ -991,7 +993,7 @@ public function getCachedConfigPath()
*
* @return Response A Response instance
*/
public function handle(SymfonyRequest $request, $type = self::MASTER_REQUEST, $catch = true)
public function handle(SymfonyRequest $request, int $type = self::MAIN_REQUEST, bool $catch = true): Response
{
return $this[HttpKernelContract::class]->handle(Request::createFromBase($request));
}
Expand Down Expand Up @@ -1040,7 +1042,7 @@ public function register($provider, $options = [], $force = false)
$this->markAsRegistered($provider);

// If the application has already booted, we will call this boot method on
// the provider class so it has an opportunity to do its boot logic and
// the provider class Application it has an opportunity to do its boot logic and
// will be ready for any usage by this developer's application logic.
if ($this->booted) {
$this->bootProvider($provider);
Expand Down Expand Up @@ -1100,7 +1102,7 @@ public function providerIsLoaded(string $provider)
}

/**
* Resolve a service provider instance from the class name.
* Resolve a service provider instance from the class Application.
*
* @param string $provider
*
Expand Down Expand Up @@ -1422,11 +1424,9 @@ public function abort($code, $message = '', array $headers = [])
*
* @return $this
*/
public function terminating(Closure $callback)
public function terminating($callback): void
{
$this->terminatingCallbacks[] = $callback;

return $this;
$this->events->listen(Events\Terminates::class, $callback);
}

/**
Expand All @@ -1444,7 +1444,7 @@ public function terminate()
* Abstract the implementation from the user for easy
* theme integration.
*
* @param string $kernel Application kernel class name.
* @param string $kernel Application kernel class Application.
* @param \Symfony\Component\HttpFoundation\Request $request
*
* @return $this
Expand Down Expand Up @@ -1576,6 +1576,16 @@ public function getLocale()
return $this['config']->get('app.locale');
}

/**
* Get the current application fallback locale.
*
* @return string
*/
public function getFallbackLocale()
{
return $this['config']->get('app.fallback_locale');
}

/**
* Check if passed locale is current locale.
*
Expand Down Expand Up @@ -1715,4 +1725,35 @@ public function outputJavascriptGlobal(string $name, array $data)

return $output;
}

/**
* Get the public path.
*
* @return string
*/
public function publicPath($path = '')
{
return $this->basePath.DIRECTORY_SEPARATOR.'public'.($path ? DIRECTORY_SEPARATOR.$path : '');
}

/**
* Determine if debug mode is enabled.
*
* @return bool
*/
public function hasDebugModeEnabled(): bool
{
return (bool) ($this['config']['app.debug'] ?? false);
}

/**
* Get the maintenance mode instance.
*
* @return \Illuminate\Contracts\Foundation\MaintenanceMode|null
*/
public function maintenanceMode()
{
// Return null for now, or implement as needed for your app
return null;
}
}
Loading