Go to file
Kirill Smelov 5bd04c49fd Compatibility fixes after 791d61f58c 2021-11-17 18:22:36 +03:00
.github/workflows [phpstorm-stubs] temporarily disable cs-fixer 2021-11-14 08:53:27 +01:00
.idea Reverted auto-added code by a bug in Phpstorm (https://youtrack.jetbrains.com/issue/WI-57452) 2021-09-07 13:17:50 +02:00
Core Compatibility fixes after 791d61f58c 2021-11-17 18:22:36 +03:00
Ev use LanguageLevelTypeAware for typehints 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 Fix `PDO::PARAM_*` constant values (#1273) 2021-11-12 17:35:02 +01:00
Parle fix parle stub ERROR_UNKNOWN_TOKEN 2021-06-18 11:40:18 +03:00
Phar Tentative return types (#1234) 2021-09-23 16:17:05 +02:00
Reflection Fix documentation link 2021-11-16 16:17:05 +01:00
SPL fix unserialize() phpdoc-return-type 2021-11-16 17:07:26 +01: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 [phpstorm-stubs] improve return types 2021-09-29 18:10:26 +02: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 Added missing zend_disk_cache_info and zend_shm_cache_info functions 2021-09-07 13:17:50 +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 fix doc links for aerospike methods 2021-08-15 07:58:28 +02:00
amqp Fix amqp stubs 2021-10-26 15:21:43 +02: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 cleanup tests 2021-08-30 16:51:56 +02: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 fix stubs for extensions 2021-08-14 20:08:16 +02: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 Updated \Couchbase\Bucket::diagnostics signature 2021-08-30 13:40:14 +02:00
couchbase_v2 make couchbase v3 stubs default 2021-08-03 16:45:11 +02:00
crypto batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
ctype WI-62004 Deprecations for PHP 8.1 2021-08-11 16:26:16 +03:00
cubrid batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
curl Tentative return types (#1234) 2021-09-23 16:17:05 +02:00
date [phpstorm-stubs] minor update phpdoc 2021-11-08 17:17:06 +01: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 [phpstorm-stubs] fix final modifier for classes 2021-10-13 09:58:12 +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 Tentative return types (#1234) 2021-09-23 16:17:05 +02:00
filter deprecated FILTER_SANITIZE_STRIPPED since 8.1 2021-08-19 10:32:48 +02:00
fpm batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
ftp [phpstorm-stubs] fix final modifier for classes 2021-10-13 09:58:12 +02:00
gd [phpstorm-stubs] update php to 8.1rc4 2021-10-15 17:36:12 +02: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 [phpstorm-stubs] gmp_random is not Pure. it changes state in GMP 2021-10-09 21:34:33 +02:00
gnupg update constant values 2021-06-27 18:07:54 +03:00
grpc Fix parameter definition for Grpc\ChannelCredentials::createSsl 2021-09-09 18:57:58 +02:00
hash [phpstorm-stubs] fix final modifier for classes 2021-10-13 09:58:12 +02: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 WI-60724 Incorrect return type for Imagick::textureImage 2021-08-23 14:23:43 +02:00
imap [phpstorm-stubs] fix final modifier for classes 2021-10-13 09:58:12 +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 Tentative return types (#1234) 2021-09-23 16:17:05 +02:00
json Tentative return types (#1234) 2021-09-23 16:17:05 +02:00
judy batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
ldap [phpstorm-stubs] fix final modifier for classes 2021-10-13 09:58:12 +02: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 cleanup 2021-08-14 20:08:16 +02: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 various cleanup and small refactorings 2021-08-14 20:08:16 +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 Also fixed Memcached::setSaslAuthData() return type hint 2021-09-07 13:17:50 +02:00
meminfo batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
meta [phpstorm-stubs] fix test for meta and update related meta files 2021-11-04 14:27:30 +01: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 csfixer + format function 2021-08-14 20:08:16 +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 mysqli::fetch_fields never returns false 2021-10-26 15:06:50 +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 WI-62004 Deprecations for PHP 8.1 2021-08-11 16:26:16 +03:00
openssl [phpstorm-stubs] update php to 8.1rc4 2021-10-15 17:36:12 +02:00
parallel batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
pcntl update stubs after rebase on master 2021-08-14 20:08:16 +02:00
pcov cleanup pcov 2021-08-03 13:32:00 +02:00
pcre Revert "Update pcre.php" 2021-09-08 15:58:27 +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 stubs for RdKafka 2021-08-14 20:08:16 +02:00
readline update stubs to latest php 8.0 and 8.1 2021-08-27 10:01:58 +02:00
recode batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
redis [phpstorm-stubs] WI-63593 fix redis stubs 2021-10-22 13:11:06 +02: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 Tentative return types (#1234) 2021-09-23 16:17:05 +02: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 Tentative return types (#1234) 2021-09-23 16:17:05 +02:00
sockets update stubs after rebase on master 2021-08-14 20:08:16 +02:00
sodium update typehints for SPL + code style 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 Tentative return types (#1234) 2021-09-23 16:17:05 +02:00
sqlsrv batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
ssh2 ssh2_connect :: default port 22 2021-08-09 17:32:30 +02:00
standard Compatibility fixes after 791d61f58c 2021-11-17 18:22:36 +03: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 fix typehints in extensions according to reflections 2021-07-28 13:42:43 +02: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 [phpstorm-stubs] update php 8.1 to rc 6 2021-11-12 12:26:09 +01:00
tidy batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
tokenizer Tentative return types (#1234) 2021-09-23 16:17:05 +02:00
uopz update stubs for uopz 2021-08-14 20:08:16 +02: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 cleanup winbinder 2021-08-03 13:32:00 +02: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 Tentative return types (#1234) 2021-09-23 16:17:05 +02:00
xdiff csfixer + format function 2021-08-14 20:08:16 +02: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 [phpstorm-stubs] fix final modifier for classes 2021-10-13 09:58:12 +02:00
xmlreader Tentative return types (#1234) 2021-09-23 16:17:05 +02:00
xmlrpc batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
xmlwriter Tentative return types (#1234) 2021-09-23 16:17:05 +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 cleanup yaf 2021-08-03 13:32:00 +02: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 Tentative return types (#1234) 2021-09-23 16:17:05 +02:00
zlib [phpstorm-stubs] fix final modifier for classes 2021-10-13 09:58:12 +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 update readme 2021-08-14 20:08:16 +02:00
Inspections.xml qodana: try custom inspections profile 2021-02-01 18:13:25 +03:00
PhpStormStubsMap.php Tentative return types (#1234) 2021-09-23 16:17:05 +02:00
README.md update readme 2021-08-15 20:51:49 +02:00
composer.json Including php-cs-fixer "dev-master" instead of "@stable" to parse 8.1 readonly properties 2021-09-15 21:10:10 +02:00
docker-compose.yml cleanup 2021-08-14 20:08:16 +02:00
phpunit.xml WI-62164 add tests for readonly attribute in property 2021-08-19 10:32:48 +02:00
qodana.yaml [phpstorm-stubs] fix stubs dirs in qodana config 2021-11-14 08:36:23 +01:00
runTests.sh various cleanup and small refactorings 2021-08-14 20:08:16 +02:00

README.md

phpstorm-stubs

official JetBrains project License Total Downloads

PhpStorm Stubs Tests PhpStorm Stubs PECL Test PhpStorm Stubs Check Links

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.0 test_runner /opt/project/phpstorm-stubs/vendor/bin/phpunit --configuration /opt/project/phpstorm-stubs/phpunit.xml --testsuite PHP_8.0

How to update stub map

Execute docker-compose -f docker-compose.yml run test_runner /usr/local/bin/php /opt/project/phpstorm-stubs/tests/Tools/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