Updated against PHP 5.5.10
Added some logic to strip out the null character APC stuff, added some more extensions and added some logic to attempt to install via `brew` when the argument "brew" is passed to the update script
This commit is contained in:
parent
87ee790293
commit
cc2285a67e
3 changed files with 272 additions and 12 deletions
|
@ -9,7 +9,7 @@ syntax file distributed with Vim.
|
||||||
The point of this fork is to embrace the latest and greatest PHP has to offer
|
The point of this fork is to embrace the latest and greatest PHP has to offer
|
||||||
and constantly update against the latest PHP release.
|
and constantly update against the latest PHP release.
|
||||||
|
|
||||||
Last updated against **5.5.9**
|
Last updated against **5.5.10**
|
||||||
|
|
||||||
[StanAngeloff]: https://github.com/StanAngeloff/php.vim
|
[StanAngeloff]: https://github.com/StanAngeloff/php.vim
|
||||||
[garvin]: https://github.com/vim-scripts/php.vim--Garvin
|
[garvin]: https://github.com/vim-scripts/php.vim--Garvin
|
||||||
|
|
213
syntax/php.vim
213
syntax/php.vim
File diff suppressed because one or more lines are too long
|
@ -34,45 +34,66 @@ $allowed_extensions = [
|
||||||
'amqp',
|
'amqp',
|
||||||
'apcu',
|
'apcu',
|
||||||
'bcmath',
|
'bcmath',
|
||||||
|
'blitz',
|
||||||
|
'boxwood',
|
||||||
'bz2',
|
'bz2',
|
||||||
'calendar',
|
'calendar',
|
||||||
|
'chdb',
|
||||||
#'com_dotnet',
|
#'com_dotnet',
|
||||||
'core',
|
'core',
|
||||||
'couchbase',
|
'couchbase',
|
||||||
|
'crypto',
|
||||||
'ctype',
|
'ctype',
|
||||||
'curl',
|
'curl',
|
||||||
'date',
|
'date',
|
||||||
'dba',
|
'dba',
|
||||||
|
'dbase',
|
||||||
|
'dmtx',
|
||||||
'dom',
|
'dom',
|
||||||
#'enchant',
|
#'enchant',
|
||||||
'ereg',
|
'ereg',
|
||||||
|
'ev',
|
||||||
'exif',
|
'exif',
|
||||||
'fileinfo',
|
'fileinfo',
|
||||||
'filter',
|
'filter',
|
||||||
'ftp',
|
'ftp',
|
||||||
|
'gearman',
|
||||||
'gd',
|
'gd',
|
||||||
'geoip',
|
'geoip',
|
||||||
'gettext',
|
'gettext',
|
||||||
'gmagick',
|
'gmagick',
|
||||||
#'gmp',
|
#'gmp',
|
||||||
|
'graphdat',
|
||||||
'hash',
|
'hash',
|
||||||
|
'http',
|
||||||
'iconv',
|
'iconv',
|
||||||
|
'igbinary',
|
||||||
'imagick',
|
'imagick',
|
||||||
#'imap',
|
#'imap',
|
||||||
#'interbase',
|
#'interbase',
|
||||||
'intl',
|
'intl',
|
||||||
|
'jsmin',
|
||||||
'json',
|
'json',
|
||||||
|
'judy',
|
||||||
'ldap',
|
'ldap',
|
||||||
|
'leveldb',
|
||||||
|
'libevent',
|
||||||
|
'libvirt',
|
||||||
'libxml',
|
'libxml',
|
||||||
|
'lzf',
|
||||||
|
'mailparse',
|
||||||
'mbstring',
|
'mbstring',
|
||||||
'mcrypt',
|
'mcrypt',
|
||||||
'memcache',
|
'memcache',
|
||||||
'memcached',
|
'memcached',
|
||||||
'mhash',
|
'mhash',
|
||||||
'mongo',
|
'mongo',
|
||||||
|
'mosquitto',
|
||||||
|
'msgpack',
|
||||||
#'mssql',
|
#'mssql',
|
||||||
'mysql',
|
'mysql',
|
||||||
'mysqli',
|
'mysqli',
|
||||||
|
'mysqlnd_ms',
|
||||||
'oauth',
|
'oauth',
|
||||||
#'oci8',
|
#'oci8',
|
||||||
#'oci8_11g',
|
#'oci8_11g',
|
||||||
|
@ -83,41 +104,65 @@ $allowed_extensions = [
|
||||||
'pgsql',
|
'pgsql',
|
||||||
'phar',
|
'phar',
|
||||||
'pcntl',
|
'pcntl',
|
||||||
|
'phalcon',
|
||||||
'posix',
|
'posix',
|
||||||
|
'proctitle',
|
||||||
|
'propro',
|
||||||
'pspell',
|
'pspell',
|
||||||
|
'raphf',
|
||||||
'readline',
|
'readline',
|
||||||
#'recode',
|
#'recode',
|
||||||
'redis',
|
'redis',
|
||||||
|
'redland',
|
||||||
'reflection',
|
'reflection',
|
||||||
|
'riak',
|
||||||
|
'runkit',
|
||||||
'session',
|
'session',
|
||||||
'shmop',
|
'shmop',
|
||||||
'simplexml',
|
'simplexml',
|
||||||
|
'snappy',
|
||||||
'snmp',
|
'snmp',
|
||||||
'soap',
|
'soap',
|
||||||
'sockets',
|
'sockets',
|
||||||
|
'solr',
|
||||||
|
'sphinx',
|
||||||
'spl',
|
'spl',
|
||||||
#'sqlite',
|
#'sqlite',
|
||||||
'sqlite3',
|
'sqlite3',
|
||||||
|
'ssh2',
|
||||||
'standard',
|
'standard',
|
||||||
|
'stats',
|
||||||
|
'sundown',
|
||||||
|
'swoole',
|
||||||
#'sybase_ct',
|
#'sybase_ct',
|
||||||
'sysvmsg',
|
'sysvmsg',
|
||||||
'sysvsem',
|
'sysvsem',
|
||||||
'sysvshm',
|
'sysvshm',
|
||||||
'test_helpers',
|
'test_helpers',
|
||||||
'tidy',
|
'tidy',
|
||||||
|
'timezonedb',
|
||||||
'tokenizer',
|
'tokenizer',
|
||||||
#'tokyotyrant',
|
#'tokyotyrant',
|
||||||
|
'uploadprogress',
|
||||||
|
'uuid',
|
||||||
#'varnish',
|
#'varnish',
|
||||||
|
'wbxml',
|
||||||
'wddx',
|
'wddx',
|
||||||
|
'xcache',
|
||||||
'xdebug',
|
'xdebug',
|
||||||
'xml',
|
'xml',
|
||||||
|
'xmldiff',
|
||||||
'xmlreader',
|
'xmlreader',
|
||||||
'xmlrpc',
|
'xmlrpc',
|
||||||
'xmlwriter',
|
'xmlwriter',
|
||||||
'xsl',
|
'xsl',
|
||||||
|
'yaf',
|
||||||
'yaml',
|
'yaml',
|
||||||
|
'yar',
|
||||||
|
'yaz',
|
||||||
'zip',
|
'zip',
|
||||||
'zlib',
|
'zlib',
|
||||||
|
'zookeeper',
|
||||||
];
|
];
|
||||||
|
|
||||||
$processed = [];
|
$processed = [];
|
||||||
|
@ -143,17 +188,17 @@ foreach ($allowed_extensions as $extension)
|
||||||
|
|
||||||
$details['name'] = $options->getName();
|
$details['name'] = $options->getName();
|
||||||
|
|
||||||
if (sizeof ($functions))
|
if (sizeof($functions))
|
||||||
{
|
{
|
||||||
$details['functions'] = implode(' ', $functions);
|
$details['functions'] = implode(' ', $functions);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sizeof ($constants))
|
if (sizeof($constants))
|
||||||
{
|
{
|
||||||
$details['constants'] = implode(' ', $constants);
|
$details['constants'] = implode(' ', $constants);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sizeof ($classes))
|
if (sizeof($classes))
|
||||||
{
|
{
|
||||||
$details['classes'] = implode(' ', $classes);
|
$details['classes'] = implode(' ', $classes);
|
||||||
}
|
}
|
||||||
|
@ -162,7 +207,12 @@ foreach ($allowed_extensions as $extension)
|
||||||
}
|
}
|
||||||
catch (Exception $e)
|
catch (Exception $e)
|
||||||
{
|
{
|
||||||
print "ERROR: '{$extension}' -- " . $e->getMessage() . "\n";
|
echo 'ERROR: "' . $extension . '" -- ' . $e->getMessage() . "\n";
|
||||||
|
|
||||||
|
if ($argc == 2 && $argv[1] == 'brew')
|
||||||
|
{
|
||||||
|
passthru('brew install php55-' . $extension);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,8 +220,13 @@ $code = "syn case match\n\n";
|
||||||
|
|
||||||
foreach ($processed as $extension)
|
foreach ($processed as $extension)
|
||||||
{
|
{
|
||||||
if (isset ($extension['constants']))
|
if (isset($extension['constants']))
|
||||||
{
|
{
|
||||||
|
if ($extension['name'] == 'apcu')
|
||||||
|
{
|
||||||
|
$extension['constants'] = str_replace("\0apc_register_serializer-0 ", '', $extension['constants']);
|
||||||
|
}
|
||||||
|
|
||||||
$code = $code . '" ' . $extension['name'] . "\n";
|
$code = $code . '" ' . $extension['name'] . "\n";
|
||||||
$code = $code . 'syn keyword phpConstants ' . $extension['constants'] . " contained\n\n";
|
$code = $code . 'syn keyword phpConstants ' . $extension['constants'] . " contained\n\n";
|
||||||
}
|
}
|
||||||
|
@ -183,12 +238,12 @@ foreach ($processed as $extension)
|
||||||
{
|
{
|
||||||
$code = $code . '" ' . $extension['name'] . "\n";
|
$code = $code . '" ' . $extension['name'] . "\n";
|
||||||
|
|
||||||
if (isset ($extension['functions']))
|
if (isset($extension['functions']))
|
||||||
{
|
{
|
||||||
$code = $code . 'syn keyword phpFunctions ' . $extension['functions'] . " contained\n";
|
$code = $code . 'syn keyword phpFunctions ' . $extension['functions'] . " contained\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset ($extension['classes']))
|
if (isset($extension['classes']))
|
||||||
{
|
{
|
||||||
$code = $code . 'syn keyword phpClasses ' . $extension['classes'] . " contained\n\n";
|
$code = $code . 'syn keyword phpClasses ' . $extension['classes'] . " contained\n\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue