Skip to content

Commit

Permalink
TASK: Upgrade monolog to version 2.9.1 (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
sabbelasichon committed Feb 23, 2023
1 parent 833715d commit dad4d15
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 34 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"require": {
"php": "^7.4 || ^8.0",
"guzzlehttp/guzzle": "^6.0 || ^7.0",
"monolog/monolog": "^1.17",
"monolog/monolog": "^2.9.1",
"myclabs/php-enum": "^1.8",
"neos/utility-files": "^3.0",
"padraic/phar-updater": "1.0.6",
Expand Down
66 changes: 41 additions & 25 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Cli/Symfony/Logger/ConsoleFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ConsoleFormatter extends LineFormatter
/**
* {@inheritdoc}
*/
public function format(array $record)
public function format(array $record): string
{
if ($record['level'] >= Logger::ERROR) {
$record['start_tag'] = '<error>';
Expand Down
2 changes: 1 addition & 1 deletion src/Cli/Symfony/Logger/ConsoleHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __construct(OutputInterface $output, bool $bubble = true, array
/**
* {@inheritdoc}
*/
public function isHandling(array $record)
public function isHandling(array $record): bool
{
if (!$this->updateLevel()) {
return false;
Expand Down
8 changes: 2 additions & 6 deletions tests/Unit/Integration/FactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,6 @@ public function getDeployment(): void
{
putenv('HOME=' . __DIR__ . '/Fixtures');

$files = [getenv('HOME') . '/.surf/deployments/deploy.php'];

$this->filesystem->getRealPath('./.surf')->willReturn('foo');
$this->filesystem->isDirectory('foo')->willReturn(false);
$this->filesystem->fileExists(Argument::any())->willReturn(true);
Expand All @@ -278,15 +276,13 @@ public function getDeploymentWithoutSimulation(): void
{
putenv('HOME=' . __DIR__ . '/Fixtures');

$files = [getenv('HOME') . '/.surf/deployments/deploy.php'];

$this->filesystem->getRealPath('./.surf')->willReturn('foo');
$this->filesystem->isDirectory('foo')->willReturn(false);
$this->filesystem->fileExists(Argument::any())->willReturn(true);

$deployment = $this->subject->getDeployment('deploy', null, false);
$this->logger->pushHandler(new StreamHandler(getenv('HOME') . '/.surf/workspace/logs/deploy.log'))->shouldBeCalledOnce()->willReturn($this->logger);

$this->logger->pushHandler(new StreamHandler(getenv('HOME') . '/.surf/workspace/logs/deploy.log'))->shouldBeCalledOnce();
$deployment = $this->subject->getDeployment('deploy', null, false);

self::assertFalse($deployment->getForceRun());
self::assertTrue($deployment->isInitialized());
Expand Down

0 comments on commit dad4d15

Please sign in to comment.