mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-14 02:11:20 +00:00
Paratest
This commit is contained in:
parent
caecbdc03d
commit
2c40186711
18
.github/workflows/ci.yml
vendored
18
.github/workflows/ci.yml
vendored
@ -12,13 +12,14 @@ jobs:
|
|||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-version }}
|
php-version: ${{ matrix.php-version }}
|
||||||
tools: php-parallel-lint/php-parallel-lint:1
|
- name: Composer Install
|
||||||
|
run: composer install --classmap-authoritative --no-interaction --no-cache
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: parallel-lint --show-deprecated build phpseclib tests
|
run: vendor/bin/parallel-lint --show-deprecated build phpseclib tests
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
php-version: ['8.1']
|
php-version: ['8.1', '8.2']
|
||||||
quality_tools:
|
quality_tools:
|
||||||
name: Quality Tools
|
name: Quality Tools
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
@ -30,15 +31,16 @@ jobs:
|
|||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: '8.1'
|
php-version: '8.1'
|
||||||
tools: squizlabs/php_codesniffer:3, friendsofphp/php-cs-fixer:3, vimeo/psalm:4
|
|
||||||
- name: Composer Install
|
- name: Composer Install
|
||||||
run: composer install --classmap-authoritative --no-interaction --no-cache
|
run: composer install --classmap-authoritative --no-interaction --no-cache
|
||||||
- name: PHP_CodeSniffer
|
- name: PHP_CodeSniffer
|
||||||
run: phpcs --standard=build/php_codesniffer.xml
|
run: vendor/bin/phpcs --standard=build/php_codesniffer.xml
|
||||||
- name: PHP CS Fixer
|
- name: PHP CS Fixer
|
||||||
run: php-cs-fixer fix --config=build/php-cs-fixer.php --diff --dry-run --using-cache=no
|
run: vendor/bin/php-cs-fixer fix --config=build/php-cs-fixer.php --diff --dry-run --using-cache=no
|
||||||
- name: Psalm
|
- name: Psalm
|
||||||
run: psalm --config=build/psalm.xml --no-cache --long-progress --report-show-info=false
|
run: vendor/bin/psalm --config=build/psalm.xml --no-cache --long-progress --report-show-info=false
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
tests:
|
tests:
|
||||||
name: Tests
|
name: Tests
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
@ -75,7 +77,7 @@ jobs:
|
|||||||
echo "PHPSECLIB_SSH_HOME=/home/phpseclib" >> $GITHUB_ENV
|
echo "PHPSECLIB_SSH_HOME=/home/phpseclib" >> $GITHUB_ENV
|
||||||
echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> $GITHUB_ENV
|
echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> $GITHUB_ENV
|
||||||
- name: PHPUnit
|
- name: PHPUnit
|
||||||
run: vendor/bin/phpunit --verbose --configuration tests/phpunit.xml
|
run: vendor/bin/paratest --verbose --configuration=tests/phpunit.xml --runner=WrapperRunner
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -88,11 +88,7 @@ Special Thanks to our $50+ sponsors!:
|
|||||||
|
|
||||||
5. Run continuous integration checks:
|
5. Run continuous integration checks:
|
||||||
```sh
|
```sh
|
||||||
composer global require php:^8.1 squizlabs/php_codesniffer friendsofphp/php-cs-fixer vimeo/psalm
|
composer run-script all-quality-tools
|
||||||
phpcs --standard=build/php_codesniffer.xml
|
|
||||||
php-cs-fixer fix --config=build/php-cs-fixer.php --diff --dry-run --using-cache=no
|
|
||||||
psalm --config=build/psalm.xml --no-cache --long-progress --report-show-info=false --output-format=text
|
|
||||||
vendor/bin/phpunit --verbose --configuration tests/phpunit.xml
|
|
||||||
```
|
```
|
||||||
|
|
||||||
6. Send us a Pull Request
|
6. Send us a Pull Request
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<files psalm-version="4.27.0@faf106e717c37b8c81721845dba9de3d8deed8ff">
|
<files psalm-version="4.29.0@7ec5ffbd5f68ae03782d7fd33fff0c45a69f95b3">
|
||||||
<file src="../phpseclib/Common/Functions/Strings.php">
|
<file src="../phpseclib/Common/Functions/Strings.php">
|
||||||
<MissingParamType occurrences="1">
|
<MissingParamType occurrences="1">
|
||||||
<code>$var</code>
|
<code>$var</code>
|
||||||
@ -284,11 +284,7 @@
|
|||||||
<code>$sb_0[$r >> 24 & 0xff]</code>
|
<code>$sb_0[$r >> 24 & 0xff]</code>
|
||||||
<code>self::$parray[$i]</code>
|
<code>self::$parray[$i]</code>
|
||||||
</MixedOperand>
|
</MixedOperand>
|
||||||
<PossiblyFalseArgument occurrences="10">
|
<PossiblyFalseArgument occurrences="6">
|
||||||
<code>$sha2pass</code>
|
|
||||||
<code>$sha2pass</code>
|
|
||||||
<code>$sha2salt</code>
|
|
||||||
<code>$sha2salt</code>
|
|
||||||
<code>unpack('C*', $this->key)</code>
|
<code>unpack('C*', $this->key)</code>
|
||||||
<code>unpack('N*', $data = $this->encryptBlock($data))</code>
|
<code>unpack('N*', $data = $this->encryptBlock($data))</code>
|
||||||
<code>unpack('N*', $data = $this->encryptBlock($data))</code>
|
<code>unpack('N*', $data = $this->encryptBlock($data))</code>
|
||||||
@ -6507,14 +6503,10 @@
|
|||||||
<code>is_string($this->key)</code>
|
<code>is_string($this->key)</code>
|
||||||
<code>is_string($this->nonce)</code>
|
<code>is_string($this->nonce)</code>
|
||||||
</DocblockTypeContradiction>
|
</DocblockTypeContradiction>
|
||||||
<FalsableReturnStatement occurrences="1"/>
|
|
||||||
<ImplicitToStringCast occurrences="2">
|
<ImplicitToStringCast occurrences="2">
|
||||||
<code>$initial[$i]</code>
|
<code>$initial[$i]</code>
|
||||||
<code>$k[$i]</code>
|
<code>$k[$i]</code>
|
||||||
</ImplicitToStringCast>
|
</ImplicitToStringCast>
|
||||||
<InvalidFalsableReturnType occurrences="1">
|
|
||||||
<code>string</code>
|
|
||||||
</InvalidFalsableReturnType>
|
|
||||||
<InvalidOperand occurrences="1">
|
<InvalidOperand occurrences="1">
|
||||||
<code>$matches[2]</code>
|
<code>$matches[2]</code>
|
||||||
</InvalidOperand>
|
</InvalidOperand>
|
||||||
@ -6871,14 +6863,12 @@
|
|||||||
<MixedReturnStatement occurrences="1">
|
<MixedReturnStatement occurrences="1">
|
||||||
<code>$y->toBytes()</code>
|
<code>$y->toBytes()</code>
|
||||||
</MixedReturnStatement>
|
</MixedReturnStatement>
|
||||||
<PossiblyFalseArgument occurrences="8">
|
<PossiblyFalseArgument occurrences="6">
|
||||||
<code>$m[$i]</code>
|
<code>$m[$i]</code>
|
||||||
<code>$m[$i]</code>
|
<code>$m[$i]</code>
|
||||||
<code>$m[$i]</code>
|
<code>$m[$i]</code>
|
||||||
<code>$m[$i]</code>
|
<code>$m[$i]</code>
|
||||||
<code>$m[$i] ?? ''</code>
|
<code>$m[$i] ?? ''</code>
|
||||||
<code>$output</code>
|
|
||||||
<code>$output</code>
|
|
||||||
<code>pack('N4', 0, $index, 0, 1)</code>
|
<code>pack('N4', 0, $index, 0, 1)</code>
|
||||||
</PossiblyFalseArgument>
|
</PossiblyFalseArgument>
|
||||||
<PossiblyFalseIterator occurrences="4">
|
<PossiblyFalseIterator occurrences="4">
|
||||||
@ -15291,9 +15281,7 @@
|
|||||||
<code>$length</code>
|
<code>$length</code>
|
||||||
<code>$temp</code>
|
<code>$temp</code>
|
||||||
</MixedArgument>
|
</MixedArgument>
|
||||||
<MixedAssignment occurrences="8">
|
<MixedAssignment occurrences="6">
|
||||||
<code>$address</code>
|
|
||||||
<code>$address</code>
|
|
||||||
<code>$agent_data_bytes</code>
|
<code>$agent_data_bytes</code>
|
||||||
<code>$agent_reply_bytes</code>
|
<code>$agent_reply_bytes</code>
|
||||||
<code>$agent_reply_data</code>
|
<code>$agent_reply_data</code>
|
||||||
|
@ -62,7 +62,11 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"ext-xml": "*",
|
"ext-xml": "*",
|
||||||
"phpunit/phpunit": "*"
|
"brianium/paratest": "^6.6",
|
||||||
|
"friendsofphp/php-cs-fixer": "^3.12",
|
||||||
|
"php-parallel-lint/php-parallel-lint": "^1.3",
|
||||||
|
"squizlabs/php_codesniffer": "^3.7",
|
||||||
|
"vimeo/psalm": "^4.29"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.",
|
"ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.",
|
||||||
@ -87,14 +91,14 @@
|
|||||||
"sort-packages": true
|
"sort-packages": true
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "parallel-lint --show-deprecated build phpseclib tests",
|
"lint": "vendor/bin/parallel-lint --show-deprecated build phpseclib tests",
|
||||||
"php_codesniffer": "phpcs --standard=build/php_codesniffer.xml",
|
"php_codesniffer": "vendor/bin/phpcs --standard=build/php_codesniffer.xml",
|
||||||
"php_codesniffer-fix": "phpcbf --standard=build/php_codesniffer.xml",
|
"php_codesniffer-fix": "vendor/bin/phpcbf --standard=build/php_codesniffer.xml",
|
||||||
"php-cs-fixer": "php-cs-fixer fix --config=build/php-cs-fixer.php --diff --using-cache=no --dry-run",
|
"php-cs-fixer": "vendor/bin/php-cs-fixer fix --config=build/php-cs-fixer.php --diff --using-cache=no --dry-run",
|
||||||
"php-cs-fixer-fix": "php-cs-fixer fix --config=build/php-cs-fixer.php --diff --using-cache=no",
|
"php-cs-fixer-fix": "vendor/bin/php-cs-fixer fix --config=build/php-cs-fixer.php --diff --using-cache=no",
|
||||||
"psalm": "psalm --config=build/psalm.xml --no-cache --long-progress",
|
"psalm": "vendor/bin/psalm --config=build/psalm.xml --no-cache --long-progress --threads=4",
|
||||||
"psalm-set-baseline": "psalm --config=build/psalm.xml --no-cache --long-progress --set-baseline=psalm_baseline.xml",
|
"psalm-set-baseline": "vendor/bin/psalm --config=build/psalm.xml --no-cache --long-progress --set-baseline=psalm_baseline.xml --threads=4",
|
||||||
"test": "vendor/bin/phpunit --configuration tests/phpunit.xml",
|
"test": "vendor/bin/paratest --verbose --configuration=tests/phpunit.xml --runner=WrapperRunner",
|
||||||
"all-quality-tools": [
|
"all-quality-tools": [
|
||||||
"@lint",
|
"@lint",
|
||||||
"@phpcs",
|
"@phpcs",
|
||||||
|
Loading…
Reference in New Issue
Block a user