Skip to content
Closed
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
34 changes: 17 additions & 17 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@
"filp/whoops": "~2.11",
"ircmaxell/password-compat": "~1.0",
"laravel/serializable-closure": "^1.2",
"monolog/monolog": "^2.10",
"nesbot/carbon": "^2.71",
"monolog/monolog": "^3.10",
"nesbot/carbon": "^3.8.4",
"opis/closure": "~3.6",
"pda/pheanstalk": "~4.0",
"predis/predis": "^2.4.1",
"symfony/browser-kit": "~6.4",
"symfony/console": "~6.4",
"symfony/css-selector": "~6.4",
"symfony/dom-crawler": "~6.4",
"symfony/error-handler": "~6.4",
"symfony/event-dispatcher": "~6.4",
"symfony/finder": "~6.4",
"symfony/http-foundation": "~6.4",
"symfony/http-kernel": "~6.4",
"symfony/mailer": "^6.4",
"symfony/mime": "~6.4",
"symfony/process": "~6.4",
"symfony/routing": "~6.4",
"symfony/translation": "~6.4",
"symfony/browser-kit": "^7.4",
"symfony/console": "^7.4",
"symfony/css-selector": "^7.4",
"symfony/dom-crawler": "^7.4",
"symfony/error-handler": "^7.4",
"symfony/event-dispatcher": "^7.4",
"symfony/finder": "^7.4",
"symfony/http-foundation": "^7.4",
"symfony/http-kernel": "^7.4",
"symfony/mailer": "^7.4",
"symfony/mime": "^7.4",
"symfony/process": "^7.4",
"symfony/routing": "^7.4",
"symfony/translation": "^7.4",
"voku/portable-ascii": "2.0.3"
},
"replace": {
Expand Down Expand Up @@ -71,7 +71,7 @@
"phpspec/prophecy-phpunit": "~2.0",
"phpunit/phpunit": "~9.6",
"rector/rector": "^2.1",
"symfony/var-dumper": "~6.4"
"symfony/var-dumper": "^7.4"
},
"autoload": {
"classmap": [
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Cache/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ protected function getMinutes($duration)
$duration = Carbon::now()->add($duration);
}

$fromNow = Carbon::instance($duration)->diffInMinutes();
$fromNow = (int) Carbon::now()->diffInMinutes($duration);

return $fromNow > 0 ? $fromNow : null;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Cache/TaggedCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ protected function getMinutes($duration)
$duration = Carbon::now()->add($duration);
}

$fromNow = Carbon::instance($duration)->diffInMinutes();
$fromNow = (int) Carbon::now()->diffInMinutes($duration);

return $fromNow > 0 ? $fromNow : null;
}
Expand Down
21 changes: 4 additions & 17 deletions src/Illuminate/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ public static function make($app)

$console = with($console = new static('Laravel Framework', $app::VERSION))
->setLaravel($app)
->setExceptionHandler($app['exception'])
->setAutoExit(false);
->setExceptionHandler($app['exception']);

$console->setAutoExit(false);

$app->instance('artisan', $console);

Expand Down Expand Up @@ -108,7 +109,7 @@ public function call($command, array $parameters = array(), ?OutputInterface $ou
* @return \Symfony\Component\Console\Command\Command
*/
#[\Override]
public function add(SymfonyCommand $command)
public function add(SymfonyCommand $command): ?SymfonyCommand
{
if ($command instanceof Command)
{
Expand Down Expand Up @@ -229,18 +230,4 @@ public function setLaravel($laravel)
return $this;
}

/**
* Set whether the Console app should auto-exit when done.
*
* @param bool $boolean
* @return $this
*/
#[\Override]
public function setAutoExit($boolean)
{
parent::setAutoExit($boolean);

return $this;
}

}
2 changes: 1 addition & 1 deletion src/Illuminate/Console/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function run(InputInterface $input, OutputInterface $output): int
* @param \Symfony\Component\Console\Output\OutputInterface $output
* @return mixed
*/
protected function execute(InputInterface $input, OutputInterface $output): mixed
protected function execute(InputInterface $input, OutputInterface $output): int
{
// Prefer handle() (L13 idiom); fire() is the L4.2 fallback that dies at the Console swap.
// ponytail: fork mirror of stock Command's handle-or-__invoke resolution; app-side is grep-guarded.
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ public function dispatch(Request $request)
* @param \Symfony\Component\HttpFoundation\Response $response
* @return void
*/
public function terminate(SymfonyRequest $request, SymfonyResponse $response)
public function terminate(SymfonyRequest $request, SymfonyResponse $response): void
{
$this->callFinishCallbacks($request, $response);

Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Http/StackedHttpKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function handle(Request $request, $type = HttpKernelInterface::MAIN_REQUE
return $this->app->handle($request, $type, $catch);
}

public function terminate(Request $request, Response $response)
public function terminate(Request $request, Response $response): void
{
$prevKernel = null;

Expand Down
9 changes: 8 additions & 1 deletion src/Illuminate/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,14 @@ public static function createFromBase(SymfonyRequest $request)

$request->content = $content;

$request->request = $request->getInputSource();
if ($request->isJson())
{
$request->request->replace($request->json()->all());
}
else
{
$request->request = $request->getInputSource();
}

return $request;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Log/LogServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php namespace Illuminate\Log;

use Monolog\Logger;
use Monolog\Logger as MonologLogger;
use Illuminate\Support\ServiceProvider;

class LogServiceProvider extends ServiceProvider {
Expand All @@ -20,7 +20,7 @@ class LogServiceProvider extends ServiceProvider {
public function register()
{
$logger = new Logger(
new Logger($this->app['env']), $this->app['events']
new MonologLogger($this->app['env']), $this->app['events']
);

// Once we have an instance of the logger we'll bind it as an instance into
Expand Down
12 changes: 7 additions & 5 deletions tests/Foundation/FoundationArtisanTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,18 @@ public function testArtisanIsCalledWithProperArguments(): void
$artisan->expects($this->once())->method('getArtisan')->willReturn(
$console = m::mock('Illuminate\Console\Application[find]')
);
$console->shouldReceive('find')->once()->with('foo')->andReturn($command = m::mock('StdClass'));
$console->shouldReceive('find')->once()->with('foo')->andReturn($command = m::mock(\Symfony\Component\Console\Command\Command::class));
$command->shouldReceive('run')->once()->with(m::type(ArrayInput::class), m::type(
NullOutput::class
))->andReturnUsing(function($input, $output)
))->andReturnUsing(function($input, $output) use (&$captured)
{
return $input;
$captured = $input;

return 0;
});

$input = $artisan->call('foo', ['--bar' => 'baz']);
$this->assertEquals('baz', $input->getParameterOption('--bar'));
$artisan->call('foo', ['--bar' => 'baz']);
$this->assertEquals('baz', $captured->getParameterOption('--bar'));
}

}
Loading