-
Notifications
You must be signed in to change notification settings - Fork 37
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
Resolves broken tests on local and adds GH actions pipeline #63
Resolves broken tests on local and adds GH actions pipeline #63
Conversation
* | ||
* @return string | ||
*/ | ||
public function __serialize() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is throwing a type error in tests on 7.4
…ation test, uses mocks for testing elastic locally, some other cleanup
@@ -14,6 +14,7 @@ | |||
<testsuites> | |||
<testsuite name="AuditStash Test Suite"> | |||
<directory>./tests/TestCase</directory> | |||
<exclude>./tests/TestCase/Persister/ElasticSearchPersisterIntegrationTest.php</exclude> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be run in github action now: cnizzardini#1
* @return mixed | ||
*/ | ||
public function jsonSerialize(): mixed | ||
#[\ReturnTypeWillChange] | ||
public function jsonSerialize() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is proper way to deal with deprecation notices in php 8 while maintaining BC.
$client = $this->getConnection(); | ||
$documents = $this->transformToDocuments($auditLogs); | ||
|
||
$connection = $this->getConnection(); | ||
$client = $connection->getDriver(); | ||
$client->addDocuments($documents); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might need someone who is actually using elastic to look at it, but it passes the pipeline.
->method('log') | ||
->with( | ||
'[AuditStash\Persister\TablePersister] Persisting audit log failed. Data:' . PHP_EOL . | ||
Debugger::exportVar($logged, 4) | ||
); | ||
->method('log'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue with created datetime zone on the logged entity in some php versions so I removed the full arg check.
@lorenzo is this no longer maintained? |
@cnizzardini not using this anymore, but I try to be a good open source citizen and merge things whenever I find the time. Thanks for your contribution! |
@cnizzardini let me know if you would like to become a maintainer and I can give you commit bits |
Not sure I have the time or the deeper knowledge of all bits of this library to fully maintain it. I'd be fine maintaining it with a group of people though. Are there are any other contributors you can think of to add as well @lorenzo ? |
This PR adds github actions pipeline so the library can be tested in all supported versions of CakePHP and PHP. It also resolves a number of errors, typos and inaccurate comments.
Resolves #62
Looking at the last PR some users @swiffer @gildonei and others may take issue with removing the mixed return type, but it seems as though that PR may have broken installs running 7.2 - 7.4.
If this PR is approved I suggest forcing PRs to pass checks, updating build image on readme, and ideally adding coveralls.io so we can see coverage statics.