Skip to content

Commit

Permalink
[phpstorm-stubs] update stubs to migration version for php 8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
isfedorov committed Nov 14, 2022
1 parent 1eb87f3 commit 6c9661e
Show file tree
Hide file tree
Showing 36 changed files with 1,306 additions and 371 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,30 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
name: Run tests against php 8.1
name: Run tests against php 8.2
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build Docker Container
run: docker-compose -f docker-compose.yml build >/dev/null
env:
PHP_VERSION: '8.1'
PHP_VERSION: '8.2'

- name: Composer Install
run: docker-compose -f docker-compose.yml run -e PHP_VERSION=8.1 test_runner composer update
run: docker-compose -f docker-compose.yml run -e PHP_VERSION=8.2 test_runner composer update
env:
PHP_VERSION: '8.1'
PHP_VERSION: '8.2'

- name: Dump Reflection To File
run: docker-compose -f docker-compose.yml run -e PHP_VERSION=8.1 php_under_test /usr/local/bin/php tests/Tools/dump-reflection-to-file.php ReflectionData.json
run: docker-compose -f docker-compose.yml run -e PHP_VERSION=8.2 php_under_test /usr/local/bin/php tests/Tools/dump-reflection-to-file.php ReflectionData.json
env:
PHP_VERSION: '8.1'
PHP_VERSION: '8.2'

- name: Run Tests
run: docker-compose -f docker-compose.yml run -e PHP_VERSION=8.1 test_runner vendor/bin/phpunit --testsuite PHP_8.1
run: docker-compose -f docker-compose.yml run -e PHP_VERSION=8.2 test_runner vendor/bin/phpunit --testsuite PHP_8.2
env:
PHP_VERSION: '8.1'
PHP_VERSION: '8.2'
additional:
runs-on: ubuntu-latest
name: Run cs-fixer and stubs structure tests
Expand Down
8 changes: 4 additions & 4 deletions Core/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -669,9 +669,9 @@ function set_error_handler(?callable $callback, int $error_levels = E_ALL|E_STRI
/**
* Restores the previous error handler function
* @link https://php.net/manual/en/function.restore-error-handler.php
* @return bool This function always returns true.
* @return true This function always returns true.
*/
function restore_error_handler(): bool {}
function restore_error_handler(): true {}

/**
* Sets a user-defined exception handler function
Expand All @@ -692,9 +692,9 @@ function set_exception_handler(?callable $callback) {}
/**
* Restores the previously defined exception handler function
* @link https://php.net/manual/en/function.restore-exception-handler.php
* @return bool This function always returns true.
* @return true This function always returns true.
*/
function restore_exception_handler(): bool {}
function restore_exception_handler(): true {}

/**
* Returns an array with the name of the defined classes
Expand Down
30 changes: 30 additions & 0 deletions Core/Core_c.php
Original file line number Diff line number Diff line change
Expand Up @@ -1028,3 +1028,33 @@ final class ReturnTypeWillChange
{
public function __construct() {}
}

/**
* @since 8.2
*/
final class AllowDynamicProperties
{
public function __construct() {}
}

/**
* @since 8.2
*/
final class SensitiveParameter
{
public function __construct() {}
}

/**
* @since 8.2
*/
final class SensitiveParameterValue
{
private readonly mixed $value;

public function __construct(mixed $value) {}

public function getValue(): mixed {}

public function __debugInfo(): array {}
}
Loading

0 comments on commit 6c9661e

Please sign in to comment.