You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Bump PHP min to 8.1 and Monolog to 3.0
* Modernize CloudWatch handler for PHP 8.1 and Monolog 3
- write() now takes Monolog\LogRecord (was array)
- Constructor promotion + readonly properties; full type coverage
- $level accepts int|string|Monolog\Level (default Level::Debug)
- New $createStream argument (10th, default true) — set false to skip
DescribeLogStreams + CreateLogStream when the stream is provisioned
out of band; lets users drop those IAM permissions
- PHPUnit config migrated to 10.x schema
* Switch lint to PSR-12 and add phpstan to CI matrix
* Update README, CHANGELOG, and CONTRIBUTING for 3.0
* Loosen aws/aws-sdk-php constraint to ^3.0
* Set 3.0.0 release date in CHANGELOG
Copy file name to clipboardExpand all lines: CHANGELOG.md
+27-1Lines changed: 27 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
## [3.0.0] - 2026-05-03
11
+
12
+
### Added
13
+
14
+
-`$createStream` constructor argument (10th, default `true`). Set to `false` to skip `DescribeLogStreams` + `CreateLogStream` when the log stream is provisioned out of band (e.g. via Terraform). Lets users drop the matching IAM permissions.
15
+
- Full type coverage on the constructor and properties (constructor promotion, `readonly` for immutable state).
16
+
-`phpstan` (level 8) runs in CI alongside lint and tests.
17
+
18
+
### Changed
19
+
20
+
- Coding standard upgraded from PSR-2 to PSR-12.
21
+
- PHPUnit upgraded to `^10.5 || ^11.0`.
22
+
23
+
### Removed
24
+
25
+
- Support for PHP 7.x and 8.0. Minimum PHP is now `^8.1`.
26
+
- Support for Monolog 2. Minimum Monolog is now `^3.0`.
27
+
28
+
### Migration
29
+
30
+
- Replace any `Monolog\Logger::DEBUG` (or other level constant) usage with `Monolog\Level::Debug`. The `$level` constructor argument continues to accept `int|string|Level` so string values like `'debug'` keep working.
31
+
- Symfony service definitions referencing `!php/const Monolog\Logger::WARNING` must change to `!php/const Monolog\Level::Warning`.
32
+
- Subclasses overriding `protected function write(array $record): void` must update the signature to `protected function write(\Monolog\LogRecord $record): void` and access fields via `->property` instead of `['key']`.
33
+
- The constructor parameter order, names, and defaults of the existing 9 arguments are unchanged. Existing Symfony positional `arguments:` lists and Laravel `with`/`handler_with` named-key configs continue to work after the platform upgrades above.
34
+
10
35
## [2.1.0] - 2026-04-26
11
36
12
37
### Added
@@ -36,5 +61,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
36
61
-**No breaking public API changes.** Adds public `flush()` and overrides `reset()` to flush. Existing constructor and method signatures are unchanged; existing `^2.0` pins continue to work without modification.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,4 +16,18 @@
16
16
17
17
Changes that are cosmetic in nature and do not add anything substantial to the stability, functionality, or testability will generally not be accepted.
18
18
19
+
#### **Local development**
20
+
21
+
Use the Makefile targets — they run inside Docker against the supported PHP matrix and exactly match what CI runs. Direct `phpunit`/`phpcs`/`phpstan` invocations on your host may pick up a different PHP version or dependency set:
22
+
23
+
```bash
24
+
make build-svc PHP=8.4 # build the dev container
25
+
make install PHP=8.4 # composer install inside it
26
+
make lint # PSR-12 lint via phpcs
27
+
make lint-fix # auto-fix PSR-12 violations via phpcbf
28
+
make analyse # phpstan level 8
29
+
make test# PHPUnit
30
+
make matrix # run install + lint + test across PHP 8.1–8.5 in parallel
Copy file name to clipboardExpand all lines: README.md
+31-10Lines changed: 31 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,8 @@ Please press **★ Star** button if you find this library useful.
19
19
This library uses AWS API through AWS PHP SDK, which has limits on concurrent requests. It means that on high concurrent or high load applications it may not work on it's best way. Please consider using another solution such as logging to the stdout and redirecting logs with fluentd.
20
20
21
21
## Requirements
22
-
* PHP ^7.3
22
+
* PHP ^8.1
23
+
* Monolog ^3.0
23
24
* AWS account with proper permissions (see list of permissions below)
24
25
25
26
## Features
@@ -32,7 +33,7 @@ This library uses AWS API through AWS PHP SDK, which has limits on concurrent re
32
33
Install the latest version with [Composer](https://getcomposer.org/) by running
[And many others](https://github.com/Seldaek/monolog#framework-integrations)
120
+
121
+
## Migrating from 2.x to 3.x
122
+
123
+
3.x is a breaking release that drops Monolog 2 and PHP 7.x support. The constructor parameter order, names, and defaults are preserved — existing Symfony YAML and Laravel `with`/`handler_with` configs continue to work after the platform upgrades below.
124
+
125
+
**Required changes:**
126
+
- Bump PHP to 8.1 or newer.
127
+
- Bump Monolog to 3.x.
128
+
- The `Monolog\Logger::DEBUG` (and other) constants were removed in Monolog 3. Use `Monolog\Level::Debug` instead — `int|string|Level` are all accepted by the `$level` constructor argument.
129
+
- Symfony service definitions referencing `!php/const Monolog\Logger::WARNING` must change to `!php/const Monolog\Level::Warning`.
130
+
- Laravel channels using `'level' => 'warning'` (string form) keep working unchanged.
131
+
132
+
**New (optional):**
133
+
- A 10th constructor argument `$createStream` (default `true`). Set to `false` to skip `DescribeLogStreams`/`CreateLogStream` for pre-provisioned streams; lets you drop those IAM permissions.
115
134
116
135
# AWS IAM needed permissions
117
136
if you prefer to use a separate programmatic IAM user (recommended) or want to define a policy, make sure following permissions are included:
@@ -122,7 +141,9 @@ if you prefer to use a separate programmatic IAM user (recommended) or want to d
When setting the `$createGroup` argument to `false`, permissions `DescribeLogGroups` and `CreateLogGroup` can be omitted
144
+
When setting the `$createGroup` argument to `false`, permissions `DescribeLogGroups` and `CreateLogGroup` can be omitted.
145
+
146
+
When setting the `$createStream` argument to `false`, permissions `DescribeLogStreams` and `CreateLogStream` can be omitted. Use this when the log stream is provisioned out of band (e.g. via Terraform). If the stream does not exist at runtime, `PutLogEvents` will fail with `ResourceNotFoundException`.
0 commit comments