Skip to content

[3.x] Remove unnecessary uses of deprecated strftime() #15999

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

Merged
merged 2 commits into from
Jan 25, 2022

Conversation

JoshuaLuckers
Copy link
Contributor

What does it do?

Replace the function strftime with date where possible.
If the format paramater comes from a variable the strftime function is not replaced since this means a breaking change.

Why is it needed?

In PHP 8.1 the function strftime is deprecated.

How to test

Use PHP 8.1 and see a lot less deprecation warnings.

Related issue(s)/PR(s)

Resolves #15988
Related to #15864

@cla-bot cla-bot bot added the cla-signed CLA confirmed for contributors to this PR. label Jan 25, 2022
@Ibochkarev Ibochkarev added this to the v3.0.0-rc2 milestone Jan 25, 2022
@Ibochkarev Ibochkarev added the pr/review-needed Pull request requires review and testing. label Jan 25, 2022
@JoshuaLuckers
Copy link
Contributor Author

@theboxer thank you!

@Ruslan-Aleev
Copy link
Collaborator

Why is the time format different in some files? Maybe it's worth bringing to the same format (where it possible)?

@opengeek opengeek merged commit 36a1b9c into modxcms:3.x Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed CLA confirmed for contributors to this PR. pr/review-needed Pull request requires review and testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants