Sublime Forum

Updates to PHP.tmLanguage

#1

Who maintains the packages included with Sublime Text 2, such as the PHP package? It appears that the language grammar is out of date.

I’m the maintainer of the PHP bundle for TextMate and have been evaluating Sublime. I noticed that you’re using the PHP grammar from TextMate, but it appears to be outdated. The version shipping with Sublime (2165, anyway) doesn’t have support for some of the new features from PHP 5.3 (namespaces, anonymous functions, etc.). Copying php.tmbundle/Syntaxes/PHP.plist from the current version of the TextMate bundle to ~/Library/Application Support/Sublime Text 2/Packages/PHP/PHP.tmLanguage seems to have properly updated syntax highlighting.

Any ideas on how to get the new version included?

0 Likes

#2

Email Jon :smile:

I don’t know his email address though, perhaps jps@sublimetext.com

Do you have a link? I’ve always thought that the tmLanguage was out of date.

0 Likes

#3

Indeed. An update has been requested a couple of times, for instance here: sublimetext.userecho.com/topic/9 … hting-bug/ Apparently Jon checks that forum occasionally, but I guess he has a lot to do.

0 Likes

#4

Do you have a link to the tmLanguage file too?

0 Likes

#5

To get in touch with Jon, try support@sublimetext.com

0 Likes

#6

@jb: try this github.com/textmate/php.tmbundl … /PHP.plist

would be awesome if someone converts the whole package to work on windows. :smiley:

0 Likes

#7

Awesome :smiley:

I for one would love all of PHP to be updated, since I am by my job description a PHP developer.

0 Likes

#8

[pre=#0C1021]def test__TMEnvironment():
fix = load_fixture(‘t1.html’, sels = (180, 287)],
syntax = ‘HTML/HTML.tmLanguage’)

cmd = TMCommand("TextMate\Commands\Go To File.plist", fix)
env = cmd.env
assert 'TM_FILENAME' in env

assert env'TM_COMMENT_START'] == '<!-- '
assert env"TM_DO_NOT_EDIT"]   == "myopic"

assert cmd.file
assert cmd.bundle.path
assert cmd.bundle.support_path

assert env'TM_MODE'] == 'HTML'[/pre]

I’d started on a TextMate tmCommand runner for @kuroir but the OSX vm I had all of a sudden stopped booting one day … only have an old version on my windows machine (tmCommand runner not much use on windows) … will see if I can dig it up …

0 Likes

#9

For what it’s worth, importing the textmate PHP.plist file as described above no longer works. It appears sometime in the last year, one of the changes that infininight submitted to textmate broke interoperability with sublimetext2:
github.com/textmate/php.tmbundl … /PHP.plist

If you go back to at least this revision:
github.com/textmate/php.tmbundl … /PHP.plist

The import will work as expected. I haven’t figured out what actually causes the break.

Out of curiosity, how much help/interest has Textmate provided in the past for fixing this sort of thing?

0 Likes

#10

Look this: Updated PHP Package

0 Likes