From 22401c7cabeb2ea63af3fa0358cf53b0163ba91b Mon Sep 17 00:00:00 2001 From: Jurj-Bogdan Date: Thu, 24 Oct 2024 11:47:56 +0300 Subject: [PATCH] php84 support Signed-off-by: Jurj-Bogdan --- .laminas-ci.json | 6 ++++++ README.md | 8 +++----- composer.json | 8 ++++---- docs/book/v3/formatting-messages.md | 8 +++++--- docs/book/v3/overview.md | 4 ++-- docs/book/v4/formatting-messages.md | 8 +++++--- docs/book/v4/overview.md | 2 ++ mkdocs.yml | 2 +- src/Logger.php | 2 -- 9 files changed, 28 insertions(+), 20 deletions(-) create mode 100644 .laminas-ci.json diff --git a/.laminas-ci.json b/.laminas-ci.json new file mode 100644 index 0000000..82cd446 --- /dev/null +++ b/.laminas-ci.json @@ -0,0 +1,6 @@ +{ + "ignore_php_platform_requirements": { + "8.4": true + }, + "backwardCompatibilityCheck": true +} diff --git a/README.md b/README.md index 2b29e05..2ef25fa 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # dot-log ![OSS Lifecycle](https://img.shields.io/osslifecycle/dotkernel/dot-log) -![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-log/4.0.0) +![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-log/4.1.0) [![GitHub issues](https://img.shields.io/github/issues/dotkernel/dot-log)](https://github.com/dotkernel/dot-log/issues) [![GitHub forks](https://img.shields.io/github/forks/dotkernel/dot-log)](https://github.com/dotkernel/dot-log/network) @@ -11,14 +11,12 @@ [![Build Static](https://github.com/dotkernel/dot-log/actions/workflows/continuous-integration.yml/badge.svg?branch=4.0)](https://github.com/dotkernel/dot-log/actions/workflows/continuous-integration.yml) [![codecov](https://codecov.io/gh/dotkernel/dot-log/graph/badge.svg?token=JX19KTBRCZ)](https://codecov.io/gh/dotkernel/dot-log) -[![SymfonyInsight](https://insight.symfony.com/projects/287e81e8-b4fb-4452-bd8f-4f12c0ab1f76/big.svg)](https://insight.symfony.com/projects/287e81e8-b4fb-4452-bd8f-4f12c0ab1f76) - ## Adding The Config Provider * Enter config/config.php * If there is no entry for the config provider below, add it: `\Dot\Log\ConfigProvider::class` -* Make sure it is added before with the Application-Specific components, eg.: `\Frontend\App\ConfigProvider.php`, `\Admin\App\ConfigProvider::class`, `MyProject\ConfigProvider::class` , etc. +* Make sure it is added before with the Application-Specific components, e.g.: `\Frontend\App\ConfigProvider.php`, `\Admin\App\ConfigProvider::class`, `MyProject\ConfigProvider::class` , etc. * Open the `Dot\Log\ConfigProvider` * In the dependencies section you will see an abstract factory (`LoggerAbstractServiceFactory::class`) * This class responds to "selectors" instead of class names @@ -162,7 +160,7 @@ As in the writer configuration, the developer can optionally use keys for associ IMPORTANT NOTE: the operator for more important messages is <=, this is because the number representation is smaller for a more important message type. -The filter added on the first writer is equal to not setting a filter, but it was been added to illustrate how to explicitly allow all messages. +The filter added on the first writer is equal to not setting a filter, but it has been added to illustrate how to explicitly allow all messages. It was added opposite to the others just to demonstrate the other operator is also an option. diff --git a/composer.json b/composer.json index 200ae39..474f93f 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "dotkernel/dot-log", "type": "library", - "description": "DotKernel log component extending and customizing laminas-log", + "description": "Dotkernel log component extending and customizing laminas-log", "license": "MIT", "homepage": "https://github.com/dotkernel/dot-log", "keywords": [ @@ -14,18 +14,18 @@ ], "authors": [ { - "name": "DotKernel Team", + "name": "Dotkernel Team", "email": "team@dotkernel.com" } ], "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "laminas/laminas-servicemanager": "^3.22", "laminas/laminas-validator": "^2.64" }, "require-dev": { "phpunit/phpunit": "^10.2", - "laminas/laminas-coding-standard": "^2.5", + "laminas/laminas-coding-standard": "^3.0.1", "vimeo/psalm": "^5.13" }, "autoload": { diff --git a/docs/book/v3/formatting-messages.md b/docs/book/v3/formatting-messages.md index c0b028a..bbcd52a 100644 --- a/docs/book/v3/formatting-messages.md +++ b/docs/book/v3/formatting-messages.md @@ -9,6 +9,8 @@ The formatter accepts following parameters: The following snippet formats the message as JSON data: - 'formatter' => [ - 'name' => \Laminas\Log\Formatter\Json::class, - ], +```php +'formatter' => [ + 'name' => \Dot\Log\Formatter\Json::class, +], +``` diff --git a/docs/book/v3/overview.md b/docs/book/v3/overview.md index 975a06d..615aaf0 100644 --- a/docs/book/v3/overview.md +++ b/docs/book/v3/overview.md @@ -1,5 +1,5 @@ # Overview +Robust, composite logger with filtering, formatting, and PSR-3 support. + > dot-log is a wrapper on top of [laminas-log](https://github.com/laminas/laminas-log) -> -> ![OSS Lifecycle](https://img.shields.io/osslifecycle/laminas/laminas-log) diff --git a/docs/book/v4/formatting-messages.md b/docs/book/v4/formatting-messages.md index 4604825..5d1c4bb 100644 --- a/docs/book/v4/formatting-messages.md +++ b/docs/book/v4/formatting-messages.md @@ -9,6 +9,8 @@ The formatter accepts following parameters: The following snippet formats the message as JSON data: - 'formatter' => [ - 'name' => \Dot\Log\Formatter\Json::class, - ], +```php +'formatter' => [ + 'name' => \Dot\Log\Formatter\Json::class, +], +``` diff --git a/docs/book/v4/overview.md b/docs/book/v4/overview.md index 89f6888..615aaf0 100644 --- a/docs/book/v4/overview.md +++ b/docs/book/v4/overview.md @@ -1,3 +1,5 @@ # Overview Robust, composite logger with filtering, formatting, and PSR-3 support. + +> dot-log is a wrapper on top of [laminas-log](https://github.com/laminas/laminas-log) diff --git a/mkdocs.yml b/mkdocs.yml index 49551bc..5638928 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -27,7 +27,7 @@ nav: - "Example with formatter": v3/example-with-formatter.md - "Usage": v3/usage.md site_name: dot-log -site_description: "DotKernel log component" +site_description: "Dotkernel log component" repo_url: "https://github.com/dotkernel/dot-log" plugins: - search diff --git a/src/Logger.php b/src/Logger.php index 59cc991..f7625f2 100644 --- a/src/Logger.php +++ b/src/Logger.php @@ -45,7 +45,6 @@ use const E_NOTICE; use const E_PARSE; use const E_RECOVERABLE_ERROR; -use const E_STRICT; use const E_USER_DEPRECATED; use const E_USER_ERROR; use const E_USER_NOTICE; @@ -84,7 +83,6 @@ class Logger implements LoggerInterface E_PARSE => self::ERR, E_COMPILE_ERROR => self::ERR, E_COMPILE_WARNING => self::ERR, - E_STRICT => self::DEBUG, E_DEPRECATED => self::DEBUG, E_USER_DEPRECATED => self::DEBUG, ];