Skip to content

Commit c938250

Browse files
authored
Merge pull request #88 from dotkernel/issue-83
Issue #83: Remove PHP 8.1 and add PHP 8.4 & 8.5 support
2 parents 94d06cf + 775a360 commit c938250

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+130
-611
lines changed

.github/workflows/codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
- ubuntu-latest
1616

1717
php:
18-
- "8.1"
1918
- "8.2"
2019
- "8.3"
2120
- "8.4"
21+
- "8.5"
2222

2323
steps:
2424
- name: Checkout

.github/workflows/docs-build.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
on:
2+
- push
3+
4+
name: Run PHPStan checks
5+
6+
jobs:
7+
mutation:
8+
name: PHPStan ${{ matrix.php }}-${{ matrix.os }}
9+
10+
runs-on: ${{ matrix.os }}
11+
12+
strategy:
13+
matrix:
14+
os:
15+
- ubuntu-latest
16+
17+
php:
18+
- "8.2"
19+
- "8.3"
20+
- "8.4"
21+
- "8.5"
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Install PHP
28+
uses: shivammathur/setup-php@v2
29+
with:
30+
php-version: "${{ matrix.php }}"
31+
coverage: pcov
32+
ini-values: assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On
33+
tools: composer:v2, cs2pr
34+
35+
- name: Determine composer cache directory
36+
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
37+
38+
- name: Cache dependencies installed with composer
39+
uses: actions/cache@v4
40+
with:
41+
path: ${{ env.COMPOSER_CACHE_DIR }}
42+
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
43+
restore-keys: |
44+
php${{ matrix.php }}-composer-
45+
46+
- name: Install dependencies with composer
47+
run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
48+
49+
- name: Run static analysis with PHPStan
50+
run: vendor/bin/phpstan analyse

.laminas-ci.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2+
"ignore_php_platform_requirements": {
3+
"8.5": true
4+
},
25
"backwardCompatibilityCheck": true
36
}

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,22 @@
22

33
Robust, composite logger with filtering and formatting.
44

5+
## Version History
6+
7+
| Branch | Service Manager | Log style implementation | PHP Version |
8+
|--------|-------------------|--------------------------|---------------------------------------------------------------------------------------------------------|
9+
| 4.1 | Service Manager 4 | Laminas Log style | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-log/4.1.3) |
10+
| 4.0 | Service Manager 3 | Laminas Log style | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-log/4.0.5) |
11+
| 3.0 | Service Manager 3 | Laminas Log | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-log/3.5.4) |
12+
513
## Documentation
614

715
Documentation is available at: https://docs.dotkernel.org/dot-log/v4/overview/.
816

917
## Badges
1018

1119
![OSS Lifecycle](https://img.shields.io/osslifecycle/dotkernel/dot-log)
12-
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-log/4.1.2)
20+
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-log/4.1.3)
1321

1422
[![GitHub issues](https://img.shields.io/github/issues/dotkernel/dot-log)](https://github.com/dotkernel/dot-log/issues)
1523
[![GitHub forks](https://img.shields.io/github/forks/dotkernel/dot-log)](https://github.com/dotkernel/dot-log/network)
@@ -18,6 +26,7 @@ Documentation is available at: https://docs.dotkernel.org/dot-log/v4/overview/.
1826

1927
[![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)
2028
[![codecov](https://codecov.io/gh/dotkernel/dot-log/graph/badge.svg?token=JX19KTBRCZ)](https://codecov.io/gh/dotkernel/dot-log)
29+
[![PHPStan](https://github.com/dotkernel/dot-log/actions/workflows/static-analysis.yml/badge.svg?branch=4.1)](https://github.com/dotkernel/dot-log/actions/workflows/static-analysis.yml)
2130

2231
## Adding The Config Provider
2332

@@ -66,7 +75,7 @@ return [
6675
* The `FileWriter` key is optional, otherwise the writers array would be enumerative instead of associative.
6776
* The writer name key is a developer-provided name for that writer, the writer name key is **mandatory**.
6877

69-
The writer priority key is not affecting the errors that are written, it is a way to organize writers.
78+
The writer priority key is not affecting the errors that are written; it is a way to organize writers.
7079

7180
The writer priority key is optional.
7281

@@ -81,7 +90,7 @@ Examples:
8190
* `log/dk-{Y}-{m}-{d}.log` will write every day to a different file (eg: `log/dk-2021-01-01.log`)
8291
* `log/dk-{Y}-{W}.log` will write every week to a different file (eg: `log/dk-2021-10.log`)
8392

84-
The full list of format specifiers is available [here](https://www.php.net/manual/en/datetime.format.php).
93+
The full list of format specifiers is available [on php.net in the `DateTimeInterface::format` documentation](https://www.php.net/manual/en/datetime.format.php).
8594

8695
## Filtering log messages
8796

SECURITY.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55

66
| Version | Supported | PHP Version |
77
|---------|--------------------|---------------------------------------------------------------------------------------------------------|
8-
| 5.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-log/5.0.0) |
9-
| 4.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-log/4.1.1) |
10-
| 3.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-log/3.4.7) |
11-
| <= 2.x | :x: | |
8+
| 4.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-log/4.1.3) |
9+
| <= 3.x | :x: | |
1210

1311

1412
## Reporting Potential Security Issues

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@
1717
}
1818
],
1919
"require": {
20-
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
20+
"php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
2121
"laminas/laminas-servicemanager": "^4.0",
2222
"laminas/laminas-validator": "^3.0"
2323
},
2424
"require-dev": {
2525
"laminas/laminas-coding-standard": "^3.0",
26-
"phpunit/phpunit": "^10.2",
27-
"vimeo/psalm": "^6.0"
26+
"phpstan/phpstan": "^2.1.17",
27+
"phpstan/phpstan-phpunit": "^2.0.6",
28+
"phpunit/phpunit": "^10.2"
2829
},
2930
"autoload": {
3031
"psr-4": {
@@ -51,8 +52,7 @@
5152
],
5253
"cs-check": "phpcs",
5354
"cs-fix": "phpcbf",
54-
"test": "phpunit --colors=always",
55-
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml",
56-
"static-analysis": "psalm --shepherd --stats"
55+
"static-analysis": "phpstan analyse --memory-limit 1G",
56+
"test": "phpunit --colors=always"
5757
}
5858
}

docs/book/index.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/book/v3/adding-config-provider.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/book/v3/configuring-writer.md

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)