Skip to content

Commit

Permalink
[phpstorm-stubs] Updated deprecations for PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
gleb.sieemshchikov authored and isfedorov committed Oct 28, 2024
1 parent 310f7c8 commit 33303ba
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions SPL/SPL_c1.php
Original file line number Diff line number Diff line change
Expand Up @@ -1973,6 +1973,7 @@ public function next() {}
public function valid(): bool {}

#[TentativeType]
#[Deprecated("The function is deprecated", since: "8.4")]
public function __wakeup(): void {}

#[PhpStormStubsElementAvailable(from: '8.2')]
Expand Down
2 changes: 1 addition & 1 deletion dba/dba.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,6 @@ function dba_list(): array {}
* value_name). This function will return <b>FALSE</b> if
* <i>key</i> is <b>NULL</b> or <b>FALSE</b>.
*/
function dba_key_split(string|false|null $key): array|false {}
function dba_key_split(#[LanguageLevelTypeAware(["8.4" => "string"], default: "string|false|null")] $key): array|false {}

// End of dba v.
7 changes: 5 additions & 2 deletions dom/dom_c.php
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ class DOMDocument extends DOMNode implements DOMParentNode
* @var string|null
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.actualencoding
*/
#[Deprecated("Actual encoding of the document, is a readonly equivalent to encoding.")]
#[Deprecated("The property is deprecated", since: "8.4")]
#[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
public $actualEncoding;

Expand All @@ -682,7 +682,7 @@ class DOMDocument extends DOMNode implements DOMParentNode
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.config
* @see DOMDocument::normalizeDocument()
*/
#[Deprecated("Configuration used when DOMDocument::normalizeDocument() is invoked.")]
#[Deprecated("The property is deprecated", since: "8.4")]
#[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')]
public $config;

Expand Down Expand Up @@ -2327,6 +2327,7 @@ class DOMEntity extends DOMNode
* parsed entity. This is NULL if it an entity from the internal subset or if it is not known.
* @link https://php.net/manual/en/class.domentity.php#domentity.props.actualencoding
*/
#[Deprecated("The property is deprecated", since: "8.4")]
#[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
public $actualEncoding;

Expand All @@ -2336,6 +2337,7 @@ class DOMEntity extends DOMNode
* parsed entity. This is NULL otherwise.
* @link https://php.net/manual/en/class.domentity.php#domentity.props.encoding
*/
#[Deprecated("The property is deprecated", since: "8.4")]
#[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
public $encoding;

Expand All @@ -2345,6 +2347,7 @@ class DOMEntity extends DOMNode
* external parsed entity. This is NULL otherwise.
* @link https://php.net/manual/en/class.domentity.php#domentity.props.version
*/
#[Deprecated("The property is deprecated", since: "8.4")]
#[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
public $version;
}
Expand Down
3 changes: 3 additions & 0 deletions mysqli/mysqli.php
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ public function init() {}
* @param int $process_id
* @return bool true on success or false on failure.
*/
#[Deprecated("The function is deprecated", since: "8.4")]
#[TentativeType]
public function kill(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $process_id): bool {}

Expand Down Expand Up @@ -555,6 +556,7 @@ public function options(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')]
* @link https://php.net/manual/en/mysqli.ping.php
* @return bool true on success or false on failure.
*/
#[Deprecated("The function is deprecated", since: "8.4")]
#[TentativeType]
public function ping(): bool {}

Expand Down Expand Up @@ -958,6 +960,7 @@ public function use_result(): mysqli_result|false {}
* @return bool TRUE if the refresh was a success, otherwise FALSE
* @since 5.3
*/
#[Deprecated("The function is deprecated", since: "8.4")]
#[TentativeType]
public function refresh(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): bool {}
}
Expand Down

0 comments on commit 33303ba

Please sign in to comment.