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

Add support for PHP 8.0 features #88

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

miken32
Copy link

@miken32 miken32 commented Nov 25, 2020

This PR adds basic support for a number of features added in PHP versions 7.4 and 8.0. Resolves #84

@miken32
Copy link
Author

miken32 commented Nov 26, 2020

This code seems pretty unmaintained, is anyone actively monitoring for issues/PRs? @sorbits?

@miken32
Copy link
Author

miken32 commented Dec 3, 2020

@infininight ? Bueller?

@ondrejmirtes
Copy link

Hi, @miken32 I just forked this project at https://github.com/ondrejmirtes/php.tmbundle and merged your PR. I can do some of the features myself, but I'd like your help with adding union types from PHP 8 which aren't currently highlighted correctly.

I'm doing this because GitHub itself uses php.tmbundle to highlight PHP code on the website with https://github.com/github/linguist.

@miken32
Copy link
Author

miken32 commented Dec 8, 2021

I moved on to PHPStorm, not using TM much any more since it's pretty stagnant. It's simple regex code, should be pretty easy to add union types. Good luck! @ondrejmirtes

@miken32
Copy link
Author

miken32 commented Dec 8, 2021

@ondrejmirtes for return type I think this is the line you'd need to alter: https://github.com/ondrejmirtes/php.tmbundle/blob/master/Syntaxes/PHP.plist#L1991

@mkopinsky
Copy link

@ondrejmirtes I see they merged github-linguist/linguist#5677 pointing to your fork, but on Github diffs, the token enum isn't highlighted specially:
CleanShot 2024-12-03 at 14 12 05@2x

Do you know if this is a case that was missed in your fork, or if it's something that got lost in the various steps between your fork -> linguist -> github web?

@ondrejmirtes
Copy link

@mkopinsky My fork only supports 8.0 features as the title states. If you send a PR for 8.1 features and beyond, I'm happy to merge it.

@mkopinsky
Copy link

I thought from the commit message that 7f704e6 would have covered it. I haven't tried to dive into the details of tmbundles to understand what's going on in that XML.

Maybe some other time I'll try to dive in and do an 8.1 PR.

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

Successfully merging this pull request may close these issues.

Incorrect highlighting with PHP 7.3 heredoc strings
3 participants