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 8dc2938edf make couchbase v3 stubs default 2 days ago
.github/workflows fix version in workflow 1 week ago
.idea add run config for run with check links 5 months ago
Core typehints for Exception 1 week ago
Ev use LanguageLevelTypeAware for typehints 1 week ago
FFI Apply cs fixer 2 weeks ago
LuaSandbox batch update of all stubs with defined code style 5 months ago
PDO update typehints for SPL + code style 1 week ago
Parle fix parle stub ERROR_UNKNOWN_TOKEN 2 months ago
Phar update typehints for SPL + code style 1 week ago
Reflection fix some typehints to match reflection 1 week ago
SPL Update typehints for ArrayObject and ArrayIterator methods 2 days ago
SQLite update cs-fixer to latest stable version 3 months ago
SaxonC batch update of all stubs with defined code style 5 months ago
SimpleXML fix a couple of typehints for PHP 8.1 1 week ago
SplType batch update of all stubs with defined code style 5 months ago
Zend OPcache batch update of all stubs with defined code style 5 months ago
ZendCache use "&" for references 12 months ago
ZendDebugger batch update of all stubs with defined code style 5 months ago
ZendUtils batch update of all stubs with defined code style 5 months ago
aerospike batch update of all stubs with defined code style 5 months ago
amqp batch update of all stubs with defined code style 5 months ago
apache batch update of all stubs with defined code style 5 months ago
apcu batch update of all stubs with defined code style 5 months ago
ast batch update of all stubs with defined code style 5 months ago
bcmath batch update of all stubs with defined code style 5 months ago
blackfire Remove useless argument to \BlackfireProbe::ignoreTransaction() 2 months ago
bz2 batch update of all stubs with defined code style 5 months ago
calendar batch update of all stubs with defined code style 5 months ago
cassandra fix code style in missed files 5 months ago
com_dotnet batch update of all stubs with defined code style 5 months ago
couchbase make couchbase v3 stubs default 2 days ago
couchbase_v2 make couchbase v3 stubs default 2 days ago
crypto batch update of all stubs with defined code style 5 months ago
ctype batch update of all stubs with defined code style 5 months ago
cubrid batch update of all stubs with defined code style 5 months ago
curl remove redundant imports 1 week ago
date rollback Required attribute and use PhpStormStubsElementAvailable instead 1 week ago
dba batch update of all stubs with defined code style 5 months ago
decimal batch update of all stubs with defined code style 5 months ago
dio batch update of all stubs with defined code style 5 months ago
dom rollback Required attribute and use PhpStormStubsElementAvailable instead 1 week ago
ds Update ds.php 2 months ago
enchant update cs-fixer to latest stable version 3 months ago
event batch update of all stubs with defined code style 5 months ago
exif batch update of all stubs with defined code style 5 months ago
expect batch update of all stubs with defined code style 5 months ago
fann batch update of all stubs with defined code style 5 months ago
ffmpeg batch update of all stubs with defined code style 5 months ago
fileinfo update stubs map + cs fixer 1 week ago
filter add missing @since 8.0 to `FILTER_VALIDATE_BOOL` 2 days ago
fpm batch update of all stubs with defined code style 5 months ago
ftp update typehints for SPL + code style 1 week ago
gd fix typehints in extensions according to reflections 1 week ago
gearman update cs-fixer to latest stable version 3 months ago
geoip batch update of all stubs with defined code style 5 months ago
geos batch update of all stubs with defined code style 5 months ago
gettext change nullable types to union types in attributes 1 month ago
gmagick batch update of all stubs with defined code style 5 months ago
gmp WI-59548 mark stubs functions as mayDependOnGlobalScope 4 months ago
gnupg update constant values 1 month ago
grpc batch update of all stubs with defined code style 5 months ago
hash add typehints for DOM 1 week ago
http batch update of all stubs with defined code style 5 months ago
ibm_db2 db2_last_insert_id may return NULL 1 month ago
iconv batch update of all stubs with defined code style 5 months ago
igbinary batch update of all stubs with defined code style 5 months ago
imagick Avoid using multi-line annotations for PHP 7 compatibility 1 month ago
imap fix typehints in extensions according to reflections 1 week ago
inotify fix stubs according to reflection for new extensions 5 months ago
interbase update cs-fixer to latest stable version 3 months ago
intl fix a couple of typehints for PHP 8.1 1 week ago
json fixed missing return value JsonSerializable::jsonSerialize 2 weeks ago
judy batch update of all stubs with defined code style 5 months ago
ldap fix default typehints in attributes in functions 1 month ago
leveldb batch update of all stubs with defined code style 5 months ago
libevent update cs-fixer to latest stable version 3 months ago
libsodium batch update of all stubs with defined code style 5 months ago
libvirt-php Fix phpdoc blocks 4 months ago
libxml WI-59548 mark stubs functions as mayDependOnGlobalScope 4 months ago
lua batch update of all stubs with defined code style 5 months ago
lzf batch update of all stubs with defined code style 5 months ago
mailparse batch update of all stubs with defined code style 5 months ago
mapscript batch update of all stubs with defined code style 5 months ago
mbstring rollback Required attribute and use PhpStormStubsElementAvailable instead 1 week ago
mcrypt fix stubs according to reflection for new extensions 5 months ago
memcache batch update of all stubs with defined code style 5 months ago
memcached batch update of all stubs with defined code style 5 months ago
meminfo batch update of all stubs with defined code style 5 months ago
meta rollback Required attribute and use PhpStormStubsElementAvailable instead 1 week ago
ming batch update of all stubs with defined code style 5 months ago
mongo Fix phpdoc blocks 4 months ago
mongodb update typehints for mongodb 1 week ago
mosquitto-php batch update of all stubs with defined code style 5 months ago
mqseries batch update of all stubs with defined code style 5 months ago
msgpack batch update of all stubs with defined code style 5 months ago
mssql batch update of all stubs with defined code style 5 months ago
mysql batch update of all stubs with defined code style 5 months ago
mysql_xdevapi batch update of all stubs with defined code style 5 months ago
mysqli fix typehints in extensions according to reflections 1 week ago
ncurses batch update of all stubs with defined code style 5 months ago
newrelic Remove namespace spacing 2 months ago
oauth update cs-fixer to latest stable version 3 months ago
oci8 add oci8 v3 specific changes 2 weeks ago
odbc fix cs-fixer 1 week ago
openssl remove redundant imports 1 week ago
parallel batch update of all stubs with defined code style 5 months ago
pcntl WI-59548 mark stubs functions as mayDependOnGlobalScope 4 months ago
pcov cleanup pcov 2 days ago
pcre update stubs to suite different php versions 1 week ago
pdflib Fix phpdoc blocks 4 months ago
pdo_ibm batch update of all stubs with defined code style 5 months ago
pdo_mysql batch update of all stubs with defined code style 5 months ago
pdo_pgsql batch update of all stubs with defined code style 5 months ago
pdo_sqlite batch update of all stubs with defined code style 5 months ago
pgsql batch update of all stubs with defined code style 5 months ago
phpdbg Add stubs for sapi/phpdbg functions 1 year ago
posix WI-59548 mark stubs functions as mayDependOnGlobalScope 4 months ago
pq batch update of all stubs with defined code style 5 months ago
pspell batch update of all stubs with defined code style 5 months ago
pthreads batch update of all stubs with defined code style 5 months ago
radius batch update of all stubs with defined code style 5 months ago
rar batch update of all stubs with defined code style 5 months ago
rdkafka update constant values 1 month ago
readline batch update of all stubs with defined code style 5 months ago
recode batch update of all stubs with defined code style 5 months ago
redis Use strict typing for zRemRangeByScore 2 weeks ago
regex batch update of all stubs with defined code style 5 months ago
rpminfo batch update of all stubs with defined code style 5 months ago
rrd batch update of all stubs with defined code style 5 months ago
session fixes based on https://github.com/JetBrains/phpstorm-stubs/pull/1152 1 week ago
shmop batch update of all stubs with defined code style 5 months ago
snmp batch update of all stubs with defined code style 5 months ago
soap update stubs map + cs fixer 1 week ago
sockets fix parameters for restored functions 1 week ago
sodium update typehints for SPL + code style 1 week ago
solr batch update of all stubs with defined code style 5 months ago
sqlite3 update stubs map + cs fixer 1 week ago
sqlsrv batch update of all stubs with defined code style 5 months ago
ssh2 batch update of all stubs with defined code style 5 months ago
standard remove redundant imports 1 week ago
stats batch update of all stubs with defined code style 5 months ago
stomp batch update of all stubs with defined code style 5 months ago
suhosin batch update of all stubs with defined code style 5 months ago
superglobals batch update of all stubs with defined code style 5 months ago
svm batch update of all stubs with defined code style 5 months ago
svn batch update of all stubs with defined code style 5 months ago
sybase update cs-fixer to latest stable version 3 months ago
sync fix typehints in extensions according to reflections 1 week ago
sysvmsg batch update of all stubs with defined code style 5 months ago
sysvsem batch update of all stubs with defined code style 5 months ago
sysvshm batch update of all stubs with defined code style 5 months ago
tests rollback Required attribute and use PhpStormStubsElementAvailable instead 1 week ago
tidy batch update of all stubs with defined code style 5 months ago
tokenizer update stubs to php8.1 alpha 3 3 weeks ago
uopz batch update of all stubs with defined code style 5 months ago
uuid batch update of all stubs with defined code style 5 months ago
uv batch update of all stubs with defined code style 5 months ago
v8js batch update of all stubs with defined code style 5 months ago
wddx batch update of all stubs with defined code style 5 months ago
win32service batch update of all stubs with defined code style 5 months ago
winbinder cleanup winbinder 2 days ago
wincache Fix phpdoc blocks 4 months ago
xcache add more type fixes + fix phpdoc syntax 8 months ago
xdebug fix optional parameters 1 week ago
xdiff add stubs for xdiff 2 weeks ago
xhprof batch update of all stubs with defined code style 5 months ago
xlswriter batch update of all stubs with defined code style 5 months ago
xml batch update of all stubs with defined code style 5 months ago
xmlreader update typehints for SPL + code style 1 week ago
xmlrpc batch update of all stubs with defined code style 5 months ago
xmlwriter update typehints for SPL + code style 1 week ago
xsl batch update of all stubs with defined code style 5 months ago
xxtea batch update of all stubs with defined code style 5 months ago
yaf cleanup yaf 2 days ago
yaml batch update of all stubs with defined code style 5 months ago
yar fix stubs according to reflection for new extensions 5 months ago
zend batch update of all stubs with defined code style 5 months ago
zip update typehints for intl 1 week ago
zlib update stubs to suite different php versions 1 week ago
zmq batch update of all stubs with defined code style 5 months ago
zookeeper batch update of all stubs with defined code style 5 months ago
zstd minor reformat 4 months ago
.gitignore updated shared run config. ignore phpunit cache 5 months ago
.php-cs-fixer.php add require to cs-fixer config 3 months ago
CONTRIBUTING.md run composer from docker instead of local 3 months ago
Dockerfile increase php memory limit 1 week ago
Inspections.xml qodana: try custom inspections profile 6 months ago
PhpStormStubsMap.php make couchbase v3 stubs default 2 days ago
README.md update README.md 1 week ago
composer.json update stubs to php8.1 alpha 3 3 weeks ago
docker-compose.yml add separate service for php_under_test 1 week ago
generate-stub-map make couchbase v3 stubs default 2 days ago
phpunit.xml updates after merge with master 1 week ago
qodana.yaml disable unused declaration inspection for qodana 2 weeks ago

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 test_runner composer install -d /opt/project/phpstorm-stubs --ignore-platform-reqs
  2. Execute docker-compose -f docker-compose.yml run -e PHP_VERSION=8.1 test_runner /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 test_runner /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