mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-08 14:51:00 +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
|
||||
with:
|
||||
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
|
||||
run: parallel-lint --show-deprecated build phpseclib tests
|
||||
run: vendor/bin/parallel-lint --show-deprecated build phpseclib tests
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-version: ['8.1']
|
||||
php-version: ['8.1', '8.2']
|
||||
quality_tools:
|
||||
name: Quality Tools
|
||||
timeout-minutes: 5
|
||||
@ -30,15 +31,16 @@ jobs:
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.1'
|
||||
tools: squizlabs/php_codesniffer:3, friendsofphp/php-cs-fixer:3, vimeo/psalm:4
|
||||
- name: Composer Install
|
||||
run: composer install --classmap-authoritative --no-interaction --no-cache
|
||||
- name: PHP_CodeSniffer
|
||||
run: phpcs --standard=build/php_codesniffer.xml
|
||||
run: vendor/bin/phpcs --standard=build/php_codesniffer.xml
|
||||
- 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
|
||||
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:
|
||||
name: Tests
|
||||
timeout-minutes: 10
|
||||
@ -75,7 +77,7 @@ jobs:
|
||||
echo "PHPSECLIB_SSH_HOME=/home/phpseclib" >> $GITHUB_ENV
|
||||
echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> $GITHUB_ENV
|
||||
- name: PHPUnit
|
||||
run: vendor/bin/phpunit --verbose --configuration tests/phpunit.xml
|
||||
run: vendor/bin/paratest --verbose --configuration=tests/phpunit.xml --runner=WrapperRunner
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
@ -88,11 +88,7 @@ Special Thanks to our $50+ sponsors!:
|
||||
|
||||
5. Run continuous integration checks:
|
||||
```sh
|
||||
composer global require php:^8.1 squizlabs/php_codesniffer friendsofphp/php-cs-fixer vimeo/psalm
|
||||
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
|
||||
composer run-script all-quality-tools
|
||||
```
|
||||
|
||||
6. Send us a Pull Request
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?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">
|
||||
<MissingParamType occurrences="1">
|
||||
<code>$var</code>
|
||||
@ -284,11 +284,7 @@
|
||||
<code>$sb_0[$r >> 24 & 0xff]</code>
|
||||
<code>self::$parray[$i]</code>
|
||||
</MixedOperand>
|
||||
<PossiblyFalseArgument occurrences="10">
|
||||
<code>$sha2pass</code>
|
||||
<code>$sha2pass</code>
|
||||
<code>$sha2salt</code>
|
||||
<code>$sha2salt</code>
|
||||
<PossiblyFalseArgument occurrences="6">
|
||||
<code>unpack('C*', $this->key)</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->nonce)</code>
|
||||
</DocblockTypeContradiction>
|
||||
<FalsableReturnStatement occurrences="1"/>
|
||||
<ImplicitToStringCast occurrences="2">
|
||||
<code>$initial[$i]</code>
|
||||
<code>$k[$i]</code>
|
||||
</ImplicitToStringCast>
|
||||
<InvalidFalsableReturnType occurrences="1">
|
||||
<code>string</code>
|
||||
</InvalidFalsableReturnType>
|
||||
<InvalidOperand occurrences="1">
|
||||
<code>$matches[2]</code>
|
||||
</InvalidOperand>
|
||||
@ -6871,14 +6863,12 @@
|
||||
<MixedReturnStatement occurrences="1">
|
||||
<code>$y->toBytes()</code>
|
||||
</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>$output</code>
|
||||
<code>$output</code>
|
||||
<code>pack('N4', 0, $index, 0, 1)</code>
|
||||
</PossiblyFalseArgument>
|
||||
<PossiblyFalseIterator occurrences="4">
|
||||
@ -15291,9 +15281,7 @@
|
||||
<code>$length</code>
|
||||
<code>$temp</code>
|
||||
</MixedArgument>
|
||||
<MixedAssignment occurrences="8">
|
||||
<code>$address</code>
|
||||
<code>$address</code>
|
||||
<MixedAssignment occurrences="6">
|
||||
<code>$agent_data_bytes</code>
|
||||
<code>$agent_reply_bytes</code>
|
||||
<code>$agent_reply_data</code>
|
||||
|
@ -62,7 +62,11 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"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": {
|
||||
"ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.",
|
||||
@ -87,14 +91,14 @@
|
||||
"sort-packages": true
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "parallel-lint --show-deprecated build phpseclib tests",
|
||||
"php_codesniffer": "phpcs --standard=build/php_codesniffer.xml",
|
||||
"php_codesniffer-fix": "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-fix": "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-set-baseline": "psalm --config=build/psalm.xml --no-cache --long-progress --set-baseline=psalm_baseline.xml",
|
||||
"test": "vendor/bin/phpunit --configuration tests/phpunit.xml",
|
||||
"lint": "vendor/bin/parallel-lint --show-deprecated build phpseclib tests",
|
||||
"php_codesniffer": "vendor/bin/phpcs --standard=build/php_codesniffer.xml",
|
||||
"php_codesniffer-fix": "vendor/bin/phpcbf --standard=build/php_codesniffer.xml",
|
||||
"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": "vendor/bin/php-cs-fixer fix --config=build/php-cs-fixer.php --diff --using-cache=no",
|
||||
"psalm": "vendor/bin/psalm --config=build/psalm.xml --no-cache --long-progress --threads=4",
|
||||
"psalm-set-baseline": "vendor/bin/psalm --config=build/psalm.xml --no-cache --long-progress --set-baseline=psalm_baseline.xml --threads=4",
|
||||
"test": "vendor/bin/paratest --verbose --configuration=tests/phpunit.xml --runner=WrapperRunner",
|
||||
"all-quality-tools": [
|
||||
"@lint",
|
||||
"@phpcs",
|
||||
|
Loading…
Reference in New Issue
Block a user