Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php84 support #63

Closed
wants to merge 1 commit into from
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
6 changes: 6 additions & 0 deletions .laminas-ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ignore_php_platform_requirements": {
"8.4": true
},
"backwardCompatibilityCheck": true
}
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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.

Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand All @@ -14,18 +14,18 @@
],
"authors": [
{
"name": "DotKernel Team",
"name": "Dotkernel Team",
"email": "[email protected]"
}
],
"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": {
Expand Down
8 changes: 5 additions & 3 deletions docs/book/v3/formatting-messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
],
```
4 changes: 2 additions & 2 deletions docs/book/v3/overview.md
Original file line number Diff line number Diff line change
@@ -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)
8 changes: 5 additions & 3 deletions docs/book/v4/formatting-messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
],
```
2 changes: 2 additions & 0 deletions docs/book/v4/overview.md
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions src/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
];
Expand Down