Skip to content

Commit f2ab94d

Browse files
authored
Merge pull request #114 from samsonasik/bump-php
Bump PHP requirement to ^8.3
2 parents 10746c3 + c035c28 commit f2ab94d

14 files changed

Lines changed: 32 additions & 41 deletions

File tree

.github/workflows/ci_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
php-versions: ['8.2', '8.3', '8.4', '8.5']
16+
php-versions: ['8.3', '8.4', '8.5']
1717
steps:
1818
- name: Setup PHP Action
1919
uses: shivammathur/setup-php@v2

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ ErrorHeroModule
77
[![PHPStan](https://img.shields.io/badge/style-level%20max-brightgreen.svg?style=flat-square&label=phpstan)](https://github.com/phpstan/phpstan)
88
[![Downloads](https://poser.pugx.org/samsonasik/error-hero-module/downloads)](https://packagist.org/packages/samsonasik/error-hero-module)
99

10-
> This is README for version ^6.0 which only support Laminas Mvc version 3 and Mezzio version 3 with php ^8.2.
10+
> This is README for version ^7.0 which bump laminas-diactoros to ^3.8 and bump doctrine-orm-module to ^6.3, and only support Laminas Mvc version 3 and Mezzio version 3 with php ^8.3
1111
12-
> For version ^5.0, you can read at [version 5 readme](https://github.com/samsonasik/ErrorHeroModule/tree/5.x.x) which only support Laminas Mvc version 3 and Mezzio version 3 with php ^8.1.
12+
> For version ^6.0, you can read at [version 6 readme](https://github.com/samsonasik/ErrorHeroModule/tree/6.x.x) which only support Laminas Mvc version 3 and Mezzio version 3 with php ^8.2.
1313
14-
> For version ^4.0, you can read at [version 4 readme](https://github.com/samsonasik/ErrorHeroModule/tree/4.x.x) which only support Laminas Mvc version 3 and Mezzio version 3 with php ^8.0.
14+
> For version ^5.0, you can read at [version 5 readme](https://github.com/samsonasik/ErrorHeroModule/tree/5.x.x) which only support Laminas Mvc version 3 and Mezzio version 3 with php ^8.1.
1515
1616
Introduction
1717
------------

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
}
3636
],
3737
"require": {
38-
"php": "^8.2",
38+
"php": "^8.3",
3939
"laminas/laminas-db": "^2.20.0",
4040
"laminas/laminas-diactoros": "^3.8",
4141
"laminas/laminas-log": "^2.17.1",

src/Command/BaseLoggingCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use ErrorHeroModule\Handler\Logging;
88
use ErrorHeroModule\HeroTrait;
9+
use Override;
910
use Symfony\Component\Console\Command\Command;
1011
use Symfony\Component\Console\Helper\Table;
1112
use Symfony\Component\Console\Input\InputInterface;
@@ -18,8 +19,7 @@ abstract class BaseLoggingCommand extends Command
1819
{
1920
use HeroTrait;
2021

21-
/** @var string */
22-
private const DISPLAY_SETTINGS = 'display-settings';
22+
private const string DISPLAY_SETTINGS = 'display-settings';
2323

2424
private array $errorHeroModuleConfig;
2525

@@ -36,6 +36,7 @@ public function init(array $errorHeroModuleConfig, Logging $logging): void
3636
$this->logging = $logging;
3737
}
3838

39+
#[Override]
3940
public function run(InputInterface $input, OutputInterface $output): int
4041
{
4142
try {

src/Compat/LoggerAbstractServiceFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44

55
namespace ErrorHeroModule\Compat;
66

7+
use Override;
78
use Psr\Container\ContainerInterface;
89

910
class LoggerAbstractServiceFactory extends \Laminas\Log\LoggerAbstractServiceFactory
1011
{
1112
/**
1213
* {@inheritdoc}
1314
*/
15+
#[Override]
1416
public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null)
1517
{
1618
$config = $this->getConfig($container);

src/Handler/Formatter/Json.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use DateTime;
88
use Laminas\Log\Formatter\FormatterInterface;
99
use Laminas\Log\Formatter\Json as BaseJson;
10+
use Override;
1011

1112
use function json_encode;
1213
use function str_replace;
@@ -18,13 +19,13 @@
1819

1920
final class Json extends BaseJson implements FormatterInterface
2021
{
21-
/** @var string */
22-
private const TIMESTAMP = 'timestamp';
22+
private const string TIMESTAMP = 'timestamp';
2323

2424
/**
2525
* @param array<string, DateTime> $event event data
2626
* @return string formatted line to write to the log
2727
*/
28+
#[Override]
2829
public function format($event): string
2930
{
3031
static $timestamp;

src/Handler/Logging.php

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,19 @@ final class Logging
4040

4141
private readonly string $emailSender;
4242

43-
/** @var string */
44-
private const PRIORITY = 'priority';
43+
private const string PRIORITY = 'priority';
4544

46-
/** @var string */
47-
private const ERROR_TYPE = 'errorType';
45+
private const string ERROR_TYPE = 'errorType';
4846

49-
/** @var string */
50-
private const ERROR_FILE = 'errorFile';
47+
private const string ERROR_FILE = 'errorFile';
5148

52-
/** @var string */
53-
private const ERROR_LINE = 'errorLine';
49+
private const string ERROR_LINE = 'errorLine';
5450

55-
/** @var string */
56-
private const TRACE = 'trace';
51+
private const string TRACE = 'trace';
5752

58-
/** @var string */
59-
private const ERROR_MESSAGE = 'errorMessage';
53+
private const string ERROR_MESSAGE = 'errorMessage';
6054

61-
/** @var string */
62-
private const SERVER_URL = 'server_url';
55+
private const string SERVER_URL = 'server_url';
6356

6457
public function __construct(
6558
private readonly Logger $logger,

src/Handler/Writer/Checker/Db.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,11 @@
1414

1515
final readonly class Db
1616
{
17-
/** @var string */
18-
private const OPTIONS = 'options';
17+
private const string OPTIONS = 'options';
1918

20-
/** @var string */
21-
private const COLUMN = 'column';
19+
private const string COLUMN = 'column';
2220

23-
/** @var string */
24-
private const EXTRA = 'extra';
21+
private const string EXTRA = 'extra';
2522

2623
public function __construct(
2724
private DbWriter $dbWriter,

src/Handler/Writer/Mail.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use Laminas\Mime\Message as MimeMessage;
1414
use Laminas\Mime\Mime;
1515
use Laminas\Mime\Part;
16+
use Override;
1617

1718
use function fopen;
1819
use function implode;
@@ -26,8 +27,7 @@
2627

2728
final class Mail extends BaseMail
2829
{
29-
/** @var string */
30-
private const NAME = 'name';
30+
private const string NAME = 'name';
3131

3232
/**
3333
* @throws LogException\InvalidArgumentException
@@ -45,6 +45,7 @@ public function __construct(
4545
*
4646
* Override with apply attachment whenever there is $_FILES data
4747
*/
48+
#[Override]
4849
public function shutdown(): void
4950
{
5051
// Always provide events to mail as plaintext.

src/HeroConstant.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
final class HeroConstant
2323
{
2424
/** @var array<int, string> */
25-
public const ERROR_TYPE = [
25+
public const array ERROR_TYPE = [
2626
E_ERROR => 'E_ERROR',
2727
E_WARNING => 'E_WARNING',
2828
E_PARSE => 'E_PARSE',

0 commit comments

Comments
 (0)