Go to file
Ivan Fedorov a70cb38071 fix optional parameters 2021-07-28 13:42:43 +02:00
.github/workflows update GithubActions to run tests on matrix 2021-07-28 13:42:43 +02:00
.idea add run config for run with check links 2021-03-17 19:38:46 +03:00
Core WI-61438 Pluralise returned generic 2021-07-27 13:12:55 +03:00
Ev fix cs-fixer 2021-07-28 13:42:43 +02:00
FFI Apply cs fixer 2021-07-24 12:07:43 +02:00
LuaSandbox batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
PDO update optional parameters 2021-07-28 13:42:43 +02:00
Parle fix parle stub ERROR_UNKNOWN_TOKEN 2021-06-18 11:40:18 +03:00
Phar update stubs to suite different php versions 2021-07-28 13:42:43 +02:00
Reflection update optional parameters 2021-07-28 13:42:43 +02:00
SPL update stubs to suite different php versions 2021-07-28 13:42:43 +02:00
SQLite update cs-fixer to latest stable version 2021-05-09 12:48:46 +03:00
SaxonC batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
SimpleXML update php to 8.0.7 2021-06-06 23:58:57 +03:00
SplType batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
Zend OPcache batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
ZendCache use "&" for references 2020-08-23 01:03:37 +02:00
ZendDebugger batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
ZendUtils batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
aerospike batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
amqp batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
apache batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
apcu batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
ast batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
bcmath batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
blackfire Remove useless argument to \BlackfireProbe::ignoreTransaction() 2021-06-16 12:30:40 +03:00
bz2 batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
calendar batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
cassandra fix code style in missed files 2021-03-17 17:45:32 +03:00
com_dotnet batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
couchbase move couchbase v3 from main dir to dir _v3 for backward compatibility 2021-03-23 14:57:53 +03:00
couchbase_v3 couchbase: fix review notes 2021-05-18 19:01:15 +03:00
crypto batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
ctype batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
cubrid batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
curl fix optional parameters 2021-07-28 13:42:43 +02:00
date fix optional parameters 2021-07-28 13:42:43 +02:00
dba batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
decimal batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
dio batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
dom update stubs to suite different php versions 2021-07-28 13:42:43 +02:00
ds Update ds.php 2021-06-17 20:31:22 +03:00
enchant update cs-fixer to latest stable version 2021-05-09 12:48:46 +03:00
event batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
exif batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
expect batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
fann batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
ffmpeg batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
fileinfo update stubs to suite different php versions 2021-07-28 13:42:43 +02:00
filter batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
fpm batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
ftp fix optional parameter for ftp_append 2021-07-28 13:42:43 +02:00
gd Update stubs to php 8.1 alpha2 2021-06-29 18:34:13 +03:00
gearman update cs-fixer to latest stable version 2021-05-09 12:48:46 +03:00
geoip batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
geos batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
gettext change nullable types to union types in attributes 2021-06-30 21:41:05 +03:00
gmagick batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
gmp WI-59548 mark stubs functions as mayDependOnGlobalScope 2021-03-31 20:53:24 +03:00
gnupg update constant values 2021-06-27 18:07:54 +03:00
grpc batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
hash Update stubs to php 8.1 alpha2 2021-06-29 18:34:13 +03:00
http batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
ibm_db2 db2_last_insert_id may return NULL 2021-06-27 18:25:06 +03:00
iconv batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
igbinary batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
imagick Avoid using multi-line annotations for PHP 7 compatibility 2021-06-29 18:35:09 +03:00
imap return back valid muted problems 2021-07-28 13:42:43 +02:00
inotify fix stubs according to reflection for new extensions 2021-03-18 17:50:44 +03:00
interbase update cs-fixer to latest stable version 2021-05-09 12:48:46 +03:00
intl update stubs to php8.1 alpha 3 2021-07-12 16:03:57 +03:00
json fixed missing return value JsonSerializable::jsonSerialize 2021-07-21 13:27:28 +03:00
judy batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
ldap fix default typehints in attributes in functions 2021-07-01 12:45:59 +03:00
leveldb batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
libevent update cs-fixer to latest stable version 2021-05-09 12:48:46 +03:00
libsodium batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
libvirt-php Fix phpdoc blocks 2021-04-12 00:14:29 +03:00
libxml WI-59548 mark stubs functions as mayDependOnGlobalScope 2021-03-31 20:53:24 +03:00
lua batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
lzf batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
mailparse batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
mapscript batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
mbstring fix optional parameters 2021-07-28 13:42:43 +02:00
mcrypt fix stubs according to reflection for new extensions 2021-03-18 17:50:44 +03:00
memcache batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
memcached batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
meminfo batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
meta Fix typo 2021-07-22 13:25:19 +03:00
ming batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
mongo Fix phpdoc blocks 2021-04-12 00:14:29 +03:00
mongodb update stubs to suite different php versions 2021-07-28 13:42:43 +02:00
mosquitto-php batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
mqseries batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
msgpack batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
mssql batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
mysql batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
mysql_xdevapi batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
mysqli fix optional parameters 2021-07-28 13:42:43 +02:00
ncurses batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
newrelic Remove namespace spacing 2021-05-26 17:16:56 +03:00
oauth update cs-fixer to latest stable version 2021-05-09 12:48:46 +03:00
oci8 add oci8 v3 specific changes 2021-07-21 21:25:52 +03:00
odbc fix cs-fixer 2021-07-28 13:42:43 +02:00
openssl fix optional parameters 2021-07-28 13:42:43 +02:00
parallel batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
pcntl WI-59548 mark stubs functions as mayDependOnGlobalScope 2021-03-31 20:53:24 +03:00
pcov batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
pcre update stubs to suite different php versions 2021-07-28 13:42:43 +02:00
pdflib Fix phpdoc blocks 2021-04-12 00:14:29 +03:00
pdo_ibm batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
pdo_mysql batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
pdo_pgsql batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
pdo_sqlite batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
pgsql batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
phpdbg Add stubs for sapi/phpdbg functions 2020-05-13 21:20:22 +03:00
posix WI-59548 mark stubs functions as mayDependOnGlobalScope 2021-03-31 20:53:24 +03:00
pq batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
pspell batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
pthreads batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
radius batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
rar batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
rdkafka update constant values 2021-06-27 18:07:54 +03:00
readline batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
recode batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
redis Use strict typing for zRemRangeByScore 2021-07-20 23:28:45 +03:00
regex batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
rpminfo batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
rrd batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
session Avoid using multi-line annotations for PHP 7 compatibility 2021-06-29 18:35:09 +03:00
shmop batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
snmp batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
soap change nullable types to union types in attributes 2021-06-30 21:41:05 +03:00
sockets fix parameters for restored functions 2021-07-28 13:42:43 +02:00
sodium fix optional parameters 2021-07-28 13:42:43 +02:00
solr batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
sqlite3 update stubs to suite different php versions 2021-07-28 13:42:43 +02:00
sqlsrv batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
ssh2 batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
standard fix optional parameters 2021-07-28 13:42:43 +02:00
stats batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
stomp batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
suhosin batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
superglobals batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
svm batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
svn batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
sybase update cs-fixer to latest stable version 2021-05-09 12:48:46 +03:00
sync enable gnupg extension 2021-05-11 20:34:32 +03:00
sysvmsg batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
sysvsem batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
sysvshm batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
tests fix optional parameters 2021-07-28 13:42:43 +02:00
tidy batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
tokenizer update stubs to php8.1 alpha 3 2021-07-12 16:03:57 +03:00
uopz batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
uuid batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
uv batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
v8js batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
wddx batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
win32service batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
winbinder batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
wincache Fix phpdoc blocks 2021-04-12 00:14:29 +03:00
xcache add more type fixes + fix phpdoc syntax 2020-12-21 17:43:34 +03:00
xdebug fix optional parameters 2021-07-28 13:42:43 +02:00
xdiff add stubs for xdiff 2021-07-21 14:04:10 +03:00
xhprof batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
xlswriter batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
xml batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
xmlreader batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
xmlrpc batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
xmlwriter update stubs to suite different php versions 2021-07-28 13:42:43 +02:00
xsl batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
xxtea batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
yaf update yaf version 2021-07-01 12:45:59 +03:00
yaml batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
yar fix stubs according to reflection for new extensions 2021-03-18 17:50:44 +03:00
zend batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
zip Update stubs to php 8.1 alpha2 2021-06-29 18:34:13 +03:00
zlib update stubs to suite different php versions 2021-07-28 13:42:43 +02:00
zmq batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
zookeeper batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
zstd minor reformat 2021-03-24 23:44:07 +03:00
.gitignore updated shared run config. ignore phpunit cache 2021-03-11 15:03:02 +03:00
.php-cs-fixer.php add require to cs-fixer config 2021-05-10 19:06:10 +03:00
CONTRIBUTING.md run composer from docker instead of local 2021-05-11 21:59:36 +03:00
Dockerfile increase php memory limit 2021-07-28 13:42:43 +02:00
Inspections.xml qodana: try custom inspections profile 2021-02-01 18:13:25 +03:00
PhpStormStubsMap.php update stubs to suite different php versions 2021-07-28 13:42:43 +02:00
README.md remove travis 2020-12-17 11:30:52 +01:00
composer.json update stubs to php8.1 alpha 3 2021-07-12 16:03:57 +03:00
docker-compose.yml add separate service for php_under_test 2021-07-28 13:42:43 +02:00
dump-reflection-to-file.php add script to dump reflection data to file 2021-07-28 13:42:43 +02:00
generate-stub-map move couchbase v3 from main dir to dir _v3 for backward compatibility 2021-03-23 14:57:53 +03:00
phpunit.xml add phpunit config with several suites 2021-07-28 13:42:43 +02:00
qodana.yaml disable unused declaration inspection for qodana 2021-07-23 18:17:10 +02:00

README.md

phpstorm-stubs

official JetBrains project GitHub Action 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 docker-compose -f docker-compose.yml run php composer install -d /opt/project/phpstorm-stubs --ignore-platform-reqs
  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 docker-compose -f docker-compose.yml run php /usr/local/bin/php /opt/project/phpstorm-stubs/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