You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ivan Fedorov ecb1927370 remove internal @meta tag from iterator_to_array function 18 hours ago
.idea Fix parsing of constants with negative value, add missing constants, fix constant values 4 months ago
Core Revert param change. 2 days ago
Ev Add new extensions + fixes for them 4 months ago
FFI Actualize FFI interface using latest API info (#623) 6 months ago
PDO Provide some missing since and deprecated tags 1 day ago
Parle Update RParser.php 9 months ago
Phar update since versions in core to make it major 2 months ago
Reflection update since versions in core to make it major 2 months ago
SPL remove internal @meta tag from iterator_to_array function 18 hours ago
SQLite Add hand-picked changes from pr553 6 months ago
SaxonC Convert links to HTTPS 1 year ago
SimpleXML update since versions in core to make it major 2 months ago
SplType Use https for @link annotations (#367) 1 year ago
Zend OPcache Provide some missing @since tags 1 day ago
ZendCache Add hand-picked changes from pr553 6 months ago
ZendDebugger WI-33237 split embedded stubs into modules 2 years ago
ZendUtils WI-33237 split embedded stubs into modules 2 years ago
amqp update amqp stubs 3 weeks ago
apache update since versions in core to make it major 2 months ago
apcu Merge pull request #625 from pestretsov/hand_picked_changes_from_pr_553 6 months ago
bcmath update since versions in core to make it major 2 months ago
bz2 Add hand-picked changes from pr553 6 months ago
calendar update since versions in core to make it major 2 months ago
cassandra Add Root namespace for Cassandra class 4 months ago
com_dotnet added missing com_exception to com_dotnet stub 8 months ago
couchbase Add hand-picked changes from pr553 6 months ago
crypto Fix default value for parameter to be compatible with PHP 7 months ago
ctype Use https for @link annotations (#367) 1 year ago
cubrid @link and @see tags should use https 1 year ago
curl curl_file_create optional parameters 3 weeks ago
date Provide some missing @since tags 1 day ago
dba update since versions in core to make it major 2 months ago
dom Remove methods duplicates in DOMElement 1 month ago
enchant Fix some type according to review 6 months ago
event Change all other links available in HTTPS 1 year ago
exif update since versions in core to make it major 2 months ago
fann Fix parsing of constants with negative value, add missing constants, fix constant values 4 months ago
ffmpeg Add hand-picked changes from pr553 6 months ago
fileinfo update since versions in core to make it major 2 months ago
filter update since versions in core to make it major 2 months ago
fpm update since versions in core to make it major 2 months ago
ftp update since versions in core to make it major 2 months ago
gd update since versions in core to make it major 2 months ago
gearman Add hand-picked changes from pr553 6 months ago
geoip Fix some type according to review 6 months ago
geos Fix geos stubs 4 months ago
gettext update since versions in core to make it major 2 months ago
gmagick Add hand-picked changes from pr553 6 months ago
gmp update since versions in core to make it major 2 months ago
gnupg Fix parsing of constants with negative value, add missing constants, fix constant values 4 months ago
grpc Grpc\ChannelCredentials::createSsl() has all optional parameters. 5 months ago
hash PHP 7.4 stubs initial support + switch to PHP 7.4 docker image 1 month ago
http Fix some type according to review 6 months ago
ibm_db2 Add hand-picked changes from pr553 6 months ago
iconv [+]: re-add some more fixes 6 months ago
igbinary Remove duplicate url scheme inside phpDoc blocks 1 year ago
imagick Add hand-picked changes from pr553 6 months ago
imap update since versions in core to make it major 2 months ago
inotify Add hand-picked changes from pr553 6 months ago
interbase update since versions in core to make it major 2 months ago
intl Provide some missing since and deprecated tags 1 day ago
json Provide some missing since and deprecated tags 1 day ago
judy Use https for @link annotations (#367) 1 year ago
ldap update since versions in core to make it major 2 months ago
leveldb renamed folder for leveldb extension to a proper case 7 months ago
libevent Add hand-picked changes from pr553 6 months ago
libsodium Make PHPDocs PHPDoc parser compatible 1 year ago
libxml update since versions in core to make it major 2 months ago
lua Fix stub for assign method 1 year ago
lzf Added pecl LZF 3 weeks ago
mailparse Add hand-picked changes from pr553 6 months ago
mapscript Add hand-picked changes from pr553 6 months ago
mbstring PHP 7.4 stubs initial support + switch to PHP 7.4 docker image 1 month ago
mcrypt Don't use bugfix number in deprecation tag 3 months ago
memcache Add hand-picked changes from pr553 6 months ago
memcached Add hand-picked changes from pr553 6 months ago
meminfo Add ext-meminfo stub 8 months ago
meta Merge pull request #719 from KapitanOczywisty/patch-3 1 month ago
ming Use https for @link annotations (#367) 1 year ago
mongo Fix some type according to review 6 months ago
mongodb Removed UTCDateTime.getTimestamp and UTCDateTime.getIncrement 2 months ago
mqseries moved fann, judy, mqseries to separate directories 2 years ago
msgpack Add new extensions + fixes for them 4 months ago
mssql Provide some missing since and deprecated tags 1 day ago
mysql update since versions in core to make it major 2 months ago
mysql_xdevapi mysql_xdevapi_8_0_11 4 months ago
mysqli Provide some missing since and deprecated tags 1 day ago
ncurses Use https for @link annotations (#367) 1 year ago
newrelic Add hand-picked changes from pr553 6 months ago
oauth Add hand-picked changes from pr553 6 months ago
oci8 update since versions in core to make it major 2 months ago
odbc update since versions in core to make it major 2 months ago
openssl PHP 7.4 stubs initial support + switch to PHP 7.4 docker image 1 month ago
parallel update stubs for ext-parallel 5 months ago
pcntl PHP 7.4 stubs initial support + switch to PHP 7.4 docker image 1 month ago
pcov Fixed docblock spacing, added correct version numbers 3 months ago
pcre PHP 7.4 stubs initial support + switch to PHP 7.4 docker image 1 month ago
pdflib @link and @see tags should use https 1 year ago
pdo_ibm WI-33237 split embedded stubs into modules 2 years ago
pdo_mysql WI-33237 split embedded stubs into modules 2 years ago
pdo_pgsql WI-33237 split embedded stubs into modules 2 years ago
pdo_sqlite WI-33237 split embedded stubs into modules 2 years ago
pgsql update since versions in core to make it major 2 months ago
posix update since versions in core to make it major 2 months ago
pspell Add hand-picked changes from pr553 6 months ago
pthreads Add pthreads stubs for addRef/delRef/getRefCount functions for Threaded class 1 year ago
radius Add hand-picked changes from pr553 6 months ago
rar Add hand-picked changes from pr553 6 months ago
rdkafka Add missing Rdkafka\Message::$len property 4 months ago
readline update since versions in core to make it major 2 months ago
recode Add hand-picked changes from pr553 6 months ago
redis update ping doc 3 weeks ago
regex Don't use bugfix number in deprecation tag 3 months ago
rrd Fix stubs according to new tests 4 months ago
session Provide some missing since and deprecated tags 1 day ago
shmop Add hand-picked changes from pr553 6 months ago
snmp update since versions in core to make it major 2 months ago
soap $encoding is one of XSD constants so it may be int or string 2 months ago
sockets update since versions in core to make it major 2 months ago
sodium update since versions in core to make it major 2 months ago
solr Fix/update SolrQuery return types 3 months ago
sqlite3 PHP 7.4 stubs initial support + switch to PHP 7.4 docker image 1 month ago
sqlsrv sqlsrv_get_field optional parameter 2 weeks ago
ssh2 Add hand-picked changes from pr553 6 months ago
standard Provide some missing since and deprecated tags 1 day ago
stomp Add stubs for pecl-stomp php extension 8 months ago
suhosin Add hand-picked changes from pr553 6 months ago
superglobals Don't use bugfix number in deprecation tag 3 months ago
svn Add hand-picked changes from pr553 6 months ago
sybase Provide some missing since and deprecated tags 1 day ago
sync Use https for @link annotations (#367) 1 year ago
sysvmsg update since versions in core to make it major 2 months ago
sysvsem update since versions in core to make it major 2 months ago
sysvshm update since versions in core to make it major 2 months ago
tests add lzf to pecl map 3 weeks ago
tidy update since versions in core to make it major 2 months ago
tokenizer PHP 7.4 stubs initial support + switch to PHP 7.4 docker image 1 month ago
uopz @link and @see tags should use https 1 year ago
uv Fix UV stubs to be compatible with PHP 7 7 months ago
v8js Rename V8Js.php to v8js.php 2 years ago
wddx Add hand-picked changes from pr553 6 months ago
win32service Add hand-picked changes from pr553 6 months ago
winbinder added winbinder stub, generated stubmap 3 months ago
wincache Add hand-picked changes from pr553 6 months ago
xcache WI-33237 split embedded stubs into modules 2 years ago
xdebug Update xdebug_stop_code_coverage parameter (#617) 7 months ago
xhprof @link and @see tags should use https 1 year ago
xml Add hand-picked changes from pr553 6 months ago
xmlreader update since versions in core to make it major 2 months ago
xmlrpc update since versions in core to make it major 2 months ago
xmlwriter Use https for @link annotations (#367) 1 year ago
xsl update since versions in core to make it major 2 months ago
xxtea Stubs for PECL XXTEA 2 months ago
yaf Update yaf_namespace.php 1 month ago
yaml Fix parsing of constants with negative value, add missing constants, fix constant values 4 months ago
yar Fix parsing of constants with negative value, add missing constants, fix constant values 4 months ago
zend Fix some type according to review 6 months ago
zip update since versions in core to make it major 2 months ago
zlib update since versions in core to make it major 2 months ago
zmq @link and @see tags should use https 1 year ago
zookeeper Add stub for zookeeper extension 6 months ago
.gitignore remove quality tools and redundant mapping 1 year ago
.travis.yml update PHP version in travis build 1 month ago
CONTRIBUTING.md Update requirements for PR requests 1 year ago
Dockerfile PHP 7.4 stubs initial support + switch to PHP 7.4 docker image 1 month ago
PhpStormStubsMap.php Added pecl LZF 3 weeks ago
README.md Update description how to work with custom stubs from IDE 4 months ago
composer.json Revert "Updated PHPUnit to version 8" 2 months ago
docker-compose.yml add tests on ldap extension 4 months ago
generate-stub-map Don't parse the content of vendor 6 months ago

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