Skip to content

Commit

Permalink
Merge pull request #3 from osteel/feature/proper-compatibility-testing
Browse files Browse the repository at this point in the history
Improved compatibility testing
  • Loading branch information
osteel authored Jun 30, 2022
2 parents aa6f672 + c0e6fae commit 62dd36d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,19 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
dependency-versions:
- "lowest"
- "highest"

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -41,7 +45,9 @@ jobs:
coverage: none

- name: Install composer dependencies
uses: "ramsey/composer-install@v1"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: ${{ matrix.dependency-versions }}

- name: Run PHPUnit
run: vendor/bin/phpunit
run: vendor/bin/phpunit
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"require": {
"php": "^7.4|^8.0",
"symfony/console": "^5.0 | ^6.0"
"symfony/console": "^5.1|^6.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.6",
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ private function processHighlight(string $source, string $target, array $constan
while (! empty($line = $this->readLine($source))) {
if ($note !== null) {
$note .= sprintf("\n%s", $line);
} elseif (is_null($note = str_starts_with($line, 'Note: ') ? substr($line, 6) : null)) {
} elseif (is_null($note = strpos($line, 'Note: ') === 0 ? substr($line, 6) : null)) {
$highlight .= sprintf("\n%s", $line);
}
}
Expand Down

0 comments on commit 62dd36d

Please sign in to comment.