Coder Social home page Coder Social logo

Stop requiring a container about route HOT 5 CLOSED

thephpleague avatar thephpleague commented on July 3, 2024
Stop requiring a container

from route.

Comments (5)

philipobenito avatar philipobenito commented on July 3, 2024

Currently it is a hard dependency as DI is a big part of the strategy functionality but this is being looked at for possibly splitting out in v2.

Sent from my iPhone

On 21 May 2015, at 17:17, Woody Gilk [email protected] wrote:

There's no particular reason that league/container is a hard dependency, as it is only required when using the "Class Method" type of dispatching. Instead of being a required dependency, it should be suggested.

This would make it possible to avoid using league/container completely for those of us that prefer a different DI implementation.


Reply to this email directly or view it on GitHub.

from route.

shadowhand avatar shadowhand commented on July 3, 2024

I have to disagree with it being a "hard dependency", because it is only optional in AbstractStrategy.

from route.

philipobenito avatar philipobenito commented on July 3, 2024

Every class based controller is built via the container when using the strategies provided, so, yes it is currently a big part of the dispatch process, however, as I said, it is looking likely that the strategies will be split out, therefore allowing the container dependency to be moved to the strategy.

Sent from my iPhone

On 21 May 2015, at 17:33, Woody Gilk [email protected] wrote:

I have to disagree with this, because it is only optional in AbstractStrategy.


Reply to this email directly or view it on GitHub.

from route.

shadowhand avatar shadowhand commented on July 3, 2024

Exactly my point... it is only necessary when you use a classes as part of the strategy. Implementing a custom strategy allows me to avoid the container completely, but I cannot avoid having it installed. Hence, it should be suggested only.

from route.

philipobenito avatar philipobenito commented on July 3, 2024

This would be a breaking change to the package as a whole so it cannot be removed for v1, however, as the package allows you to do as you wish without using the container you are not required to use it. As stated, it's being reassessed for v2.

Sent from my iPhone

On 21 May 2015, at 17:50, Woody Gilk [email protected] wrote:

Exactly my point... it is only necessary when you use a classes as part of the strategy. Implementing a custom strategy allows me to avoid the container completely, but I cannot avoid having it installed. Hence, it should be suggested only.


Reply to this email directly or view it on GitHub.

from route.

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.