Giter Club home page Giter Club logo

Comments (4)

aliabbasrizvi avatar aliabbasrizvi commented on June 18, 2024

@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.

cleentfaar avatar cleentfaar commented on June 18, 2024

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.

aliabbasrizvi avatar aliabbasrizvi commented on June 18, 2024

@cleentfaar I see your point. Will review your change more closely.

Thanks for the explanation.

from php-sdk.

mikeproeng37 avatar mikeproeng37 commented on June 18, 2024

This might no longer be an issue. Will close out. Please re-open if needed.

from php-sdk.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.