Code Monkey home page Code Monkey logo

symfony-journey's People

Contributors

bocharsky-bw avatar dsteplight avatar ifdattic avatar keefekwan avatar leannapelham avatar pborreli avatar weaverryan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

symfony-journey's Issues

The container screencast should not say that you can use anything as id

Ids are always lowercase in the container. So if you try to set logger and then LOGGER later, it will actually overwrite the previous service.
Thus, Symfony optimizes the code path to retrieve services with their lowercase id (some improvements have been made, and others are still pending in PRs at this time). so using a non-lowercase id when calling get() will give you a performance penalty (which is not negligeable in case you retrieve lots of services. Ask the Drupal guys who asked for and contributed some of these optimizations)

Thus, using special chars will create issues once you start defining definitions and dumping the compiled container to PHP. The only valid characters when dumping containers are chars allowed in PHP identifiers (letters, digits and some unicode chars), underscores, dots and backslashes (with some conflicts in case you have 2 service ids differing only by a backslash vs a dot in the same place btw, or by an underscore vs no char).
This is why the Symfony best practices are to use dot-separated snake case parts when builing the id.

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.