Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smarty should be PSR-0 compatible for autoloading #15

Closed
ipranjal opened this issue Jan 24, 2015 · 26 comments
Closed

smarty should be PSR-0 compatible for autoloading #15

ipranjal opened this issue Jan 24, 2015 · 26 comments

Comments

@ipranjal
Copy link

No description provided.

@atayahmet
Copy link

exactly.

@bigbigant
Copy link

Looking forward to that.

@Gemorroj
Copy link

👍

@hlohaus
Copy link

hlohaus commented Mar 11, 2015

or PSR-4 👍

@ipranjal
Copy link
Author

@hlohaus PSR-4 would also work !

@uwetews
Copy link
Contributor

uwetews commented Mar 11, 2015

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.

@ipranjal
Copy link
Author

ok

@remicollet
Copy link

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

@SvenRtbg
Copy link
Contributor

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.

@lunika
Copy link

lunika commented May 29, 2015

+1 with @SvenRtbg

@roadster31
Copy link

👍 @SvenRtbg

@ipranjal
Copy link
Author

Thats why i suggested plain PSR-0

@uwetews
Copy link
Contributor

uwetews commented Jun 1, 2015

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.

@pm-j
Copy link

pm-j commented Jan 14, 2016

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

@SvenRtbg
Copy link
Contributor

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

@caucik
Copy link

caucik commented Mar 16, 2016

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

@SvenRtbg
Copy link
Contributor

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

@ipranjal
Copy link
Author

ipranjal commented Oct 1, 2016

Any updates on getting into PSR-4 ?

@AnrDaemon
Copy link
Contributor

AnrDaemon commented Aug 18, 2017

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

@ipranjal
Copy link
Author

ipranjal commented Sep 7, 2018

3yrs down the line , any update on this ?

@troy-rudolph
Copy link

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.

@AnrDaemon
Copy link
Contributor

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

@troy-rudolph
Copy link

troy-rudolph commented Jul 18, 2019

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.

@AnrDaemon
Copy link
Contributor

It does, since December 2018.

@matiasperrone
Copy link

Shouldn't be this issue closed?

@ipranjal
Copy link
Author

ipranjal commented Aug 4, 2020

Old issue- waiting for PSR 4 support

think-mcunanan pushed a commit to think-mcunanan/smarty that referenced this issue Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests