Skip to content

Commit

Permalink
Merge remote-tracking branch 'vimeo/master' into fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Feb 15, 2024
2 parents 7527d98 + 639bed0 commit 6c444aa
Show file tree
Hide file tree
Showing 168 changed files with 2,862 additions and 1,702 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
composer update --no-install
- name: Cache composer cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ steps.composer-cache.outputs.files_cache }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-phar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
composer update --no-install
- name: Cache composer cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ steps.composer-cache.outputs.files_cache }}
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@ jobs:
env:
COMPOSER_ROOT_VERSION: dev-master

- name: Check all classes are autoloadable
run: |
composer dump-autoload -o --strict-psr
env:
COMPOSER_ROOT_VERSION: dev-master

- name: Cache composer cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ steps.composer-cache.outputs.files_cache }}
Expand Down Expand Up @@ -77,7 +83,7 @@ jobs:
COMPOSER_ROOT_VERSION: dev-master

- name: Cache composer cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ steps.composer-cache.outputs.files_cache }}
Expand Down Expand Up @@ -164,7 +170,7 @@ jobs:
COMPOSER_ROOT_VERSION: dev-master

- name: Cache composer cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ steps.composer-cache.outputs.files_cache }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-labels.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pull Request Labels
name: Pull Request Labels (to be added by maintainers)
on:
pull_request:
types: [opened, reopened, labeled, unlabeled, synchronize]
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
ini-values: zend.assertions=1, assert.exception=1, opcache.enable_cli=1, opcache.jit=function, opcache.jit_buffer_size=512M
php-version: '8.1'
#ini-values: zend.assertions=1, assert.exception=1, opcache.enable_cli=1, opcache.jit=function, opcache.jit_buffer_size=512M
ini-values: zend.assertions=1, assert.exception=1
tools: composer:v2
coverage: none
extensions: none, curl, dom, filter, intl, json, libxml, mbstring, openssl, opcache, pcre, phar, reflection, simplexml, spl, tokenizer, xml, xmlwriter
#extensions: none, curl, dom, filter, intl, json, libxml, mbstring, openssl, opcache, pcre, phar, reflection, simplexml, spl, tokenizer, xml, xmlwriter
extensions: none, curl, dom, filter, intl, json, libxml, mbstring, openssl, pcre, phar, reflection, simplexml, spl, tokenizer, xml, xmlwriter
env:
fail-fast: true

Expand All @@ -83,7 +85,7 @@ jobs:
COMPOSER_ROOT_VERSION: dev-master

