diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index da58ba8a5..48d916394 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -49,7 +49,5 @@ runs: - name: Install dependencies with Composer uses: ramsey/composer-install@3.0.0 with: - # Revert when psalm supports PHP 8.4 - # composer-options: "--no-suggest" - composer-options: "--no-suggest ${{ inputs.php-version == '8.4' && '--ignore-platform-req=php+' || '' }}" + composer-options: "--no-suggest" working-directory: "${{ inputs.working-directory }}" diff --git a/composer.json b/composer.json index 5a2c10def..f4aee2618 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "phpunit/phpunit": "^10.5.35", "rector/rector": "^1.2", "squizlabs/php_codesniffer": "^3.7", - "vimeo/psalm": "^5.13" + "vimeo/psalm": "^6.5" }, "replace": { "mongodb/builder": "*" diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 321bbc05a..eb68663a1 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + @@ -398,11 +398,6 @@ current()]]> - - - - - @@ -754,9 +749,6 @@ - - - @@ -772,9 +764,6 @@ - - - @@ -922,9 +911,6 @@ postBatchResumeToken]]> - - - cursor->firstBatch]]> cursor->postBatchResumeToken]]> @@ -963,10 +949,6 @@ - - - - diff --git a/psalm.xml.dist b/psalm.xml.dist index 83d825d51..ba737bd6a 100644 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -2,6 +2,8 @@ - - - - - - diff --git a/stubs/BSON/Document.stub.php b/stubs/BSON/Document.stub.php deleted file mode 100644 index b1b3c60fb..000000000 --- a/stubs/BSON/Document.stub.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -final class Document implements \IteratorAggregate, \Serializable -{ - private function __construct() {} - - final static public function fromBSON(string $bson): Document {} - - final static public function fromJSON(string $json): Document {} - - /** @param array|object $value */ - final static public function fromPHP($value): Document {} - - /** @return TValue */ - final public function get(string $key) {} - - /** @return Iterator */ - final public function getIterator(): Iterator {} - - final public function has(string $key): bool {} - - /** @return array|object */ - final public function toPHP(?array $typeMap = null) {} - - final public function toCanonicalExtendedJSON(): string {} - - final public function toRelaxedExtendedJSON(): string {} - - final public function __toString(): string {} - - final public static function __set_state(array $properties): Document {} - - final public function serialize(): string {} - - /** @param string $serialized */ - final public function unserialize($serialized): void {} - - final public function __unserialize(array $data): void {} - - final public function __serialize(): array {} -} diff --git a/stubs/BSON/Iterator.stub.php b/stubs/BSON/Iterator.stub.php deleted file mode 100644 index cc8f699e4..000000000 --- a/stubs/BSON/Iterator.stub.php +++ /dev/null @@ -1,29 +0,0 @@ - - */ -final class Iterator implements \Iterator -{ - final private function __construct() {} - - /** @return TValue */ - final public function current() {} - - /** @return TKey */ - final public function key() {} - - final public function next(): void {} - - final public function rewind(): void {} - - final public function valid(): bool {} - - final public function __wakeup(): void {} -} diff --git a/stubs/BSON/PackedArray.stub.php b/stubs/BSON/PackedArray.stub.php deleted file mode 100644 index 231a55019..000000000 --- a/stubs/BSON/PackedArray.stub.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -final class PackedArray implements \IteratorAggregate, \Serializable -{ - private function __construct() {} - - final static public function fromPHP(array $value): PackedArray {} - - /** @return TValue */ - final public function get(int $index) {} - - /** @return Iterator */ - final public function getIterator(): Iterator {} - - final public function has(int $index): bool {} - - /** @return array|object */ - final public function toPHP(?array $typeMap = null) {} - - final public function __toString(): string {} - - final public static function __set_state(array $properties): PackedArray {} - - final public function serialize(): string {} - - /** @param string $serialized */ - final public function unserialize($serialized): void {} - - final public function __unserialize(array $data): void {} - - final public function __serialize(): array {} -}