Coder Social home page Coder Social logo

Comments (14)

nikolaposa avatar nikolaposa commented on June 2, 2024 1

@alexpts Why do you think that is needed, what change you would made? MonologFactory already requires nikolaposa/cascader:^1.0 so running: composer update --with-dependencies nikolaposa/monolog-factory should update Cascader to the latest version.

from monolog-factory.

alexpts avatar alexpts commented on June 2, 2024

I will make PR for repo cascader

from monolog-factory.

alexpts avatar alexpts commented on June 2, 2024

I prepare PR. It will work:

$loggerFactory = new LoggerFactory();

$logger = $loggerFactory->createLogger('logger', [
    'handlers' => [
        [
            'name' => BufferHandler::class,
            'options' => [
                'handler' => [
                    '__class__' => NativeMailerHandler::class,
                    'options' => [
                        'to' => '[email protected]',
                        'subject' => 'Test',
                        'from' => '[email protected]',
                        'level' => Logger::ALERT,
                        'formatter' => [
                            'name' => HtmlFormatter::class,
                        ],
                    ],
                ]
            ]
        ]
    ]
]);

from monolog-factory.

nikolaposa avatar nikolaposa commented on June 2, 2024

Hi @alexpts, are you sure your first example doesn't work? What do you end up with after running it? I have a similar case covered in my tests: https://github.com/nikolaposa/monolog-factory/blob/master/tests/LoggerFactoryTest.php#L225

from monolog-factory.

nikolaposa avatar nikolaposa commented on June 2, 2024

Ok, I got it, it won't work in case of interface parameter type hints. Thanks for reporting this!

from monolog-factory.

alexpts avatar alexpts commented on June 2, 2024

I will wait release with updated version cascader package. Thanks!

from monolog-factory.

nikolaposa avatar nikolaposa commented on June 2, 2024

Issue is fixed with the latest (1.1.0) release of nikolaposa/cascader. Please update.

from monolog-factory.

alexpts avatar alexpts commented on June 2, 2024

I mean new version nikolaposa/monolog-factory package :)

from monolog-factory.

alexpts avatar alexpts commented on June 2, 2024

You are right :)

from monolog-factory.

nikolaposa avatar nikolaposa commented on June 2, 2024

But you know what, perhaps I should explicitly require cascader:^1.1 and bump patch version of MonologFactory so that folks are aware of that change. I think I'll do that.

from monolog-factory.

nikolaposa avatar nikolaposa commented on June 2, 2024

@alexpts Done. Can you please try running composer update nikolaposa/monolog-factory in your project and see whether both Monolog Factory and Cascader will be updated? Thanks.

from monolog-factory.

alexpts avatar alexpts commented on June 2, 2024

Thanks!

from monolog-factory.

alexpts avatar alexpts commented on June 2, 2024

New correct config:

$loggerFactory = new LoggerFactory();

$logger = $loggerFactory->createLogger('logger', [
    'handlers' => [
        [
            'name' => BufferHandler::class,
            'options' => [
                'handler' => [
                    '__class__' => NativeMailerHandler::class,
                    'to' => '[email protected]',
                    'subject' => 'Test',
                    'from' => '[email protected]',
                    'level' => Logger::ALERT,
                    'formatter' => [
                        'name' => HtmlFormatter::class,
                    ],
                ]
            ]
        ]
    ]
]);

from monolog-factory.

nikolaposa avatar nikolaposa commented on June 2, 2024

Cool, thanks a lot for the help

from monolog-factory.

Related Issues (7)

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.