Go to file
Ivan Fedorov 69fcf55d6f [phpstorm-stubs] update php 8.2 to rc7 2022-11-28 19:28:46 +01:00
.github/workflows adding 8.2alpha support 2022-07-15 10:54:14 +02:00
.idea [phpstorm-stubs] suppress PhpInconsistentReturnPointsInspection in stubs 2022-07-15 21:43:34 +02:00
Core Add cavariance to iterator 2022-10-12 14:20:29 +02:00
Ev use LanguageLevelTypeAware for typehints 2021-07-28 13:42:43 +02:00
FFI Fix FFI\CType::TYPE_LONG_DOUBLE constant typo. 2022-06-28 12:18:48 +02:00
LuaSandbox [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
PDO [phpstorm-stubs] fix stub for PDO::query 2022-11-28 16:57:24 +01:00
Parle fix parle stub ERROR_UNKNOWN_TOKEN 2021-06-18 11:40:18 +03:00
Phar [phpstorm-stubs] update stubs according to php 5.6 2022-07-12 17:35:50 +02:00
Reflection Add stub for getClosureCalledClass 2022-10-04 12:16:46 +02:00
SPL PHP 8.2: Added SplFixedArray::__serialize() and SplFixedArray::__unserialize() 2022-09-07 10:37:03 +02:00
SQLite [phpstorm-stubs] move SQLITE3_DETERMINISTIC to correct stub 2022-11-03 21:45:55 +01:00
SaxonC batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
SimpleXML [phpstorm-stubs] add int ranges 2022-04-11 10:45:14 +02:00
SplType batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
Zend OPcache Add ArrayShape attributes for functions 2022-10-17 11:21:37 +02: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 [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01: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 [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
bcmath [phpstorm-stubs] fix default values according to reflection 2022-01-20 12:50:21 +01:00
blackfire Transaction related transactions are static 2022-03-15 15:06:42 +01:00
bz2 Add ArrayShape attributes for functions 2022-10-17 11:21:37 +02:00
calendar Add ArrayShape attributes for functions 2022-10-17 11:21:37 +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 update couchbase stub to 3.2.2 2022-08-26 18:00:01 +02:00
couchbase_v2 [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01: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 Apply suggestions from code review 2022-10-17 11:21:37 +02:00
date DateTimeZone::__construct throws Exception 2022-11-16 19:01:08 +01:00
dba 8.2 beta 2 changes 2022-08-09 19:08:31 +02:00
decimal [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
dio CS Fixer fixes 2022-03-25 09:52:40 +01:00
dom fixed readonly DOMNodeList::length 2022-07-12 20:19:28 +02:00
ds Fix code style issues 2022-09-21 12:52:04 +02:00
eio [phpstorm-stubs] WI-65025 add stubs for eio extension 2022-02-18 11:02:20 +01:00
elastic_apm Add stubs for elastic_apm extension 2021-11-23 18:09:59 +01:00
enchant update cs-fixer to latest stable version 2021-05-09 12:48:46 +03:00
event [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01: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 Added true return type via LanguageLevelTypeAware and other minor fixes 2022-07-21 15:17:52 +02:00
filter Bulk changes based on https://github.com/JetBrains/phpstorm-stubs/pull/1411 2022-07-27 17:56:51 +02:00
fpm fpm_get_status may return false if the fpm scoreboard is locked or unavailable. 2022-10-06 17:37:46 +02:00
ftp [phpstorm-stubs] fix final modifier for classes 2021-10-13 09:58:12 +02:00
gd [phpstorm-stubs] WI-68647 add overloaded imagefilledpolygon function 2022-11-06 10:06:00 +01:00
gearman [phpstorm-stubs] WI-67518 Gearman:do*() methods: $unique parameter's type should be nullable string 2022-07-28 14:44:56 +02: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 [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
gmp gmp_gcdext change type to mixed in ArrayShape 2022-10-17 11:21:37 +02:00
gnupg [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
grpc Fix parameter definition for Grpc\ChannelCredentials::createSsl 2021-09-09 18:57:58 +02:00
hash [phpstorm-stubs] add int ranges 2022-04-11 10:45:14 +02:00
http [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
ibm_db2 db2_last_insert_id may return NULL 2021-06-27 18:25:06 +03:00
iconv Add ArrayShape attributes for functions 2022-10-17 11:21:37 +02:00
igbinary batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
imagick WI-66372 Fixed typos in ArrayShape 2022-05-04 15:53:14 +02:00
imap Add ArrayShape attributes for functions 2022-10-17 11:21:37 +02:00
inotify fix stubs according to reflection for new extensions 2021-03-18 17:50:44 +03:00
interbase [phpstorm-stubs] update deprecations 2022-01-05 13:50:04 +01:00
intl [phpstorm-stubs] WI-69083 parameter in IntlBreakIterator::getPartsIterator should have type int 2022-11-06 22:35:05 +01:00
json [phpstorm-stubs] update stubs according to latest php 8.1 2022-04-28 10:53:09 +02:00
judy [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
ldap Add ArrayShape attributes for functions 2022-10-17 11:21:37 +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 [phpstorm-stubs] added missed sodium functions 2022-07-26 16:02:10 +02:00
libvirt-php Fix phpdoc blocks 2021-04-12 00:14:29 +03:00
libxml added 2 new functions 2022-09-07 12:47:56 +02: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 Add ArrayShape attributes for functions 2022-10-17 11:21:37 +02:00
mcrypt [phpstorm-stubs] update deprecations 2022-01-05 13:50:04 +01:00
memcache [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
memcached Added since tag for GET_EXTENDED 2022-07-11 17:42:09 +02:00
meminfo batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
meta [phpstorm-stubs] WI-69449 add expected values for PHP_VERSION & PHP_VERSION_ID 2022-11-06 16:18:36 +01:00
ming batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
mongo [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
mongodb MongoDB Serializable interface is not deprecated 2022-05-06 16:42:36 +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 allow stdClass 2021-12-04 15:33:33 +01:00
mysql_xdevapi batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
mysqli Add ArrayShape attributes for functions 2022-10-17 11:21:37 +02:00
ncurses batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
newrelic Additional signature for newrelic_notice_error for passing an Exception 2022-05-02 18:49:17 +02:00
oauth update cs-fixer to latest stable version 2021-05-09 12:48:46 +03:00
oci8 Add ArrayShape attributes for functions 2022-10-17 11:21:37 +02:00
odbc Add ArrayShape attributes for functions 2022-10-17 11:21:37 +02:00
openssl Apply suggestions from code review 2022-10-17 11:21:37 +02:00
parallel batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
pcntl 8.2 beta 2 changes 2022-08-09 19:08:31 +02:00
pcov cleanup pcov 2021-08-03 13:32:00 +02:00
pcre Bulk changes based on https://github.com/JetBrains/phpstorm-stubs/pull/1411 2022-07-27 17:56:51 +02:00
pdflib Fix CS from PDFLib 2022-03-15 15:06:42 +01: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 Add ArrayShape attributes for functions 2022-10-17 11:21:37 +02:00
phpdbg Add stubs for sapi/phpdbg functions 2020-05-13 21:20:22 +03:00
posix Add ArrayShape attributes for functions 2022-10-17 11:21:37 +02:00
pq [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
pspell [phpstorm-stubs] fix default values according to reflection 2022-01-20 12:50:21 +01: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
random [phpstorm-stubs] update 8.2 to beta 3 2022-08-25 15:04:30 +02:00
rar [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
rdkafka fixed return type RdKafka\ConsumerTopic::consume() 2022-10-14 11:43:20 +02:00
readline Add ArrayShape attributes for functions 2022-10-17 11:21:37 +02:00
recode [phpstorm-stubs] update deprecations 2022-01-05 13:50:04 +01:00
redis fix: `$position` paramter to `lInsert()` is string 2022-11-06 12:32:27 +01: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 [phpstorm-stubs] update stubs according to php 5.6 2022-07-12 17:35:50 +02:00
shmop batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
simple_kafka_client [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
snappy/snappy Updated StubsMap and fixed formatting. 2022-04-08 16:44:22 +02:00
snmp [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
soap fix docblock variable type for SoapFault 2022-10-06 17:21:48 +02:00
sockets [phpstorm-stubs] update php for test to 8.2 rc4 2022-10-18 11:34:37 +02:00
sodium [phpstorm-stubs] remove psalm-like phpdoc 2022-07-26 16:02:10 +02:00
solr batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
sqlite3 [phpstorm-stubs] move SQLITE3_DETERMINISTIC to correct stub 2022-11-03 21:45:55 +01: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 Update 404 link for stream constants 2022-11-19 23:14:27 +01: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 argc/argv type inference 2022-09-23 18:42:14 +02:00
svm [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
svn [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
swoole Remove Swoole SIG- and PRIO- pcntl constants redefinitions. 2022-03-10 17:27:04 +01: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 Add ArrayShape attributes for functions 2022-10-17 11:21:37 +02: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.2 to rc7 2022-11-28 19:28:46 +01:00
tidy [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
tokenizer [phpstorm-stubs] cleanup 2022-07-12 17:35:50 +02:00
uopz update stubs for uopz 2021-08-14 20:08:16 +02:00
uploadprogress Add stubs for uploadprogress PECL extension 2022-01-20 07:49:42 +01: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 [phpstorm-stubs] improve PhpDocs a bit 2022-05-03 13:08:34 +02:00
wddx [phpstorm-stubs] update deprecations 2022-01-05 13:50:04 +01: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 [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
xml [phpstorm-stubs] update php for test to 8.2 rc4 2022-10-18 11:34:37 +02:00
xmlreader [phpstorm-stubs] WI-68667 return type of static XMLReader::open() should be bool|XMLReader 2022-11-05 13:03:05 +01: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 [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
yaml batch update of all stubs with defined code style 2021-03-17 17:45:32 +03:00
yar [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
zend [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
zip zip.php: refactor "mixed" phpdocs 2022-10-12 11:31:17 +02:00
zlib [phpstorm-stubs] fix default values according to reflection 2022-01-20 12:50:21 +01:00
zmq [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
zookeeper [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
zstd minor reformat 2021-03-24 23:44:07 +03:00
.gitignore Minor change 2022-03-21 10:22:36 +01:00
.php-cs-fixer.php [phpstorm-stubs] replace deprecated cs-fixer rule with a modern one 2022-02-23 17:45:11 +01:00
.space.kts Warmup jobs 2021-11-24 15:32:25 +00:00
CONTRIBUTING.md Remove more unnecessary dir args 2022-03-21 10:22:36 +01:00
Inspections.xml qodana: try custom inspections profile 2021-02-01 18:13:25 +03:00
PhpStormStubsMap.php [phpstorm-stubs] update stubs map 2022-11-03 21:49:07 +01:00
README.md Remove more unnecessary dir args 2022-03-21 10:22:36 +01:00
composer.json [phpstorm-stubs] initial version of support for php 7.0 2021-12-06 17:24:42 +01:00
docker-compose.yml cleanup 2021-08-14 20:08:16 +02:00
phpunit.xml.dist return type fixes aligned with LanguageLevelTypeAware 2022-07-21 15:17:52 +02:00
qodana.yaml [phpstorm-stubs] fix stubs dirs in qodana config 2021-11-14 08:36:23 +01:00
runTests.sh Convert stub map check into a phpunit test and add it to tests runner 2022-03-21 10:22:36 +01: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.

Please note that currently there are no tests for the thrown exceptions so @throws tags should be checked manually according to official docs or PHP source code

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 --ignore-platform-reqs
  2. Execute docker-compose -f docker-compose.yml run -e PHP_VERSION=8.0 test_runner vendor/bin/phpunit --testsuite PHP_8.0

How to update stub map

Execute docker-compose -f docker-compose.yml run test_runner /usr/local/bin/php 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