Go to file
Ivan Fedorov 0535c570f7 fix test for zero patch version 2020-06-27 22:30:11 +03:00
.idea PHP 7.4 language level 2020-06-08 16:24:45 +02:00
Core fix test for zero patch version 2020-06-27 22:30:11 +03:00
Ev Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
FFI fix wrong @return at \FFI::cdef() 2020-04-29 07:32:28 +09:00
PDO Cleanup @since tags with old versions <5.3 2020-01-22 18:26:13 +01:00
Parle lowercase keywords null/true/false 2020-06-18 21:20:10 +03:00
Phar fix Phar::offsetGet return type 2020-06-10 19:46:51 +03:00
Reflection Reflection @link 2020-06-14 13:25:24 +03:00
SPL Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
SQLite Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
SaxonC Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
SimpleXML WI-53933 Support polymorphic return types for SimpleXMLElement 2020-06-23 12:59:28 +03:00
SplType Use https for @link annotations (#367) 2018-08-13 14:15:36 +03:00
Zend OPcache lowercase keywords null/true/false 2020-06-18 21:20:10 +03:00
ZendCache Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
ZendDebugger WI-33237 split embedded stubs into modules 2017-03-07 14:52:15 +01:00
ZendUtils WI-33237 split embedded stubs into modules 2017-03-07 14:52:15 +01:00
amqp Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
apache Cleanup @since tags with old versions <5.3 2020-01-22 18:26:13 +01:00
apcu Align `APCuIterator` case with its implementation 2020-06-10 19:52:14 +03:00
bcmath Remove "since 7" leftovers 2020-02-11 15:49:00 +01:00
blackfire Add stubs for BlackfireProbe (#764) 2020-03-30 17:36:48 +03:00
bz2 correct return value for bzopen(), dba_open(), finfo_open() and shmop_open() functions 2020-06-24 18:32:22 +03:00
calendar Cleanup @since tags with old versions <5.3 2020-01-22 18:26:13 +01:00
cassandra Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
com_dotnet com_dotnet fix optional parameters 2020-01-05 12:03:17 +01:00
couchbase lowercase keywords null/true/false 2020-06-18 21:20:10 +03:00
crypto lowercase keywords null/true/false 2020-06-18 21:20:10 +03:00
ctype Cleanup @since tags with old versions <5.3 2020-01-22 18:26:13 +01:00
cubrid correct return value for PHP internal functions on failure 2020-06-24 22:15:36 +03:00
curl fix test for zero patch version 2020-06-27 22:30:11 +03:00
date lowercase keywords null/true/false 2020-06-18 21:20:10 +03:00
dba correct return value for bzopen(), dba_open(), finfo_open() and shmop_open() functions 2020-06-24 18:32:22 +03:00
decimal Updated Decimal extension stubs 2020-06-16 15:49:37 +03:00
dom remove duplicated properties 2020-06-17 21:59:58 +03:00
ds Data Structures: 3rd Amendment (#856) 2020-06-26 22:39:18 +03:00
enchant correct return value for PHP internal functions on failure 2020-06-24 22:15:36 +03:00
event remove duplicated properties 2020-06-17 21:59:58 +03:00
exif Cleanup @since tags with old versions <5.3 2020-01-22 18:26:13 +01:00
expect Add stubs for ext-expect (#761) 2020-03-31 08:37:48 +03:00
fann correct return value for PHP internal functions on failure 2020-06-24 22:15:36 +03:00
ffmpeg Fix undefined class inspection 2020-06-08 16:34:00 +02:00
fileinfo correct return value for bzopen(), dba_open(), finfo_open() and shmop_open() functions 2020-06-24 18:32:22 +03:00
filter Cleanup @since tags with old versions <5.3 2020-01-22 18:26:13 +01:00
fpm Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
ftp add false types on ftp as documented 2020-01-28 22:25:11 +01:00
gd Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
gearman Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
geoip Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
geos Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
gettext Cleanup @since tags with old versions <5.3 2020-01-22 18:26:13 +01:00
gmagick Fix typos 2020-04-26 17:12:34 +02:00
gmp Added missing GMP functions and constants 2020-06-01 13:36:11 +03:00
gnupg lowercase keywords null/true/false 2020-06-18 21:20:10 +03:00
grpc Grpc\ChannelCredentials::createSsl() has all optional parameters. 2019-07-26 12:38:45 -04:00
hash lowercase keywords null/true/false 2020-06-18 21:20:10 +03:00
http lowercase keywords null/true/false 2020-06-18 21:20:10 +03:00
ibm_db2 Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
iconv Cleanup @since tags with old versions <5.3 2020-01-22 18:26:13 +01:00
igbinary Remove duplicate url scheme inside phpDoc blocks 2018-11-28 17:34:30 +01:00
imagick lowercase keywords null/true/false 2020-06-18 21:20:10 +03:00
imap Added missing IMAP functions 2020-06-01 13:36:11 +03:00
inotify PHP tags cleanup 2020-03-19 14:48:38 +01:00
interbase correct return value for PHP internal functions on failure 2020-06-24 22:15:36 +03:00
intl lowercase keywords null/true/false 2020-06-18 21:20:10 +03:00
json Cleanup @since tags with old versions <5.3 2020-01-22 18:26:13 +01:00
judy Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
ldap correct return value for PHP internal functions on failure 2020-06-24 22:15:36 +03:00
leveldb lowercase keywords null/true/false 2020-06-18 21:20:10 +03:00
libevent Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
libsodium Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
libxml Specify array value type in libxml_get_errors (#752) 2020-03-19 16:32:21 +03:00
lua Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
lzf Added pecl LZF 2019-12-22 18:12:48 +03:00
mailparse Add hand-picked changes from pr553 2019-06-26 15:26:31 +03:00
mapscript Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
mbstring Added optional parameters to new mbstring functions 2020-05-13 21:28:35 +03:00
mcrypt Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
memcache Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
memcached Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
meminfo Add ext-meminfo stub 2019-05-15 19:23:38 +02:00
meta Add meta for session_ functions 2020-06-16 23:15:08 +03:00
ming Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
mongo lowercase keywords null/true/false 2020-06-18 21:20:10 +03:00
mongodb The third parameter of Driver::executeQuery is now an options array (#813) 2020-06-03 14:14:13 +03:00
mosquitto-php Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
mqseries Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
msgpack lowercase keywords null/true/false 2020-06-18 21:20:10 +03:00
mssql correct return value for PHP internal functions on failure 2020-06-24 22:15:36 +03:00
mysql correct return value for PHP internal functions on failure 2020-06-24 22:15:36 +03:00
mysql_xdevapi Fix undefined class inspection 2020-06-08 16:34:00 +02:00
mysqli mysqli correct link & params 2020-06-10 19:59:58 +03:00
ncurses Fix undefined class inspection 2020-06-08 16:34:00 +02:00
newrelic Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
oauth Update oauth.php 2020-06-17 22:25:17 +03:00
oci8 Fix typos 2020-04-26 17:12:34 +02:00
odbc correct return value for PHP internal functions on failure 2020-06-24 22:15:36 +03:00
openssl lowercase keywords null/true/false 2020-06-18 21:20:10 +03:00
parallel Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
pcntl PHP tags cleanup 2020-03-19 14:48:38 +01:00
pcov Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
pcre preg_grep returns false when pattern cannot be compiled 2020-06-11 17:33:40 +03:00
pdflib Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
pdo_ibm WI-33237 split embedded stubs into modules 2017-03-07 14:52:15 +01:00
pdo_mysql WI-33237 split embedded stubs into modules 2017-03-07 14:52:15 +01:00
pdo_pgsql WI-33237 split embedded stubs into modules 2017-03-07 14:52:15 +01:00
pdo_sqlite WI-33237 split embedded stubs into modules 2017-03-07 14:52:15 +01:00
pgsql Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
phpdbg Add stubs for sapi/phpdbg functions 2020-05-13 21:20:22 +03:00
posix Cleanup @since tags with old versions <5.3 2020-01-22 18:26:13 +01:00
pq lowercase keywords null/true/false 2020-06-18 21:20:10 +03:00
pspell Cleanup @since tags with old versions <5.3 2020-01-22 18:26:13 +01:00
pthreads Bring pthreads stub in line with pthreads v3.2.0 (#852) 2020-06-24 17:54:18 +03:00
radius remove space in constant. Based on Pull/814 (#818) 2020-06-03 15:03:22 +03:00
rar Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
rdkafka Added queryWatermarkOffsets and offsetsForTimes for the RdKafka\KafkaConsumer class 2020-06-05 18:01:59 +03:00
readline Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
recode Cleanup @since tags with old versions <5.3 2020-01-22 18:26:13 +01:00
redis Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
regex Add missing @removed tags for ereg and sybace 2020-01-22 18:34:16 +01:00
rpminfo changed to the correct return values 2020-04-23 11:10:38 +02:00
rrd Fix typos 2020-04-26 17:12:34 +02:00
session Remove "since 7" leftovers 2020-02-11 15:49:00 +01:00
shmop correct return value for bzopen(), dba_open(), finfo_open() and shmop_open() functions 2020-06-24 18:32:22 +03:00
snmp lowercase keywords null/true/false 2020-06-18 21:20:10 +03:00
soap Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
sockets correct return value for PHP internal functions on failure 2020-06-24 22:15:36 +03:00
sodium fix test for zero patch version 2020-06-27 22:30:11 +03:00
solr Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
sqlite3 Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
sqlsrv Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
ssh2 correct return value for PHP internal functions on failure 2020-06-24 22:15:36 +03:00
standard correct return value for PHP internal functions on failure 2020-06-24 22:15:36 +03:00
stats Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
stomp Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
suhosin Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
superglobals Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
svn Add hand-picked changes from pr553 2019-06-26 15:26:31 +03:00
sybase correct return value for PHP internal functions on failure 2020-06-24 22:15:36 +03:00
sync lowercase keywords null/true/false 2020-06-18 21:20:10 +03:00
sysvmsg Cleanup @since tags with old versions <5.3 2020-01-22 18:26:13 +01:00
sysvsem Cleanup @since tags with old versions <5.3 2020-01-22 18:26:13 +01:00
sysvshm Cleanup @since tags with old versions <5.3 2020-01-22 18:26:13 +01:00
tests fix test for zero patch version 2020-06-27 22:30:11 +03:00
tidy Added missing TIDY constants 2020-06-01 13:36:11 +03:00
tokenizer Cleanup @since tags with old versions <5.3 2020-01-22 18:26:13 +01:00
uopz Fix undefined class inspection 2020-06-08 16:34:00 +02:00
uuid Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
uv Fix typos 2020-04-26 17:12:34 +02:00
v8js lowercase keywords null/true/false 2020-06-18 21:20:10 +03:00
wddx Cleanup @since tags with old versions <5.3 2020-01-22 18:26:13 +01:00
win32service Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
winbinder Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
wincache Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
xcache Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
xdebug Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
xhprof PHP tags cleanup 2020-03-19 14:48:38 +01:00
xml correct return value for PHP internal functions on failure 2020-06-24 22:15:36 +03:00
xmlreader Cleanup @since tags with old versions <5.3 2020-01-22 18:26:13 +01:00
xmlrpc Cleanup @since tags with old versions <5.3 2020-01-22 18:26:13 +01:00
xmlwriter Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
xsl Cleanup @since tags with old versions <5.3 2020-01-22 18:26:13 +01:00
xxtea Stubs for PECL XXTEA 2019-11-06 15:01:57 +03:00
yaf Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
yaml PHP tags cleanup 2020-03-19 14:48:38 +01:00
yar Remove whitespaces from stubs. 2020-05-13 21:13:07 +03:00
zend Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
zip correct return value for PHP internal functions on failure 2020-06-24 22:15:36 +03:00
zlib correct return value for PHP internal functions on failure 2020-06-24 22:15:36 +03:00
zmq @link and @see tags should use https 2018-10-16 11:28:37 +02:00
zookeeper Add stub for zookeeper extension 2019-07-18 21:36:08 +02:00
.gitignore Add php-cs-fixer 2020-05-28 18:12:43 +03:00
.php_cs lowercase keywords null/true/false 2020-06-18 21:20:10 +03:00
.travis.yml Add php-cs-fixer 2020-05-28 18:12:43 +03:00
CONTRIBUTING.md Add php-cs-fixer 2020-05-28 18:12:43 +03:00
Dockerfile PHP 7.4 stubs initial support + switch to PHP 7.4 docker image 2019-12-05 17:54:10 +01:00
PhpStormStubsMap.php Bring pthreads stub in line with pthreads v3.2.0 (#852) 2020-06-24 17:54:18 +03:00
README.md PHP Data Structures (#791) 2020-05-19 18:30:08 +03:00
composer.json Revert "Cleanup and rules for PHPCS" 2020-06-12 14:02:01 +03:00
docker-compose.yml add tests on ldap extension 2019-08-26 16:53:45 +02:00
generate-stub-map Don't parse the content of vendor 2019-06-25 18:50:58 +02:00

README.md

phpstorm-stubs

official JetBrains project Build Status License Total Downloads

STUBS are normal, syntactically correct PHP files that contain function & class signatures, constant definitions, etc. for all built-in PHP stuff and most standard extensions. Stubs need to include complete PHPDOC, especially proper @return annotations.

An IDE needs them for completion, code inspection, type inference, doc popups, etc. Quality of most of these services depend on the quality of the stubs (basically their PHPDOC @annotations).

Note that the stubs for “non-standard” extensions are provided as is. (Non-Standard extensions are the ones that are not part of PHP Core or are not Bundled/External - see the complete list here.)

The support for such “non-standard” stubs is community-driven, and we only validate their PHPDoc. We do not check whether a stub matches the actual extension or whether the provided descriptions are correct.

Relevant open issues

Contribution process

Contribution process

Updating the IDE

Have a full copy of the .git repo within an IDE and provide its path in Settings | Languages & Frameworks | PHP | PHP Runtime | Advanced settings | Default stubs path. It should then be easily updatable both ways via normal git methods.

Extensions enabled by default

The set of extensions enabled by default in PhpStorm can change anytime without prior notice. To learn how to view the enabled extensions, look here.

How to run tests

  1. Execute composer install
  2. Execute docker-compose -f docker-compose.yml run php /opt/project/phpstorm-stubs/vendor/bin/phpunit /opt/project/phpstorm-stubs/tests/

How to update stub map

Execute php generate-stub-map and commit the resulting PhpStormStubsMap.php

License

Apache 2

contains material by the PHP Documentation Group, licensed with CC-BY 3.0