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

[Feature Request]: Add check for Emacs UTF-8 file header #50

Closed
tyrann0us opened this issue Jun 25, 2021 · 1 comment · Fixed by #77
Closed

[Feature Request]: Add check for Emacs UTF-8 file header #50

tyrann0us opened this issue Jun 25, 2021 · 1 comment · Fixed by #77

Comments

@tyrann0us
Copy link
Member

tyrann0us commented Jun 25, 2021

Is your feature request related to a problem? Please describe.
At Inpsyde, PHP files used to have the following file header:

<?php # -*- coding: utf-8 -*-

or

<?php declare(strict_types=1); // -*- coding: utf-8 -*-

As of 2021-06-25, there are more than 15.000 PHP files with this header. It originates from Emacs and including it was adapted by developers undiscussed for years.

However, (nowadays) it doesn't make any sense to keep it. In fact, it is no longer used in most new packages and should be removed gradually from legacy packages too.

Describe the solution you'd like

  • Add a coding standard check for the header that warns the user if the header is present.
  • Make sure that phpcbf deletes it.

Describe alternatives you've considered
None.

Additional context
None.

@gmazzap gmazzap changed the title Add check for Emacs UTF-8 file header [Feature Request]: Add check for Emacs UTF-8 file header Aug 30, 2023
@antonioeatgoat antonioeatgoat self-assigned this Oct 27, 2023
@antonioeatgoat antonioeatgoat linked a pull request Oct 27, 2023 that will close this issue
3 tasks
@gmazzap
Copy link
Contributor

gmazzap commented Nov 17, 2023

Fixed in #77

@gmazzap gmazzap closed this as completed Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants