Closed scottchiefbaker closed 6 months ago
Would you consider letting me recreate the /libs/
directory and putting this file in there? That would make this almost a drop in replacement for Smart 3.x and 4.x for us non-composer users. Then the only difference would be:
$smarty = new Smarty(); // Smarty 3.x and 4.x
// Versus
$smarty = new Smarty\Smarty(); // Smarty 5.x
Yes, that seems fine!
Excellent. I recreated the libs/
folder and put the PSR-4 file in there. I've tested the changes and everything seems to be working now.
PR updated with your requested fixes.
@wisskid do you need anything else from me on this?
@scottchiefbaker this has been merged (with a changelog) as https://github.com/smarty-php/smarty/pull/1019. Thanks!
This is to help address #999. I created a fake "class" script that acts as a PSR-4 loading script. For Smarty 3.x and 4.x I would instantiate Smarty with:
With this new script I can instantiate Smarty 5.x with:
This should help backwards compatible usability for old users like me. It'd be great if this script could live in
/libs/
to be 99% backwards compatible, but that directory doesn't exist anymore.