Skip to content

Recognize .phpt and .stub files as PHP files#116

Open
williamdes wants to merge 1 commit intozed-extensions:mainfrom
williamdes:patch-1
Open

Recognize .phpt and .stub files as PHP files#116
williamdes wants to merge 1 commit intozed-extensions:mainfrom
williamdes:patch-1

Conversation

@williamdes
Copy link
Copy Markdown

Here is a random example of a phpt file: https://github.com/yvoyer/domain-event/blob/3.0.0/examples/blog.phpt

And I decided to add stub as a php file too given that most stub files are php files.

https://github.com/search?q=path%3A*.stub+%22%3C%3Fphp%22&type=code

@cla-bot cla-bot bot added the cla-signed label Mar 26, 2026
Copy link
Copy Markdown
Contributor

@MrSubidubi MrSubidubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

While I am down for the phpt extension and I definitely see the value for the stub extension, I feel a bit uneasy about the latter one. Could we in an effort to match the stub files perhaps try to update the first line pattern instead to also catch these? Just as a thought so it is a bit more precise in matching and not having too many false positivies.

Not insisting, would like your opinion here

@MrSubidubi MrSubidubi changed the title Add phpt (php test) and stub files as PHP files Recognize .phpt and .stub files as PHP files Apr 17, 2026
@williamdes
Copy link
Copy Markdown
Author

Thanks for this!

While I am down for the phpt extension and I definitely see the value for the stub extension, I feel a bit uneasy about the latter one. Could we in an effort to match the stub files perhaps try to update the first line pattern instead to also catch these? Just as a thought so it is a bit more precise in matching and not having too many false positivies.

Not insisting, would like your opinion here

Well, I read this twice and I am not entirely sure of what I understand
You seem to say that there is parsing to be fixed. And then add the file extension?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants