Comments (15)
@f3l1x Why is it not enabled by default?
from console.
I don't think this is necessary at this point. https://symfony.com/blog/new-in-symfony-3-4-lazy-commands
from console.
@enumag Thanks for the link. That looks cool. I have to figure only thing out - CommandLoader
.
from console.
@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.
@enumag It looks easy, you're right.
PSR-11 is already in my roadmap -https://github.com/contributte/psr11-container-interface
from console.
@f3l1x Are you planning to add PSR-11 intertface to Nette/DI container directly or just make an adapter like I did?
from console.
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.
@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.
@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.
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.
@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.
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.
I'm in, how do you want to detect it?
from console.
How about simply testing existence of the CommandLoaderInterface
?
from console.
Well, I like my solution more. I don't like to depend a version check on class_exists
function.
from console.
Related Issues (20)
- Bump PHP 7.1
- Entrypoint - ล patnรก detekce wwwDir HOT 4
- Provide CLI mode, e.q. Contributte\Console\DI\ConsoleExtension(%consoleMode%). HOT 1
- Autoconfigure event dispatcher if available
- Nette 3.0 compatiblity issue
- Lazy mode, BC break? HOT 1
- Basic commands [idea] HOT 7
- The option 'console โบ version' expects to be string, float given. HOT 1
- PHP 7.3 support HOT 1
- Allow nullable url
- There is not any default HelperSet? HOT 4
- Not able to build without helperSet HOT 3
- Any ETA on stable version supporting PHP 8? HOT 1
- Lazy commands and callInjects HOT 13
- Packages and PHP requirements update HOT 2
- Get rid of foo in sake of newbies HOT 4
- ConsoleExtension doesn't support `Nette\DI\Statement` HOT 1
- Compatibility with contributte/di 0.6.* HOT 2
- Support for nette 3.1 and nette/utils 4.0 HOT 4
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 console.