Skip to content

The use of function filectime() / filemtime() is discouraged #172

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

Open
diazwatson opened this issue Feb 13, 2020 · 0 comments
Open

The use of function filectime() / filemtime() is discouraged #172

diazwatson opened this issue Feb 13, 2020 · 0 comments
Assignees
Labels
proposal New rule proposal

Comments

@diazwatson
Copy link
Contributor

Rule

I saw a warning similar to this in my IDE the other day:

The use of function filectime() / filemtime() is discouraged.

It was not coming from Magento CS but from PHPCS which I am currently using WITH Magento 2 CS.

If this check / warning is already there, would not be helpful to provide developers with some guidance or alternatives on what they can use instead?

Reason

TBC: I am still doing some research to understand WHY the use of this is discouraged. I will complete this section with my findings.

Implementation

This guy proposes to use \Magento\Framework\Filesystem\Driver\File, same we are already advising to use to replace these kind of PHP functions.

@diazwatson diazwatson added the proposal New rule proposal label Feb 13, 2020
@diazwatson diazwatson self-assigned this Feb 13, 2020
magento-devops-reposync-svc pushed a commit that referenced this issue Apr 8, 2022
…magento-coding-standard-384

[Imported] AC-2724: Update rector dependency to the latest version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal New rule proposal
Projects
None yet
Development

No branches or pull requests

1 participant