- name: Cache composer cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ steps.composer-cache.outputs.files_cache }}
Expand Down
21 changes: 6 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,12 @@
"felixfbecker/language-server-protocol": "^1.5.2",
"fidry/cpu-core-counter": "^0.4.1 || ^0.5.1 || ^1.0.0",
"netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0",
"nikic/php-parser": "^4.16",
"sebastian/diff": "^4.0 || ^5.0",
"nikic/php-parser": "^5.0.0",
"sebastian/diff": "^4.0 || ^5.0 || ^6.0",
"spatie/array-to-xml": "^2.17.0 || ^3.0",
"symfony/console": "^4.1.6 || ^5.0 || ^6.0 || ^7.0",
"symfony/filesystem": "^5.4 || ^6.0 || ^7.0"
},
"conflict": {
"nikic/php-parser": "4.17.0"
},
"provide": {
"psalm/psalm": "self.version"
},
Expand Down Expand Up @@ -96,12 +93,6 @@
"Psalm\\Tests\\": "tests/"
}
},
"repositories": [
{
"type": "path",
"url": "examples/plugins/composer-based/echo-checker"
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"bin": [
Expand All @@ -125,7 +116,7 @@
],
"verify-callmap": "@php phpunit tests/Internal/Codebase/InternalCallMapHandlerTest.php",
"psalm": "@php ./psalm",
"psalm-set-baseline": "@php ./psalm --set-baseline=psalm-baseline.xml",
"psalm-set-baseline": "@php ./psalm --set-baseline",
"tests": [
"@lint",
"@cs",
Expand All @@ -143,8 +134,8 @@
"tests": "Runs all available tests."
},
"support": {
"docs": "https://psalm.dev/docs",
"issues": "https://github.com/vimeo/psalm/issues",
"source": "https://github.com/vimeo/psalm"
"docs": "https://psalm.dev/docs",
"issues": "https://github.com/vimeo/psalm/issues",
"source": "https://github.com/vimeo/psalm"
}
}
3 changes: 3 additions & 0 deletions config.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<xs:attribute name="checkForThrowsInGlobalScope" type="xs:boolean" default="false" />
<xs:attribute name="ensureArrayIntOffsetsExist" type="xs:boolean" default="false" />
<xs:attribute name="ensureArrayStringOffsetsExist" type="xs:boolean" default="false" />
<xs:attribute name="ensureOverrideAttribute" type="xs:boolean" default="false" />
<xs:attribute name="findUnusedCode" type="xs:boolean" default="false" />
<xs:attribute name="findUnusedVariablesAndParams" type="xs:boolean" default="false" />
<xs:attribute name="findUnusedPsalmSuppress" type="xs:boolean" default="false" />
Expand Down Expand Up @@ -285,6 +286,7 @@
<xs:element name="InvalidNamedArgument" type="ArgumentIssueHandlerType" minOccurs="0" />
<xs:element name="InvalidNullableReturnType" type="IssueHandlerType" minOccurs="0" />
<xs:element name="InvalidOperand" type="IssueHandlerType" minOccurs="0" />
<xs:element name="InvalidOverride" type="IssueHandlerType" minOccurs="0" />
<xs:element name="InvalidParamDefault" type="IssueHandlerType" minOccurs="0" />
<xs:element name="InvalidParent" type="IssueHandlerType" minOccurs="0" />
<xs:element name="InvalidPassByReference" type="IssueHandlerType" minOccurs="0" />
Expand Down Expand Up @@ -320,6 +322,7 @@
<xs:element name="MissingDocblockType" type="IssueHandlerType" minOccurs="0" />
<xs:element name="MissingFile" type="IssueHandlerType" minOccurs="0" />
<xs:element name="MissingImmutableAnnotation" type="IssueHandlerType" minOccurs="0" />
<xs:element name="MissingOverrideAttribute" type="IssueHandlerType" minOccurs="0" />
<xs:element name="MissingParamType" type="IssueHandlerType" minOccurs="0" />
<xs:element name="MissingPropertyType" type="PropertyIssueHandlerType" minOccurs="0" />
<xs:element name="MissingReturnType" type="IssueHandlerType" minOccurs="0" />
Expand Down
34 changes: 17 additions & 17 deletions dictionaries/CallMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -1590,7 +1590,7 @@
'DirectoryIterator::getPathInfo' => ['?SplFileInfo', 'class='=>'?class-string'],
'DirectoryIterator::getPathname' => ['string'],
'DirectoryIterator::getPerms' => ['int'],
'DirectoryIterator::getRealPath' => ['string'],
'DirectoryIterator::getRealPath' => ['non-falsy-string'],
'DirectoryIterator::getSize' => ['int'],
'DirectoryIterator::getType' => ['string'],
'DirectoryIterator::isDir' => ['bool'],
Expand Down Expand Up @@ -2792,7 +2792,7 @@
'file' => ['list<string>|false', 'filename'=>'string', 'flags='=>'int', 'context='=>'resource'],
'file_exists' => ['bool', 'filename'=>'string'],
'file_get_contents' => ['string|false', 'filename'=>'string', 'use_include_path='=>'bool', 'context='=>'?resource', 'offset='=>'int', 'length='=>'?int'],
'file_put_contents' => ['int|false', 'filename'=>'string', 'data'=>'string|resource|array<string>', 'flags='=>'int', 'context='=>'resource'],
'file_put_contents' => ['int<0, max>|false', 'filename'=>'string', 'data'=>'string|resource|array<string>', 'flags='=>'int', 'context='=>'resource'],
'fileatime' => ['int|false', 'filename'=>'string'],
'filectime' => ['int|false', 'filename'=>'string'],
'filegroup' => ['int|false', 'filename'=>'string'],
Expand Down Expand Up @@ -2827,7 +2827,7 @@
'FilesystemIterator::getPathInfo' => ['?SplFileInfo', 'class='=>'?class-string'],
'FilesystemIterator::getPathname' => ['string'],
'FilesystemIterator::getPerms' => ['int'],
'FilesystemIterator::getRealPath' => ['string'],
'FilesystemIterator::getRealPath' => ['non-falsy-string'],
'FilesystemIterator::getSize' => ['int'],
'FilesystemIterator::getType' => ['string'],
'FilesystemIterator::isDir' => ['bool'],
Expand Down Expand Up @@ -3296,7 +3296,7 @@
'get_resource_type' => ['string', 'resource'=>'resource'],
'get_resources' => ['array<int,resource>', 'type='=>'?string'],
'getallheaders' => ['array|false'],
'getcwd' => ['string|false'],
'getcwd' => ['non-falsy-string|false'],
'getdate' => ['array{seconds: int<0, 59>, minutes: int<0, 59>, hours: int<0, 23>, mday: int<1, 31>, wday: int<0, 6>, mon: int<1, 12>, year: int, yday: int<0, 365>, weekday: "Monday"|"Tuesday"|"Wednesday"|"Thursday"|"Friday"|"Saturday"|"Sunday", month: "January"|"February"|"March"|"April"|"May"|"June"|"July"|"August"|"September"|"October"|"November"|"December", 0: int}', 'timestamp='=>'?int'],
'getenv' => ['string|false', 'name'=>'string', 'local_only='=>'bool'],
'getenv\'1' => ['array<string,string>'],
Expand Down Expand Up @@ -3343,7 +3343,7 @@
'GlobIterator::getPathInfo' => ['?SplFileInfo', 'class='=>'?class-string'],
'GlobIterator::getPathname' => ['string'],
'GlobIterator::getPerms' => ['int'],
'GlobIterator::getRealPath' => ['string|false'],
'GlobIterator::getRealPath' => ['non-falsy-string|false'],
'GlobIterator::getSize' => ['int'],
'GlobIterator::getType' => ['string|false'],
'GlobIterator::isDir' => ['bool'],
Expand Down Expand Up @@ -5700,10 +5700,10 @@
'ini_restore' => ['void', 'option'=>'string'],
'ini_parse_quantity' => ['int', 'shorthand'=>'non-empty-string'],
'ini_set' => ['string|false', 'option'=>'string', 'value'=>'string|int|float|bool|null'],
'inotify_add_watch' => ['int', 'inotify_instance'=>'resource', 'pathname'=>'string', 'mask'=>'int'],
'inotify_add_watch' => ['int|false', 'inotify_instance'=>'resource', 'pathname'=>'string', 'mask'=>'int'],
'inotify_init' => ['resource|false'],
'inotify_queue_len' => ['int', 'inotify_instance'=>'resource'],
'inotify_read' => ['array|false', 'inotify_instance'=>'resource'],
'inotify_read' => ['array{wd: int, mask: int, cookie: int, name: string}[]|false', 'inotify_instance'=>'resource'],
'inotify_rm_watch' => ['bool', 'inotify_instance'=>'resource', 'watch_descriptor'=>'int'],
'intdiv' => ['int', 'num1'=>'int', 'num2'=>'int'],
'interface_exists' => ['bool', 'interface'=>'string', 'autoload='=>'bool'],
Expand Down Expand Up @@ -8529,7 +8529,7 @@
'openssl_x509_parse' => ['array|false', 'certificate'=>'OpenSSLCertificate|string', 'short_names='=>'bool'],
'openssl_x509_read' => ['OpenSSLCertificate|false', 'certificate'=>'OpenSSLCertificate|string'],
'openssl_x509_verify' => ['int', 'certificate'=>'string|OpenSSLCertificate', 'public_key'=>'string|OpenSSLCertificate|OpenSSLAsymmetricKey|array'],
'ord' => ['int', 'character'=>'string'],
'ord' => ['int<0,255>', 'character'=>'string'],
'OuterIterator::current' => ['mixed'],
'OuterIterator::getInnerIterator' => ['Iterator'],
'OuterIterator::key' => ['int|string'],
Expand Down Expand Up @@ -9722,8 +9722,8 @@
'readline_read_history' => ['bool', 'filename='=>'?string'],
'readline_redisplay' => ['void'],
'readline_write_history' => ['bool', 'filename='=>'?string'],
'readlink' => ['string|false', 'path'=>'string'],
'realpath' => ['string|false', 'path'=>'string'],
'readlink' => ['non-falsy-string|false', 'path'=>'string'],
'realpath' => ['non-falsy-string|false', 'path'=>'string'],
'realpath_cache_get' => ['array'],
'realpath_cache_size' => ['int'],
'recode' => ['string', 'request'=>'string', 'string'=>'string'],
Expand Down Expand Up @@ -9811,7 +9811,7 @@
'RecursiveDirectoryIterator::getPathInfo' => ['?SplFileInfo', 'class='=>'?class-string'],
'RecursiveDirectoryIterator::getPathname' => ['string'],
'RecursiveDirectoryIterator::getPerms' => ['int'],
'RecursiveDirectoryIterator::getRealPath' => ['string'],
'RecursiveDirectoryIterator::getRealPath' => ['non-falsy-string'],
'RecursiveDirectoryIterator::getSize' => ['int'],
'RecursiveDirectoryIterator::getSubPath' => ['string'],
'RecursiveDirectoryIterator::getSubPathname' => ['string'],
Expand Down Expand Up @@ -10631,7 +10631,7 @@
'ReflectionParameter::getDefaultValue' => ['mixed'],
'ReflectionParameter::getDefaultValueConstantName' => ['?string'],
'ReflectionParameter::getName' => ['string'],
'ReflectionParameter::getPosition' => ['int'],
'ReflectionParameter::getPosition' => ['int<0, max>'],
'ReflectionParameter::getType' => ['?ReflectionType'],
'ReflectionParameter::hasType' => ['bool'],
'ReflectionParameter::isArray' => ['bool'],
Expand Down Expand Up @@ -12238,7 +12238,7 @@
'SplFileInfo::getPathInfo' => ['SplFileInfo|null', 'class='=>'?class-string'],
'SplFileInfo::getPathname' => ['string'],
'SplFileInfo::getPerms' => ['int|false'],
'SplFileInfo::getRealPath' => ['string|false'],
'SplFileInfo::getRealPath' => ['non-falsy-string|false'],
'SplFileInfo::getSize' => ['int|false'],
'SplFileInfo::getType' => ['string|false'],
'SplFileInfo::isDir' => ['bool'],
Expand Down Expand Up @@ -12288,7 +12288,7 @@
'SplFileObject::getPathInfo' => ['SplFileInfo|null', 'class='=>'?class-string'],
'SplFileObject::getPathname' => ['string'],
'SplFileObject::getPerms' => ['int|false'],
'SplFileObject::getRealPath' => ['false|string'],
'SplFileObject::getRealPath' => ['false|non-falsy-string'],
'SplFileObject::getSize' => ['int|false'],
'SplFileObject::getType' => ['string|false'],
'SplFileObject::hasChildren' => ['false'],
Expand Down Expand Up @@ -12475,7 +12475,7 @@
'SplTempFileObject::getPathInfo' => ['SplFileInfo|null', 'class='=>'?class-string'],
'SplTempFileObject::getPathname' => ['string'],
'SplTempFileObject::getPerms' => ['int|false'],
'SplTempFileObject::getRealPath' => ['false|string'],
'SplTempFileObject::getRealPath' => ['false|non-falsy-string'],
'SplTempFileObject::getSize' => ['int|false'],
'SplTempFileObject::getType' => ['string|false'],
'SplTempFileObject::hasChildren' => ['false'],
Expand Down Expand Up @@ -12690,8 +12690,8 @@
'ssh2_sftp_chmod' => ['bool', 'sftp'=>'resource', 'filename'=>'string', 'mode'=>'int'],
'ssh2_sftp_lstat' => ['array{0: int, 1: int, 2: int, 3: int, 4: int, 5: int, 6: int, 7: int, 8: int, 9: int, 10: int, 11: int, 12: int, dev: int, ino: int, mode: int, nlink: int, uid: int, gid: int, rdev: int, size: int, atime: int, mtime: int, ctime: int, blksize: int, blocks: int}|false', 'sftp'=>'resource', 'path'=>'string'],
'ssh2_sftp_mkdir' => ['bool', 'sftp'=>'resource', 'dirname'=>'string', 'mode='=>'int', 'recursive='=>'bool'],
'ssh2_sftp_readlink' => ['string|false', 'sftp'=>'resource', 'link'=>'string'],
'ssh2_sftp_realpath' => ['string|false', 'sftp'=>'resource', 'filename'=>'string'],
'ssh2_sftp_readlink' => ['non-falsy-string|false', 'sftp'=>'resource', 'link'=>'string'],
'ssh2_sftp_realpath' => ['non-falsy-string|false', 'sftp'=>'resource', 'filename'=>'string'],
'ssh2_sftp_rename' => ['bool', 'sftp'=>'resource', 'from'=>'string', 'to'=>'string'],
'ssh2_sftp_rmdir' => ['bool', 'sftp'=>'resource', 'dirname'=>'string'],
'ssh2_sftp_stat' => ['array{0: int, 1: int, 2: int, 3: int, 4: int, 5: int, 6: int, 7: int, 8: int, 9: int, 10: int, 11: int, 12: int, dev: int, ino: int, mode: int, nlink: int, uid: int, gid: int, rdev: int, size: int, atime: int, mtime: int, ctime: int, blksize: int, blocks: int}|false', 'sftp'=>'resource', 'path'=>'string'],
Expand Down
Loading

0 comments on commit 6c444aa

Please sign in to comment.