Comments (4)
@cleentfaar If you look at the validation logic, you would see that the logger passed in itself could be wrong and in that case we fall back to the DefaultLogger
.
Let me think about this more and look at your PR, but I think this problem would go away if all your data is valid.
from php-sdk.
What do you mean with a wrong logger? According to your constructor, it must implement the LoggerInterface
or be null, in which case the NoOpLogger
is used, right? I don't see how a logger can be 'wrong' here.
You could improve ProjectConfig
's constructor by typehinting it's arguments, but that is only for theoretical purposes; it could never get the wrong logger with the way Optimizely
class is currently setup.
I also don't see why a 'wrong' logger should (silently!) fail; clearly the user has implemented it incorrectly and should be notified of that (throw exception). Silencing every (fundamental) error because you rely on a DefaultLogger
is not the way to go imo.
from php-sdk.
@cleentfaar I see your point. Will review your change more closely.
Thanks for the explanation.
from php-sdk.
This might no longer be an issue. Will close out. Please re-open if needed.
from php-sdk.
Related Issues (9)
- phpdoc on addNotificationListener incorrect HOT 2
- PHP 7.4 support (upgrade monolog, dependencies) HOT 7
- Wrong phpdocs for method `lookup` in interface UserProfileServiceInterface HOT 3
- Deprecated: Creation of dynamic property Optimizely\ProjectConfigManager\HTTPProjectConfigManager::$isDatafileAccessTokenValid is deprecated HOT 2
- Deprecated: Creation of dynamic property Optimizely\Utils\CustomAttributeConditionEvaluator::$logger is deprecated
- monolog version HOT 2
- Undefined Method on GuzzleHttp\Client When Using v5.3 HOT 2
- Unable to install using composer HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-sdk.