Giter VIP home page Giter VIP logo

Comments (26)

hlohaus avatar hlohaus commented on July 18, 2024 3

or PSR-4 👍

from smarty.

SvenRtbg avatar SvenRtbg commented on July 18, 2024 3

PSR-0 works for everything that does not use namespaces, but can be made to conform to a specific file layout.

PSR-4 requires namespaces. Smarty doesn't use namespaces. So PSR-4 isn't available.

Switching Smarty to namespaces will be an incompatible change, which should be released as a new major version, i.e. Smarty 4.

from smarty.

uwetews avatar uwetews commented on July 18, 2024 2

I agree that PSR-0 looks for now to be the better solution. But this also requires changes in the folder structure and the renaming of some classes. This will create some backward compatibility issues.
For that reason it is not a good idea to implement it in 3.1.

I have done it in my local 3.2 version.
I expect to provide an alpha release of 3.2 within the next 2 month.

from smarty.

atayahmet avatar atayahmet commented on July 18, 2024

exactly.

from smarty.

bigbigant avatar bigbigant commented on July 18, 2024

Looking forward to that.

from smarty.

Gemorroj avatar Gemorroj commented on July 18, 2024

👍

from smarty.

ipranjal avatar ipranjal commented on July 18, 2024

@hlohaus PSR-4 would also work !

from smarty.

uwetews avatar uwetews commented on July 18, 2024

PSR-0 autoloading is deprecated. So we will look into PSR-4 compatibility.
This will require a change in folder structure and maybe the renaming of some classes.
I did put this on the TODO list for one of the next releases.

from smarty.

ipranjal avatar ipranjal commented on July 18, 2024

ok

from smarty.

remicollet avatar remicollet commented on July 18, 2024

PSR-4 ? seriously ?
then don't forget to introduce nameapace with a "vendor" top level.

from smarty.

lunika avatar lunika commented on July 18, 2024

+1 with @SvenRtbg

from smarty.

roadster31 avatar roadster31 commented on July 18, 2024

👍 @SvenRtbg

from smarty.

ipranjal avatar ipranjal commented on July 18, 2024

Thats why i suggested plain PSR-0

from smarty.

pm-j avatar pm-j commented on July 18, 2024

Hi,
I have tried to implement psr in smarty but it seems not to work even if I have no error in my log.
Have you a psr compatible version released ?
Thanks

from smarty.

SvenRtbg avatar SvenRtbg commented on July 18, 2024

@pm-j Smarty provides it's own autoloader in addition to the Composer definition. Have you considered using it?

from smarty.

caucik avatar caucik commented on July 18, 2024

@uwetews What is the current target date for 3.2 with namespaces?

from smarty.

SvenRtbg avatar SvenRtbg commented on July 18, 2024

Smarty 3.2 cannot have namespaces because that would be an incompatible change.

from smarty.

ipranjal avatar ipranjal commented on July 18, 2024

Any updates on getting into PSR-4 ?

from smarty.

AnrDaemon avatar AnrDaemon commented on July 18, 2024

PSR-4 requires namespacing, this is best left to Smarty 3.2.

from smarty.

ipranjal avatar ipranjal commented on July 18, 2024

3yrs down the line , any update on this ?

from smarty.

troy-rudolph avatar troy-rudolph commented on July 18, 2024

The autoloading used with Smarty causes troubles with AspectMock. Could you please conform to PSR-0 for now, and then do PSR-4 in a major release? Thank you for all the hard work.

from smarty.

AnrDaemon avatar AnrDaemon commented on July 18, 2024

If AspectMock have issues with standard autoloading schemes, raise it with that AspectMock thing.

from smarty.

troy-rudolph avatar troy-rudolph commented on July 18, 2024

It does not appear to me that Smarty uses standard autoloading. If I am wrong, please correct me. But, I can think of three nonstandard things right now.

from smarty.

AnrDaemon avatar AnrDaemon commented on July 18, 2024

It does, since December 2018.

from smarty.

matiasperrone avatar matiasperrone commented on July 18, 2024

Shouldn't be this issue closed?

from smarty.

ipranjal avatar ipranjal commented on July 18, 2024

Old issue- waiting for PSR 4 support

from smarty.

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.