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

GitProcessor #1

Closed
wants to merge 689 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
689 commits
Select commit Hold shift + click to select a range
7c977e4
Fix lint
Seldaek Dec 9, 2020
bd9570d
Merge branch '1.x' into main
Seldaek Dec 9, 2020
c5853b9
Improve build
Seldaek Dec 9, 2020
fd305da
Add support for PHP8 CurlHandler/Socket instead of resources
Seldaek Dec 9, 2020
ec146b3
Build tweaks
Seldaek Dec 9, 2020
d284c2a
Merge pull request #1518 from bocharsky-bw/patch-1
Seldaek Dec 9, 2020
1c9c367
Added support for working with BufferHandler (#1481)
gvozdb Dec 10, 2020
2bb3ffa
Merge remote-tracking branch 'redmatter/backport-psr-log-message-proc…
Seldaek Dec 10, 2020
e6e43ca
Use Utils::jsonEncode to encode json correctly
Seldaek Dec 10, 2020
bf794fe
Merge pull request #1496 from Pierre-Lannoy/patch-1
Seldaek Dec 10, 2020
4d4637d
Merge pull request #1505 from Kocal/patch-1
Seldaek Dec 10, 2020
6165cdc
Merge pull request #1507 from adrianpanicek/master
Seldaek Dec 10, 2020
5881690
Merge pull request #1512 from perevoshchikov/fix/handler-wrapper
Seldaek Dec 10, 2020
7a2ee8d
Merge pull request #1514 from idevin/patch-1
Seldaek Dec 10, 2020
4b4b172
Merge branch '1.x' into main
Seldaek Dec 10, 2020
c203cf8
Merge remote-tracking branch 'AntonAcc/speed-up-add-record' into main
Seldaek Dec 10, 2020
df4d93f
Simplify addRecord further by doing a single foreach over all handler…
Seldaek Dec 10, 2020
9ab131c
Merge pull request #1503 from gfaugere/redispubsub
Seldaek Dec 10, 2020
31de09b
ADd RedisPubSubHandler to docs, refs #1503
Seldaek Dec 10, 2020
80644c6
Remove unnecessary condition
Seldaek Dec 10, 2020
f8c98ee
Fix typo
Seldaek Dec 10, 2020
d356586
Type hint fixes
Seldaek Dec 10, 2020
9ce0431
Add JSON_PARTIAL_OUTPUT_ON_ERROR, closes #1515
Seldaek Dec 10, 2020
863670f
Avoid sending unicode chars in headers for Wildfire/FirePHPHandler/Ch…
Seldaek Dec 10, 2020
af59ed2
Add FluentdFormatter to docs, fixes #1510
Seldaek Dec 10, 2020
1d5456e
Clarify support situation in readme, fixes #1506
Seldaek Dec 11, 2020
76639ef
Elastica up to 7 support
patrickkusebauch Dec 11, 2020
61e5ff2
Fix more instances of bad FormattableHandlerInterface usages
Seldaek Dec 11, 2020
9fc7a8a
Allow changing the date format after normalizer creation, fixes #1459
Seldaek Dec 11, 2020
79d1213
Fixed new Url
patrickkusebauch Dec 12, 2020
5fbd261
Merge pull request #1523 from patrickkusebauch/feature/Elastica
Seldaek Dec 14, 2020
ff4378d
Mark elasticaFormatters $type arg as deprecated
Seldaek Dec 14, 2020
1850160
Merge remote-tracking branch 'milos-silni/add-support-ms-writetimeout…
Seldaek Dec 14, 2020
3ee78ae
Simplify timeout handling and really allow millisecond precision, ref…
Seldaek Dec 14, 2020
546dc08
Fix comparison
Seldaek Dec 14, 2020
2209ddd
Update changelog
Seldaek Dec 14, 2020
d9cdb68
Merge branch '1.x' into main
Seldaek Dec 14, 2020
1cb1cde
Update changelog
Seldaek Dec 14, 2020
8b3a2a0
Set theme jekyll-theme-midnight
Seldaek Dec 15, 2020
dafbb25
Set theme jekyll-theme-slate
Seldaek Dec 15, 2020
78bd7bd
Fix build badge
Seldaek Dec 15, 2020
0dba253
Add phpstan.neon.dist to .gitattributes export-ignore
reedy Jan 12, 2021
7066e39
When we reset the FilterHandler we should call the handler we are wra…
marcvdm Jan 15, 2021
c6de2d3
Merge pull request #1527 from reedy/patch-1
Seldaek Jan 27, 2021
6e1e130
Merge pull request #1531 from marcvdm/reset-filter-handler
Seldaek Jan 27, 2021
c497cc6
Add docs about reset()
Seldaek Jan 27, 2021
c197198
Fix links in docs
Seldaek Feb 9, 2021
cdba0c5
Deprecated setMethods() usages moving to onlyMethods()
pryazhnikov Feb 27, 2021
227343f
Fix of absent formatAttributes method issue
pryazhnikov Feb 27, 2021
67294a3
Fix of Predis\Client mock creation
pryazhnikov Feb 27, 2021
240a159
Fix of PhpAmqpLib\Channel\AMQPChannel mock creation
pryazhnikov Feb 27, 2021
2bc1351
Fix of SyslogUdpHandler mock creation
pryazhnikov Feb 27, 2021
f680299
#1539 fix timezone when it's DateTimeImmutable
Mar 11, 2021
0e46f88
MailHandler: Use array access to compare first character
glensc Mar 27, 2021
53d53af
Update to handle empty string
glensc Mar 27, 2021
9c26199
Merge pull request #1540 from yi-yang-github/main
Seldaek Apr 4, 2021
0dc10f8
Merge pull request #1545 from glensc/patch-1
Seldaek Apr 4, 2021
c7a5ecc
Fix of DynamoDbClient::formatAttributes
pryazhnikov Apr 4, 2021
812d63b
Fix of incorrect DynamoDB mock creation
pryazhnikov Apr 18, 2021
bac1ddd
Merge pull request #1536 from pryazhnikov/tests_fix_usage_of_deprecat…
Seldaek Apr 18, 2021
df3b93b
Set StreamHandler stream chunk size, fixes #1552
dsch May 7, 2021
2e37d0b
Fix deprecation warning on PHP 8.1
derrabus May 14, 2021
377272d
Merge pull request #1554 from derrabus/bugfix/datetime-on-8.1
Seldaek May 28, 2021
5bf534f
Merge pull request #1553 from dsch/threadsave-stream-handler
Seldaek May 28, 2021
c6b00f0
Update changelog
Seldaek May 28, 2021
5c9d9bf
Merge branch '1.x' into main
Seldaek May 28, 2021
37ab9fc
Adding anchor to link
ThomasLandauer Jun 24, 2021
01d104a
Add Record/Level/LevelName type aliases and improve phpstan type cove…
Seldaek May 28, 2021
13d40f9
More type fixes towards level 7
Seldaek May 28, 2021
4ef5da8
Fix CS
Seldaek May 28, 2021
8b5278d
Bump phpstan to level 8
Seldaek Jul 4, 2021
50729e0
Merge pull request #1557 from Seldaek/phpstan
Seldaek Jul 4, 2021
0f7b11d
Merge pull request #1560 from ThomasLandauer/patch-1
Seldaek Jul 4, 2021
b2ad71d
JsonFormatter::normalize() : respect date format from Formatter
thomasphansen Jul 1, 2021
4b9fdf7
Fix json formatter to call parent constructor
Seldaek Jul 5, 2021
172287b
Merge pull request #1561 from thomasphansen/th_jsonformatter_use_form…
Seldaek Jul 5, 2021
a6eef72
Last phpstan fixes
Seldaek Jul 5, 2021
df991fd
Update changelog
Seldaek Jul 5, 2021
19542ed
Normalize @inheritDoc tags, refs #1557
Seldaek Jul 8, 2021
42384f2
Ignore config file
Seldaek Jul 12, 2021
63e1950
Fix Utils::getClass() with PHP8 (#1563)
villfa Jul 14, 2021
9738e49
Update changelog for 2.3.1
Seldaek Jul 14, 2021
d08c09d
Fix phpstan error
Seldaek Jul 23, 2021
82ab6a5
Fixes php8 non-backward compatible changes (#1568)
juan-morales Jul 23, 2021
7131256
Update changelog
Seldaek Jul 23, 2021
71cf94a
add check for required extension
mimmi20 Jul 27, 2021
d76d691
add checks for required curl extension
mimmi20 Jul 27, 2021
1ad394f
mention some more extensions in composer.json
mimmi20 Jul 27, 2021
173a59f
Update 01-usage.md
pluc Aug 6, 2021
f2156cd
Tweak some type annotations
Seldaek Aug 17, 2021
57e3fe3
Allow psr/log 2.0
Jean85 Jul 14, 2021
203bb1b
Fix CI to allow psr/log v2
nicolas-grekas Sep 13, 2021
0b22036
Add method in Utils to convert memory values from php_ini into bytes,…
Jul 30, 2021
70fe092
Simplify memoryIniValueToBytes, tweak code to use less memory overall
Seldaek Sep 14, 2021
646f0c3
Merge pull request #1578 from juan-morales/fix-oom-streamhandler
Seldaek Sep 14, 2021
4b47204
Fix SocketHandler::getChunkSize return type, fixes #1570, closes #1576
Seldaek Sep 14, 2021
0254465
Merge pull request #1580 from pluc/main
Seldaek Sep 14, 2021
aa4cdc5
Merge pull request #1574 from mimmi20/add-extensions
Seldaek Sep 14, 2021
a4e10e8
Merge pull request #1587 from nicolas-grekas/psr-log2
Seldaek Sep 14, 2021
9638f0d
Merge pull request #1573 from mimmi20/add-extension-checks
Seldaek Sep 14, 2021
73af18b
Merge pull request #1572 from mimmi20/main
Seldaek Sep 14, 2021
493d747
Fix type error
Seldaek Sep 14, 2021
98730fb
Add Nette integration to the README (#1585)
mabar Sep 14, 2021
3962ebf
Update changelog
Seldaek Sep 14, 2021
0f79359
Allow psr/log 3 (#1589)
derrabus Sep 15, 2021
18eb14b
Update changelog
Seldaek Sep 15, 2021
437e7a1
Adjust phpdoc to match the psr/log 3 interface, refs #1589
Seldaek Sep 15, 2021
07a509a
Allow php-amqplib/php-amqplib v3 (#1595)
siwinski Oct 1, 2021
f563e31
Fix the composer.json (#1598)
stof Oct 1, 2021
895066e
Fix the composer.json (#1598)
stof Oct 1, 2021
837ef79
Merge branch '1.x' into main
Seldaek Oct 1, 2021
9d1fed4
Fix insane-memory-limit handling in StreamHandler, fixes #1592
Seldaek Oct 1, 2021
fd4380d
Update changelog
Seldaek Oct 1, 2021
d1c2829
Documentation. Enrich documentation on "Customizing log format". (#1575)
juan-morales Oct 2, 2021
4a11cad
Add constructor injection for `SocketHandler` and its children (#1600)
boesing Oct 13, 2021
df8f91b
Fix old class name (#1604)
ajgarlag Oct 18, 2021
f19a2ae
Add missed classes (#1605)
ajgarlag Oct 18, 2021
fb2c324
Update scripts to latest Composer syntax
Seldaek Nov 15, 2021
4b34c28
Avoid linting file which is problematic on php 7.2
Seldaek Mar 6, 2022
8c58aba
Add AsMonologProcessor attribute (#1637)
fancyweb Mar 6, 2022
030c25c
Addition of a new framework (#1610)
mimou78 Mar 6, 2022
5129fee
Added user_agent to the WebProcessor (#1613)
alexjose Mar 6, 2022
4a32baa
Added Aimeos as Monolog supporter to framework integration section (#…
aimeos Mar 6, 2022
c295434
Add Drupal integration to the README (#1639)
lussoluca Mar 6, 2022
c0ae588
Fix minor spelling & grammar issues in docs (#1623)
gnito-org Mar 6, 2022
16cc886
Fix ErrorHandler::handleError $context signature (#1614)
koenkivits Mar 7, 2022
168bb6e
return self on several setter/builder methods for more consistent beh…
codemasher Mar 7, 2022
832660e
Handling the maximum length of a Telegram message (#1616)
evgeek Mar 7, 2022
baf2d9d
Check whether graylog2/gelf-php is installed in GelfMessageFormatter…
b1rdex Mar 7, 2022
f9a8e87
SlackWebhookHandler: use footer for username & footer_icon for userIc…
whatUwant Mar 13, 2022
6f233d2
Remove unused variable (#1628)
Yurunsoft Mar 13, 2022
56899af
Typo fixes + fix of a broken (404 error) link (#1619)
Levure Mar 13, 2022
b39a394
Store native BSON types as-is in the MongoDB formatter (#1620)
ellotheth Mar 13, 2022
1c8f39a
Allow easier extend of BrowserConsoleHandler.php (#1593)
Warxcell Mar 13, 2022
67100e7
Update changelog
Seldaek Mar 13, 2022
93369fd
Add LogRecord interface for forward compatibility
Seldaek Mar 14, 2022
f764bbd
Add includeStacktraces constructor parameter to LineFormatter & JsonF…
Seldaek Mar 14, 2022
4b22d38
Expand rollbar supported versions
Seldaek Mar 14, 2022
e289293
PHPStan fixes
Seldaek Mar 14, 2022
c02d86f
Include record message/context/extra data when throwing an exception …
Seldaek Mar 14, 2022
b886d70
Fixes
Seldaek Mar 14, 2022
f1f2e3e
Fix fix
Seldaek Mar 14, 2022
330b80c
One day I will learn
Seldaek Mar 14, 2022
d7fd745
Update changelog
Seldaek Mar 14, 2022
affa44f
Fix formatting issue
Seldaek Mar 14, 2022
cb3675e
Try fixing ci
Seldaek Mar 14, 2022
0a023ff
Calculate exception message according to PHP version (#1644)
blueForman Mar 18, 2022
f0e0dba
added information about call type from debug_backtrace (#1612)
jszczypk Mar 18, 2022
77b71e0
Fix syntax
Seldaek Mar 18, 2022
f2f66cd
Fix tests
Seldaek Mar 18, 2022
22c8b19
Add LogRecord class, drop PHP <8.1
Seldaek Feb 20, 2022
400effd
Fix some issues, bump phpunit version
Seldaek Feb 26, 2022
b586dbe
Remove SwiftMailerHandler
Seldaek Feb 27, 2022
5eb9b8e
Code cleanups
Seldaek Mar 5, 2022
657ff7f
Drop support for aws-php-sdk v2 from DynamoDbHandler
Seldaek Mar 5, 2022
6b5bd6a
More cleanups
Seldaek Mar 5, 2022
0aef68c
Remove rollbar for now as it requires monolog 2.x or psr/log 1.x
Seldaek Mar 14, 2022
a3ba644
Cleanups
Seldaek Mar 14, 2022
248673e
Remove at matcher
Seldaek Mar 21, 2022
508df12
Make AsMonologProcessor compatible with PHP 7.2
Seldaek Apr 8, 2022
4c43f12
Link attribute file again
Seldaek Apr 8, 2022
4192345
Update changelog
Seldaek Apr 8, 2022
2d006a8
Convert level/levelName to enums (#1656)
Seldaek Apr 19, 2022
14f39fe
Use never return typehint (#1654)
hemberger Apr 19, 2022
e4bb5c5
Replace switch with match (#1655)
hemberger Apr 19, 2022
2695fa8
CI fixes
Seldaek Apr 19, 2022
7952a83
Move phpdoc to native types
Seldaek Apr 20, 2022
6634bd9
Forgotten config (#1652)
systemsolutionweb Apr 20, 2022
0dac879
Add property types to all properties where possible
Seldaek Apr 21, 2022
a7de8dd
Update a few more callable to Closure
Seldaek Apr 22, 2022
1c80bce
Fix error handler to not receive $context anymore as php8 dropped that
Seldaek Apr 22, 2022
733d6f1
Remove dead code
Seldaek Apr 23, 2022
ad732b3
Update upgrade notes
Seldaek Apr 23, 2022
6627c09
Add phpstan strict rules and deprecation rules, fix all related issues
Seldaek Apr 24, 2022
bd5968a
Add missing types to constructor args
Seldaek Apr 24, 2022
c312cfd
Restore getLevelName but deprecate it
Seldaek Apr 24, 2022
a6a66b1
Fix phpdoc
Seldaek Apr 24, 2022
4c7a12b
Add SymfonyMailerHandler, deprecate SwiftMailerHandler (#1663)
Seldaek May 7, 2022
bd24765
ElasticSearch v8 support (#1662)
Seldaek May 8, 2022
1181473
Merge branch '2.x' into main
Seldaek May 8, 2022
8a35649
Fix ES8 build
Seldaek May 8, 2022
acc142c
Drop prophecy usage
Seldaek May 8, 2022
709cb93
replace deprecated method calls in GelfMessageFormatter (#1664)
jortgies May 8, 2022
de11fc3
Update upgrade notes
Seldaek May 8, 2022
8f6efe9
Allow more time as elastic search sometimes is slow to boot
Seldaek May 8, 2022
354ddc8
Fix changelog
Seldaek May 8, 2022
5eca082
Merge branch '2.x' into main
Seldaek May 8, 2022
a71c4e0
Update changelog
Seldaek May 8, 2022
38fd8ef
Update docs
Seldaek May 8, 2022
2af3276
Update list of handlers
Seldaek May 8, 2022
d381140
Merge branch '2.x' into main
Seldaek May 8, 2022
2a8c7df
Also allow for slow ES8 start
Seldaek May 8, 2022
c709906
[2.X] Allow stacktraces parser on LineFormatter (#1665)
eusonlito May 9, 2022
5d43fd5
Allow UdpSocket to reconnect after close()
Seldaek May 10, 2022
a5d65f6
Fix infinite loops when a log handler triggers logging itself
Seldaek May 10, 2022
1dacc79
Remove LevelName enum in favor of a Level::getName method, fixes #166…
Seldaek May 10, 2022
2479189
Update changelog
Seldaek May 10, 2022
b3451b0
Merge branch '2.x' into main
Seldaek May 10, 2022
60ad518
Update changelog
Seldaek May 10, 2022
9c1566a
Add a way to disable logging loop detection, closes #1681
Seldaek Jun 8, 2022
64854f0
Correct handling of E_USER_ERROR as fatal error if registerErrorHandl…
WoZ Jun 9, 2022
417c27d
Remove return type from ProcessorInterface to fix interop with Monolo…
Seldaek Jun 9, 2022
9992c77
Add warning that docs site is for 3.x, fixes #1679
Seldaek Jun 9, 2022
eac0c22
Mark TestCase internal until PHPStorm handles this better, fixes #1677
Seldaek Jun 9, 2022
8ac56aa
RotatingFileHandler to maintain the correct maximum number files when…
kermage Jun 9, 2022
24e414c
Added $datetime parameter to addRecord method to optionally log into …
Jun 7, 2022
5579edf
Update changelog
Seldaek Jun 9, 2022
0ddba73
Merge branch '2.x' into main
Seldaek Jun 9, 2022
0c37549
Update changelog
Seldaek Jun 9, 2022
3cba75e
Mark Logger @final to discourage extension
Seldaek Jun 19, 2022
100d0f1
is null (#1711)
MathiasReker Jun 21, 2022
1ae4f60
Add basic support to Google Cloud Logging format (#1690)
lcobucci Jul 22, 2022
197f534
Add basic support to Google Cloud Logging format (#1719)
lcobucci Jul 22, 2022
3734f19
Add the ability to set or redefine attributes for messages in Rabbit.…
pmikle Jul 22, 2022
11be0a4
Fix phpstan errors
Seldaek Jul 22, 2022
f958fda
allow Predis 2.0, closes #1732
mimmi20 Jul 9, 2022
af8efac
Check if errorMessage contain error "File exists"
Legion112 Jun 9, 2022
6cc788b
Fix build error with lowest deps on php7.4
Seldaek Jul 22, 2022
475bc87
Fix issues
Seldaek Jul 22, 2022
ffc2bc2
Update .gitattributes, closes #1688
systemsolutionweb Jun 13, 2022
83db4b3
Handle depth to avoid cases where an exception has many too many prev…
Seldaek Jul 22, 2022
27dc1b2
Fix utf8_encode deprecation (#1722)
erikn69 Jul 22, 2022
c1c73b0
Update issue templates
Seldaek Jul 22, 2022
ad09e76
Add php 8.2 build
Seldaek Jul 22, 2022
b3ac20e
Matrix update
Seldaek Jul 22, 2022
3a1ea88
Fix matrix
Seldaek Jul 22, 2022
611ff01
Skip php8.2 default build
Seldaek Jul 22, 2022
9c1fb56
Deprecate CubeHandler and PHPConsoleHandler which are targetting aban…
Seldaek Jul 22, 2022
6fdeea4
Fix build
Seldaek Jul 22, 2022
34635fd
Add docs
Seldaek Jul 22, 2022
1e6a4e1
Remove deprecated handlers from docs
Seldaek Jul 22, 2022
284482a
More test fixes
Seldaek Jul 22, 2022
cf0f4b3
Handle __toString to serialize objects which are not json-serializabl…
Seldaek Jul 22, 2022
7684fae
Merge branch '2.x'
Seldaek Jul 22, 2022
320909a
Fix replaceNewlines method to avoid replacing escaped backslashes, cl…
abordage Jun 26, 2022
a7e5bed
finishing Syslog formatter (#1689)
picass0 Jul 22, 2022
ffd5055
Add RFC 5424 level (7 to 0) support to Logger::log and Logger::addRec…
lussoluca Jul 22, 2022
7d31b64
Merge branch '2.x'
Seldaek Jul 22, 2022
f7dfa00
Add Level::toRFC5424Level method and restore BC to Syslog handlers (b…
Seldaek Jul 22, 2022
4b4fad9
Fix serialization to include private properties, fixes #1727, fixes p…
Seldaek Jul 22, 2022
4e131c1
Merge branch '2.x'
Seldaek Jul 22, 2022
5f839e0
Clean up unneeded use statements, refs #1689
Seldaek Jul 22, 2022
60d9aab
Fix tests
Seldaek Jul 22, 2022
7204886
Update changelog
Seldaek Jul 24, 2022
4149805
Merge branch '2.x'
Seldaek Jul 24, 2022
305444b
Update changelog
Seldaek Jul 24, 2022
620dca1
Update BrowserConsoleHandler console output method (#1739)
pafernandez-oesia Aug 2, 2022
132eace
Fix build
Seldaek Aug 2, 2022
8471abd
Merge branch '2.x'
Seldaek Aug 2, 2022
3d6ffe2
Fix bug with level in GitProcessor
lyrixx Aug 16, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
@@ -1,4 +1,7 @@
/doc export-ignore
/tests export-ignore
/.* export-ignore
/phpstan* export-ignore
/phpunit.xml.dist export-ignore
/_config.yml export-ignore
/UPGRADE.md export-ignore
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
@@ -0,0 +1,2 @@
github: [Seldaek]
tidelift: "packagist/monolog/monolog"
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/Bug_Report.md
@@ -0,0 +1,9 @@
---
name: Bug Report
about: Create a bug report
labels: Bug
---

Monolog version 1|2|3?

Write your bug report here.
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature.md
@@ -0,0 +1,7 @@
---
name: Feature
about: Suggest a new feature or enhancement
labels: Feature
---

Write your suggestion here.
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/Question.md
@@ -0,0 +1,9 @@
---
name: Question
about: Ask a question regarding software usage
labels: Support
---

Monolog version 1|2|3?

Write your question here.
6 changes: 6 additions & 0 deletions .github/SECURITY.md
@@ -0,0 +1,6 @@
# Reporting a vulnerability

If you have found any issues that might have security implications,
please send a report privately to j.boggiano@seld.be

Do not report security reports publicly.
236 changes: 236 additions & 0 deletions .github/workflows/continuous-integration.yml
@@ -0,0 +1,236 @@
name: "Continuous Integration"

on:
- push
- pull_request

jobs:
tests:
name: "CI (PHP ${{ matrix.php-version }}, ${{ matrix.dependencies }} deps)"

runs-on: "${{ matrix.operating-system }}"

strategy:
fail-fast: false

matrix:
php-version:
- "8.1"

dependencies: [highest]

composer-options: [""]

operating-system:
- "ubuntu-latest"

include:
- php-version: "8.1"
dependencies: lowest
operating-system: ubuntu-latest
- php-version: "8.2"
dependencies: highest
operating-system: ubuntu-latest
composer-options: "--ignore-platform-req=php+"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: Run CouchDB
timeout-minutes: 3
continue-on-error: true
uses: "cobot/couchdb-action@master"
with:
couchdb version: '2.3.1'

- name: Run MongoDB
uses: supercharge/mongodb-github-action@1.7.0
with:
mongodb-version: 5.0

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
extensions: mongodb, redis, amqp
tools: "composer:v2"
ini-values: "memory_limit=-1"

- name: Add require for mongodb/mongodb to make tests runnable
run: 'composer require mongodb/mongodb --dev --no-update'

- name: "Change dependencies"
run: |
composer require --no-update --no-interaction --dev elasticsearch/elasticsearch:^7
composer config --no-plugins allow-plugins.ocramius/package-versions true

- name: "Update dependencies with composer"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "${{ matrix.composer-options }}"

- name: "Run tests"
run: "composer exec phpunit -- --exclude-group Elasticsearch,Elastica --verbose"

- name: "Run tests with psr/log 3"
if: "contains(matrix.dependencies, 'highest') && matrix.php-version >= '8.0'"
run: |
composer remove --no-update --dev graylog2/gelf-php ruflin/elastica elasticsearch/elasticsearch rollbar/rollbar
composer require --no-update psr/log:^3
composer update ${{ matrix.composer-options }}
composer exec phpunit -- --exclude-group Elasticsearch,Elastica --verbose

tests-es-7:
name: "CI with ES ${{ matrix.es-version }} on PHP ${{ matrix.php-version }}"

needs: "tests"

runs-on: "${{ matrix.operating-system }}"

strategy:
fail-fast: false

matrix:
operating-system:
- "ubuntu-latest"

php-version:
- "8.1"

dependencies:
- "highest"
- "lowest"

es-version:
- "7.0.0"
- "7.17.0"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

# required for elasticsearch
- name: Configure sysctl limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144

- name: Run Elasticsearch
timeout-minutes: 3
uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: "${{ matrix.es-version }}"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
extensions: mongodb, redis, amqp
tools: "composer:v2"
ini-values: "memory_limit=-1"

- name: "Change dependencies"
run: "composer require --no-update --no-interaction --dev elasticsearch/elasticsearch:^${{ matrix.es-version }}"

- name: "Allow composer plugin to run"
if: "matrix.php-version == '7.4' && matrix.dependencies == 'lowest'"
run: "composer config allow-plugins.ocramius/package-versions true"

- name: "Update dependencies with composer"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Run tests"
run: "composer exec phpunit -- --group Elasticsearch,Elastica --verbose"

- name: "Run tests with psr/log 3"
if: "contains(matrix.dependencies, 'highest') && matrix.php-version >= '8.0'"
run: |
composer remove --no-update --dev graylog2/gelf-php ruflin/elastica elasticsearch/elasticsearch rollbar/rollbar
composer require --no-update --no-interaction --dev ruflin/elastica elasticsearch/elasticsearch:^7
composer require --no-update psr/log:^3
composer update -W
composer exec phpunit -- --group Elasticsearch,Elastica --verbose

tests-es-8:
name: "CI with ES ${{ matrix.es-version }} on PHP ${{ matrix.php-version }}"

needs: "tests"

runs-on: "${{ matrix.operating-system }}"

strategy:
fail-fast: false

matrix:
operating-system:
- "ubuntu-latest"

php-version:
- "8.1"

dependencies:
- "highest"
- "lowest"

es-version:
- "8.0.0"
- "8.2.0"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

# required for elasticsearch
- name: Configure sysctl limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144

- name: Run Elasticsearch
timeout-minutes: 3
uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: "${{ matrix.es-version }}"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
extensions: mongodb, redis, amqp
tools: "composer:v2"
ini-values: "memory_limit=-1"

- name: "Change dependencies"
run: |
composer remove --no-update --dev graylog2/gelf-php ruflin/elastica elasticsearch/elasticsearch rollbar/rollbar
composer require --no-update --no-interaction --dev elasticsearch/elasticsearch:^8

- name: "Allow composer plugin to run"
if: "matrix.php-version == '7.4' && matrix.dependencies == 'lowest'"
run: "composer config allow-plugins.ocramius/package-versions true"

- name: "Update dependencies with composer"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Run tests"
run: "composer exec phpunit -- --group Elasticsearch,Elastica --verbose"

- name: "Run tests with psr/log 3"
if: "contains(matrix.dependencies, 'highest') && matrix.php-version >= '8.0'"
run: |
composer require --no-update psr/log:^3
composer update -W
composer exec phpunit -- --group Elasticsearch,Elastica --verbose
31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
@@ -0,0 +1,31 @@
name: "PHP Lint"

on:
push:
pull_request:

jobs:
tests:
name: "Lint"

runs-on: ubuntu-latest

strategy:
matrix:
php-version:
- "8.1"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
extensions: "intl"
ini-values: "memory_limit=-1"
php-version: "${{ matrix.php-version }}"

- name: "Lint PHP files"
run: "find src/ -type f -name '*.php' -print0 | xargs -0 -L1 -P4 -- php -l -f"
50 changes: 50 additions & 0 deletions .github/workflows/phpstan.yml
@@ -0,0 +1,50 @@
name: "PHPStan"

on:
- push
- pull_request

env:
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"

jobs:
tests:
name: "PHPStan"

runs-on: ubuntu-latest

strategy:
matrix:
php-version:
- "8.1"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
extensions: mongodb, redis, amqp

- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Add require for mongodb/mongodb to make tests runnable
run: 'composer require ${{ env.COMPOSER_FLAGS }} mongodb/mongodb --dev --no-update'

- name: "Install latest dependencies"
run: "composer update ${{ env.COMPOSER_FLAGS }}"

- name: Run PHPStan
run: composer phpstan
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -3,5 +3,6 @@ composer.phar
phpunit.xml
composer.lock
.DS_Store
.php_cs.cache
.php-cs-fixer.cache
.hg
.phpunit.result.cache