Git Product home page Git Product logo

Comments (15)

enumag avatar enumag commented on May 14, 2024 1

@f3l1x Why is it not enabled by default?

from console.

enumag avatar enumag commented on May 14, 2024

I don't think this is necessary at this point. https://symfony.com/blog/new-in-symfony-3-4-lazy-commands

from console.

f3l1x avatar f3l1x commented on May 14, 2024

@enumag Thanks for the link. That looks cool. I have to figure only thing out - CommandLoader.

from console.

enumag avatar enumag commented on May 14, 2024

@f3l1x That should be easy, right? The default ContainerCommandLoader from symfony is for PSR-11 container. So you either implement your own for Nette DI or use the default one with Arachne/ContainerAdapter.

from console.

f3l1x avatar f3l1x commented on May 14, 2024

@enumag It looks easy, you're right.

PSR-11 is already in my roadmap -https://github.com/contributte/psr11-container-interface

from console.

enumag avatar enumag commented on May 14, 2024

@f3l1x Are you planning to add PSR-11 intertface to Nette/DI container directly or just make an adapter like I did?

from console.

f3l1x avatar f3l1x commented on May 14, 2024

PSR-11 into Nette/DI is little bit complicated, I have to discuss it with @dg. For now I would like to create just an adapter.

from console.

enumag avatar enumag commented on May 14, 2024

@f3l1x In my opinion it's useless to create another PSR-11 adapter package since I already have one only to deprecate it a few months later when we figure out a way to add it to Nette DIC directly.

But if you still want to make your own and force me to deprecate my package and switch dependecies, I can live with it. If you find anything useful in my package feel free to copy-paste it.

from console.

f3l1x avatar f3l1x commented on May 14, 2024

@enumag I'm very glad that you said that. I think there are many useful packages. I've invited you to our private slack (contributte, planette, etc..). Please contact me there ;-)

from console.

f3l1x avatar f3l1x commented on May 14, 2024

This is ready & hot.

If you use symfony/console: <3.4, there's no change for you.

If you use symfony/console: >=3.4, you have to enable lazy-loading.

console:
    lazy: true

That's all. ๐ŸŽ‰

from console.

f3l1x avatar f3l1x commented on May 14, 2024

@enumag Because of versions, this extension support symfony/console 3.2,3.3 and the new one 3.4. It will be default in next releases.

Does it make sence?

from console.

enumag avatar enumag commented on May 14, 2024

It does although I'd probably do it differently: do you have 3.4+, great you have it lazy... oh legacy 3.2/3.3? no laziness for you...

I'd probably not even bother with implementing the option. :-D

from console.

f3l1x avatar f3l1x commented on May 14, 2024

I'm in, how do you want to detect it?

from console.

enumag avatar enumag commented on May 14, 2024

How about simply testing existence of the CommandLoaderInterface?

from console.

f3l1x avatar f3l1x commented on May 14, 2024

Well, I like my solution more. I don't like to depend a version check on class_exists function.

from console.

Related Issues (20)

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.