-
Notifications
You must be signed in to change notification settings - Fork 4
Add error logger to the PX engine tools #26
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## main #26 +/- ##
============================================
+ Coverage 55.26% 55.62% +0.36%
- Complexity 409 412 +3
============================================
Files 61 62 +1
Lines 950 960 +10
============================================
+ Hits 525 534 +9
- Misses 425 426 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
cec8b19
to
d9ca658
Compare
src/Engine.php
Outdated
* @return Analysis Page experience analysis. | ||
*/ | ||
public function analyze($url, ConfigurationProfile $profile) | ||
public function analyze($url, ConfigurationProfile $profile, LoggerInterface $logger) |
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.
The logger should not be injected by calling the analyze()
or optimize()
methods, but rather be injected via the constructor and stored as a property $this->logger
.
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.
Within the constructor, the ToolStackFactory
should also be instantiated with the logger.
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.
@schlessera Updated the code. Please take a look.
Fixes #19.
This PR adds PSR-3 standard logger support for the analyzer and the optimizer tools that can be provided by the Engine object and used by the PX engine consumer.
To-do: