Giter Site home page Giter Site logo

Comments (4)

kaystrobach avatar kaystrobach commented on July 18, 2024 1

@mgrundkoetter agree

anyway it's time to avoid the annotation and esp. the reflection stuff, as this has several speed implications.

from social_stream.

NamelessCoder avatar NamelessCoder commented on July 18, 2024 1

Just as a side note, the "public still gets reflection-set" is no longer true, at least in master branch of TYPO3. It's still equally not recommended to make a public property with @inject since you're just moving the rule-breaking problem to a too-visible problem.

But whatever you do, you definitely want to use ObjectManager to make your instances.

from social_stream.

kaystrobach avatar kaystrobach commented on July 18, 2024

@mgrundkoetter please do not use the @inject annotation ...

https://twitter.com/NamelessCoder/status/935808807510462465

Did you know that public property plus inject annotation still equals property gets set via Reflection? As in: even if you make it public, Extbase will not assign it as such. See https://t.co/E29KPXt6ej. Unfortunately, https://t.co/kBdnxX05ae is still true.

— Claus Due (@NamelessCoder) 29. November 2017

from social_stream.

mgrundkoetter avatar mgrundkoetter commented on July 18, 2024

@kaystrobach interesting point. As a lot of extensions (like news) still rely on Extbase DI, the object manager should be used nevertheless to not break this "feature" (and others) in other classes. So using GeneralUtility::makeInstance() is still not correct and should be replaced by ObjectManager::get() for anything else than the ObjectManager itself.

from social_stream.

Related Issues (11)

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.