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

PHP9 support #810

Open
wisskid opened this issue Sep 22, 2022 · 5 comments
Open

PHP9 support #810

wisskid opened this issue Sep 22, 2022 · 5 comments
Labels
enhancement major requires new major

Comments

@wisskid
Copy link
Contributor

wisskid commented Sep 22, 2022

strftime

Provide a wrapper for strftime (to be removed in PHP9), possibly using alphp/strftime.
This will require a new major, since alphp/strftime requires ext-intl.

@lkppo
Copy link

lkppo commented Sep 4, 2023

Why try to emulate strftime() and for how long? You might as well align with PHP by offering two formatters [one for date() and another for Intl] or none.

@eczio
Copy link

eczio commented Sep 4, 2023

I think that there is definitely no need to depend on the !mandatory use of certain extensions such as 'ext-intl' and especially third-party libraries, there should be a way to implement this functionality without this for the new Smarty 5, this would be the best option. As a last resort, if the functionality for some reason cannot be implemented in full as before, which is unlikely, then it is necessary to check for the presence of this extensions and if it is not present, use a different implementation. Also the vast majority of template engines and even large frameworks do not require the use of any extensions to work correctly, which is correct and does not scare away some part of users.

@wisskid
Copy link
Contributor Author

wisskid commented Sep 5, 2023

Please see #672 (comment) and below. It's not as straightforward as you might think. But if you see a solution that does not require an extension, this would of course be preferred.

@eczio
Copy link

eczio commented Sep 6, 2023

Well, I hope that we can still find some solution without using an additional 'ext-intl' extension. In any case, I think it would be absolutely correct not to require it forcibly and if it is not present, for example, use an implementation similar with symfony/polyfill-intl-icu with only supports the 'en' locale or something else, it will be enough for the vast majority of users.

@wxiaoguang
Copy link
Contributor

Agree with lkppo, I think maybe it's time to get rid of strftime if it is not a must. Developers who still need strftime could polyfill it by themselves? (By reading some old issues & comments, I didn't figure out why strftime should be a must for new Smarty releases)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement major requires new major
Projects
None yet
Development

No branches or pull requests

4 participants