diff --git a/composer.json b/composer.json index e830ecddba7b..092eff4266dc 100644 --- a/composer.json +++ b/composer.json @@ -28,30 +28,30 @@ "doctrine/inflector": "^2.0.5", "dragonmantank/cron-expression": "^3.3.2", "egulias/email-validator": "^3.2.1|^4.0", - "fruitcake/php-cors": "^1.2", + "fruitcake/php-cors": "^1.3", "guzzlehttp/uri-template": "^1.0", - "laravel/prompts": "^0.1.9", + "laravel/prompts": "dev-symfony7", "laravel/serializable-closure": "^1.3", "league/commonmark": "^2.2.1", "league/flysystem": "^3.8.0", "monolog/monolog": "^3.0", "nesbot/carbon": "^2.67", - "nunomaduro/termwind": "^1.13", + "nunomaduro/termwind": "^2.0", "psr/container": "^1.1.1|^2.0.1", "psr/log": "^1.0|^2.0|^3.0", "psr/simple-cache": "^1.0|^2.0|^3.0", "ramsey/uuid": "^4.7", - "symfony/console": "^6.3", - "symfony/error-handler": "^6.3", - "symfony/finder": "^6.3", - "symfony/http-foundation": "^6.3", - "symfony/http-kernel": "^6.3", - "symfony/mailer": "^6.3", - "symfony/mime": "^6.3", - "symfony/process": "^6.3", - "symfony/routing": "^6.3", - "symfony/uid": "^6.3", - "symfony/var-dumper": "^6.3", + "symfony/console": "^7.0", + "symfony/error-handler": "^7.0", + "symfony/finder": "^7.0", + "symfony/http-foundation": "^7.0", + "symfony/http-kernel": "^7.0", + "symfony/mailer": "^7.0", + "symfony/mime": "^7.0", + "symfony/process": "^7.0", + "symfony/routing": "^7.0", + "symfony/uid": "^7.0", + "symfony/var-dumper": "^7.0", "tijsverkoyen/css-to-inline-styles": "^2.2.5", "vlucas/phpdotenv": "^5.4.1", "voku/portable-ascii": "^2.0" @@ -109,8 +109,8 @@ "phpstan/phpstan": "^1.4.7", "phpunit/phpunit": "^10.0.7", "predis/predis": "^2.0.2", - "symfony/cache": "^6.3", - "symfony/http-client": "^6.3.4" + "symfony/cache": "^7.0", + "symfony/http-client": "^7.0" }, "provide": { "psr/container-implementation": "1.1|2.0", diff --git a/src/Illuminate/Cache/composer.json b/src/Illuminate/Cache/composer.json index d486a4335f46..ec0d26e18469 100755 --- a/src/Illuminate/Cache/composer.json +++ b/src/Illuminate/Cache/composer.json @@ -40,7 +40,7 @@ "illuminate/database": "Required to use the database cache driver (^11.0).", "illuminate/filesystem": "Required to use the file cache driver (^11.0).", "illuminate/redis": "Required to use the redis cache driver (^11.0).", - "symfony/cache": "Required to use PSR-6 cache bridge (^6.3)." + "symfony/cache": "Required to use PSR-6 cache bridge (^7.0)." }, "config": { "sort-packages": true diff --git a/src/Illuminate/Collections/composer.json b/src/Illuminate/Collections/composer.json index 80671fb4dade..1924032ab915 100644 --- a/src/Illuminate/Collections/composer.json +++ b/src/Illuminate/Collections/composer.json @@ -33,7 +33,7 @@ } }, "suggest": { - "symfony/var-dumper": "Required to use the dump method (^6.3)." + "symfony/var-dumper": "Required to use the dump method (^7.0)." }, "config": { "sort-packages": true diff --git a/src/Illuminate/Console/Application.php b/src/Illuminate/Console/Application.php index 98536ce41eec..f594258e9e76 100755 --- a/src/Illuminate/Console/Application.php +++ b/src/Illuminate/Console/Application.php @@ -206,9 +206,9 @@ public function output() * Add a command to the console. * * @param \Symfony\Component\Console\Command\Command $command - * @return \Symfony\Component\Console\Command\Command + * @return \Symfony\Component\Console\Command\Command|null */ - public function add(SymfonyCommand $command) + public function add(SymfonyCommand $command): ?SymfonyCommand { if ($command instanceof Command) { $command->setLaravel($this->laravel); diff --git a/src/Illuminate/Console/BufferedConsoleOutput.php b/src/Illuminate/Console/BufferedConsoleOutput.php index aa4e6ceedc4e..d4ee3954f393 100644 --- a/src/Illuminate/Console/BufferedConsoleOutput.php +++ b/src/Illuminate/Console/BufferedConsoleOutput.php @@ -27,10 +27,8 @@ public function fetch() /** * {@inheritdoc} - * - * @return void */ - protected function doWrite(string $message, bool $newline) + protected function doWrite(string $message, bool $newline): void { $this->buffer .= $message; diff --git a/src/Illuminate/Console/Command.php b/src/Illuminate/Console/Command.php index 7e1b3a1ff6ed..9e0290ebcc6d 100755 --- a/src/Illuminate/Console/Command.php +++ b/src/Illuminate/Console/Command.php @@ -190,9 +190,8 @@ public function run(InputInterface $input, OutputInterface $output): int * * @param \Symfony\Component\Console\Input\InputInterface $input * @param \Symfony\Component\Console\Output\OutputInterface $output - * @return int */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { if ($this instanceof Isolatable && $this->option('isolated') !== false && ! $this->commandIsolationMutex()->create($this)) { diff --git a/src/Illuminate/Console/OutputStyle.php b/src/Illuminate/Console/OutputStyle.php index cbfc257220e7..b0d6f94e8b17 100644 --- a/src/Illuminate/Console/OutputStyle.php +++ b/src/Illuminate/Console/OutputStyle.php @@ -64,7 +64,7 @@ public function askQuestion(Question $question): mixed /** * {@inheritdoc} */ - public function write(string|iterable $messages, bool $newline = false, int $options = 0) + public function write(string|iterable $messages, bool $newline = false, int $options = 0): void { $this->newLinesWritten = $this->trailingNewLineCount($messages) + (int) $newline; $this->newLineWritten = $this->newLinesWritten > 0; @@ -74,10 +74,8 @@ public function write(string|iterable $messages, bool $newline = false, int $opt /** * {@inheritdoc} - * - * @return void */ - public function writeln(string|iterable $messages, int $type = self::OUTPUT_NORMAL) + public function writeln(string|iterable $messages, int $type = self::OUTPUT_NORMAL): void { $this->newLinesWritten = $this->trailingNewLineCount($messages) + 1; $this->newLineWritten = true; @@ -87,10 +85,8 @@ public function writeln(string|iterable $messages, int $type = self::OUTPUT_NORM /** * {@inheritdoc} - * - * @return void */ - public function newLine(int $count = 1) + public function newLine(int $count = 1): void { $this->newLinesWritten += $count; $this->newLineWritten = $this->newLinesWritten > 0; diff --git a/src/Illuminate/Console/QuestionHelper.php b/src/Illuminate/Console/QuestionHelper.php index 43b4cf8296c1..a3bf62a520ab 100644 --- a/src/Illuminate/Console/QuestionHelper.php +++ b/src/Illuminate/Console/QuestionHelper.php @@ -17,7 +17,7 @@ class QuestionHelper extends SymfonyQuestionHelper * * @return void */ - protected function writePrompt(OutputInterface $output, Question $question) + protected function writePrompt(OutputInterface $output, Question $question): void { $text = OutputFormatter::escapeTrailingBackslash($question->getQuestion()); diff --git a/src/Illuminate/Console/composer.json b/src/Illuminate/Console/composer.json index 38ecc805c087..fa918c8a6329 100755 --- a/src/Illuminate/Console/composer.json +++ b/src/Illuminate/Console/composer.json @@ -23,8 +23,8 @@ "illuminate/view": "^11.0", "laravel/prompts": "^0.1.9", "nunomaduro/termwind": "^1.13", - "symfony/console": "^6.3", - "symfony/process": "^6.3" + "symfony/console": "^7.0", + "symfony/process": "^7.0" }, "autoload": { "psr-4": { diff --git a/src/Illuminate/Cookie/composer.json b/src/Illuminate/Cookie/composer.json index b2ffb16f88dc..e8514738ce54 100755 --- a/src/Illuminate/Cookie/composer.json +++ b/src/Illuminate/Cookie/composer.json @@ -20,8 +20,8 @@ "illuminate/contracts": "^11.0", "illuminate/macroable": "^11.0", "illuminate/support": "^11.0", - "symfony/http-foundation": "^6.3", - "symfony/http-kernel": "^6.3" + "symfony/http-foundation": "^7.0", + "symfony/http-kernel": "^7.0" }, "autoload": { "psr-4": { diff --git a/src/Illuminate/Database/composer.json b/src/Illuminate/Database/composer.json index 3c76a0174268..0e3ed4ca7c50 100644 --- a/src/Illuminate/Database/composer.json +++ b/src/Illuminate/Database/composer.json @@ -42,7 +42,7 @@ "illuminate/events": "Required to use the observers with Eloquent (^11.0).", "illuminate/filesystem": "Required to use the migrations (^11.0).", "illuminate/pagination": "Required to paginate the result set (^11.0).", - "symfony/finder": "Required to use Eloquent model factories (^6.3)." + "symfony/finder": "Required to use Eloquent model factories (^7.0)." }, "config": { "sort-packages": true diff --git a/src/Illuminate/Filesystem/composer.json b/src/Illuminate/Filesystem/composer.json index b2657b376d75..b46be7d136d2 100644 --- a/src/Illuminate/Filesystem/composer.json +++ b/src/Illuminate/Filesystem/composer.json @@ -19,7 +19,7 @@ "illuminate/contracts": "^11.0", "illuminate/macroable": "^11.0", "illuminate/support": "^11.0", - "symfony/finder": "^6.3" + "symfony/finder": "^7.0" }, "autoload": { "psr-4": { @@ -41,8 +41,8 @@ "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.0).", "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", - "symfony/filesystem": "Required to enable support for relative symbolic links (^6.3).", - "symfony/mime": "Required to enable support for guessing extensions (^6.3)." + "symfony/filesystem": "Required to enable support for relative symbolic links (^7.0).", + "symfony/mime": "Required to enable support for guessing extensions (^7.0)." }, "config": { "sort-packages": true diff --git a/src/Illuminate/Foundation/Console/ClosureCommand.php b/src/Illuminate/Foundation/Console/ClosureCommand.php index 4cd54e8e4a79..c5be75ecc103 100644 --- a/src/Illuminate/Foundation/Console/ClosureCommand.php +++ b/src/Illuminate/Foundation/Console/ClosureCommand.php @@ -39,7 +39,7 @@ public function __construct($signature, Closure $callback) * @param \Symfony\Component\Console\Output\OutputInterface $output * @return int */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $inputs = array_merge($input->getArguments(), $input->getOptions()); diff --git a/src/Illuminate/Http/Request.php b/src/Illuminate/Http/Request.php index 251bb2c7c940..4707dbe1fd4a 100644 --- a/src/Illuminate/Http/Request.php +++ b/src/Illuminate/Http/Request.php @@ -533,7 +533,7 @@ protected function filterFiles($files) */ public function hasSession(bool $skipIfUninitialized = false): bool { - return ! is_null($this->session); + return $this->session instanceof SymfonySessionDecorator; } /** @@ -542,7 +542,7 @@ public function hasSession(bool $skipIfUninitialized = false): bool public function getSession(): SessionInterface { return $this->hasSession() - ? new SymfonySessionDecorator($this->session()) + ? $this->session : throw new SessionNotFoundException; } @@ -559,7 +559,7 @@ public function session() throw new RuntimeException('Session store not set on request.'); } - return $this->session; + return $this->session->store; } /** @@ -570,7 +570,7 @@ public function session() */ public function setLaravelSession($session) { - $this->session = $session; + $this->session = new SymfonySessionDecorator($session); } /** diff --git a/src/Illuminate/Http/composer.json b/src/Illuminate/Http/composer.json index 05c6b9d00eba..768d72bc6637 100755 --- a/src/Illuminate/Http/composer.json +++ b/src/Illuminate/Http/composer.json @@ -16,15 +16,15 @@ "require": { "php": "^8.2", "ext-filter": "*", - "fruitcake/php-cors": "^1.2", + "fruitcake/php-cors": "^1.3", "guzzlehttp/uri-template": "^1.0", "illuminate/collections": "^11.0", "illuminate/macroable": "^11.0", "illuminate/session": "^11.0", "illuminate/support": "^11.0", - "symfony/http-foundation": "^6.3", - "symfony/http-kernel": "^6.3", - "symfony/mime": "^6.3" + "symfony/http-foundation": "^7.0", + "symfony/http-kernel": "^7.0", + "symfony/mime": "^7.0" }, "autoload": { "psr-4": { diff --git a/src/Illuminate/Mail/composer.json b/src/Illuminate/Mail/composer.json index 42a64ccdac78..ad0211e96d7c 100755 --- a/src/Illuminate/Mail/composer.json +++ b/src/Illuminate/Mail/composer.json @@ -22,7 +22,7 @@ "illuminate/support": "^11.0", "league/commonmark": "^2.2", "psr/log": "^1.0|^2.0|^3.0", - "symfony/mailer": "^6.3", + "symfony/mailer": "^7.0", "tijsverkoyen/css-to-inline-styles": "^2.2.5" }, "autoload": { @@ -37,9 +37,9 @@ }, "suggest": { "aws/aws-sdk-php": "Required to use the SES mail driver (^3.235.5).", - "symfony/http-client": "Required to use the Symfony API mail transports (^6.3).", - "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^6.3).", - "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^6.3)." + "symfony/http-client": "Required to use the Symfony API mail transports (^7.0).", + "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^7.0).", + "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^7.0)." }, "config": { "sort-packages": true diff --git a/src/Illuminate/Process/composer.json b/src/Illuminate/Process/composer.json index c056b4aac494..76eca7284827 100644 --- a/src/Illuminate/Process/composer.json +++ b/src/Illuminate/Process/composer.json @@ -19,7 +19,7 @@ "illuminate/contracts": "^10.0", "illuminate/macroable": "^10.0", "illuminate/support": "^10.0", - "symfony/process": "^6.3" + "symfony/process": "^7.0" }, "autoload": { "psr-4": { diff --git a/src/Illuminate/Queue/composer.json b/src/Illuminate/Queue/composer.json index f341b6768392..66bc9c0f4afd 100644 --- a/src/Illuminate/Queue/composer.json +++ b/src/Illuminate/Queue/composer.json @@ -25,7 +25,7 @@ "illuminate/support": "^11.0", "laravel/serializable-closure": "^1.2.2", "ramsey/uuid": "^4.7", - "symfony/process": "^6.3" + "symfony/process": "^7.0" }, "autoload": { "psr-4": { diff --git a/src/Illuminate/Routing/composer.json b/src/Illuminate/Routing/composer.json index 82825c675cab..92d08b0908fd 100644 --- a/src/Illuminate/Routing/composer.json +++ b/src/Illuminate/Routing/composer.json @@ -25,9 +25,9 @@ "illuminate/pipeline": "^11.0", "illuminate/session": "^11.0", "illuminate/support": "^11.0", - "symfony/http-foundation": "^6.3", - "symfony/http-kernel": "^6.3", - "symfony/routing": "^6.3" + "symfony/http-foundation": "^7.0", + "symfony/http-kernel": "^7.0", + "symfony/routing": "^7.0" }, "autoload": { "psr-4": { diff --git a/src/Illuminate/Session/SymfonySessionDecorator.php b/src/Illuminate/Session/SymfonySessionDecorator.php index 02034910bb9e..978816683fe7 100644 --- a/src/Illuminate/Session/SymfonySessionDecorator.php +++ b/src/Illuminate/Session/SymfonySessionDecorator.php @@ -13,9 +13,9 @@ class SymfonySessionDecorator implements SessionInterface /** * The underlying Laravel session store. * - * @var \Illuminate\Session\Store + * @var \Illuminate\Contracts\Session\Session */ - protected $store; + public readonly Session $store; /** * Create a new session decorator. @@ -46,10 +46,8 @@ public function getId(): string /** * {@inheritdoc} - * - * @return void */ - public function setId(string $id) + public function setId(string $id): void { $this->store->setId($id); } @@ -64,10 +62,8 @@ public function getName(): string /** * {@inheritdoc} - * - * @return void */ - public function setName(string $name) + public function setName(string $name): void { $this->store->setName($name); } @@ -94,10 +90,8 @@ public function migrate(bool $destroy = false, int $lifetime = null): bool /** * {@inheritdoc} - * - * @return void */ - public function save() + public function save(): void { $this->store->save(); } @@ -120,10 +114,8 @@ public function get(string $name, mixed $default = null): mixed /** * {@inheritdoc} - * - * @return void */ - public function set(string $name, mixed $value) + public function set(string $name, mixed $value): void { $this->store->put($name, $value); } @@ -138,10 +130,8 @@ public function all(): array /** * {@inheritdoc} - * - * @return void */ - public function replace(array $attributes) + public function replace(array $attributes): void { $this->store->replace($attributes); } @@ -156,10 +146,8 @@ public function remove(string $name): mixed /** * {@inheritdoc} - * - * @return void */ - public function clear() + public function clear(): void { $this->store->flush(); } @@ -174,10 +162,8 @@ public function isStarted(): bool /** * {@inheritdoc} - * - * @return void */ - public function registerBag(SessionBagInterface $bag) + public function registerBag(SessionBagInterface $bag): void { throw new BadMethodCallException('Method not implemented by Laravel.'); } diff --git a/src/Illuminate/Session/composer.json b/src/Illuminate/Session/composer.json index 85a08b559167..56789edc0f78 100755 --- a/src/Illuminate/Session/composer.json +++ b/src/Illuminate/Session/composer.json @@ -21,8 +21,8 @@ "illuminate/contracts": "^11.0", "illuminate/filesystem": "^11.0", "illuminate/support": "^11.0", - "symfony/finder": "^6.3", - "symfony/http-foundation": "^6.3" + "symfony/finder": "^7.0", + "symfony/http-foundation": "^7.0" }, "autoload": { "psr-4": { diff --git a/src/Illuminate/Support/composer.json b/src/Illuminate/Support/composer.json index 5d84b67da753..e0b4a7e13119 100644 --- a/src/Illuminate/Support/composer.json +++ b/src/Illuminate/Support/composer.json @@ -46,9 +46,9 @@ "illuminate/filesystem": "Required to use the composer class (^11.0).", "league/commonmark": "Required to use Str::markdown() and Stringable::markdown() (^2.0.2).", "ramsey/uuid": "Required to use Str::uuid() (^4.7).", - "symfony/process": "Required to use the composer class (^6.3).", - "symfony/uid": "Required to use Str::ulid() (^6.3).", - "symfony/var-dumper": "Required to use the dd function (^6.3).", + "symfony/process": "Required to use the composer class (^7.0).", + "symfony/uid": "Required to use Str::ulid() (^7.0).", + "symfony/var-dumper": "Required to use the dd function (^7.0).", "vlucas/phpdotenv": "Required to use the Env class and env helper (^5.4.1)." }, "config": { diff --git a/src/Illuminate/Testing/ParallelConsoleOutput.php b/src/Illuminate/Testing/ParallelConsoleOutput.php index 91008dde890d..6df016b037b6 100644 --- a/src/Illuminate/Testing/ParallelConsoleOutput.php +++ b/src/Illuminate/Testing/ParallelConsoleOutput.php @@ -49,7 +49,7 @@ public function __construct($output) * @param int $options * @return void */ - public function write($messages, bool $newline = false, int $options = 0) + public function write($messages, bool $newline = false, int $options = 0): void { $messages = collect($messages)->filter(function ($message) { return ! Str::contains($message, $this->ignore); diff --git a/src/Illuminate/Validation/composer.json b/src/Illuminate/Validation/composer.json index 4cf5d733e16b..a1f6fe3e6992 100755 --- a/src/Illuminate/Validation/composer.json +++ b/src/Illuminate/Validation/composer.json @@ -25,8 +25,8 @@ "illuminate/macroable": "^11.0", "illuminate/support": "^11.0", "illuminate/translation": "^11.0", - "symfony/http-foundation": "^6.3", - "symfony/mime": "^6.3" + "symfony/http-foundation": "^7.0", + "symfony/mime": "^7.0" }, "autoload": { "psr-4": {