Skip to content

Commit 7f073ba

Browse files
author
Greg Bowler
authored
PHP 7.3 compatibility (#117)
* Improve typehint & match styleguide * fix: checkbox with bracket name notation * build: update correct versions * syntax: remove typed properties for 7.3 compliance
1 parent 22065a0 commit 7f073ba

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
path: /tmp/composer-cache
1616
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
1717

18-
- uses: php-actions/composer@v5
18+
- uses: php-actions/composer@v6
1919

2020
- name: Archive build
2121
run: mkdir /tmp/github-actions/ && tar -cvf /tmp/github-actions/build.tar ./
@@ -40,9 +40,9 @@ jobs:
4040
run: tar -xvf /tmp/github-actions/build.tar ./
4141

4242
- name: PHP Unit tests
43-
uses: php-actions/phpunit@v2
43+
uses: php-actions/phpunit@v3
4444
with:
45-
php_version: 8.0
45+
php_version: 7.3
4646
php_extensions: xdebug
4747
configuration: test/phpunit/phpunit.xml
4848
bootstrap: vendor/autoload.php
@@ -61,6 +61,6 @@ jobs:
6161
run: tar -xvf /tmp/github-actions/build.tar ./
6262

6363
- name: PHP Static Analysis
64-
uses: php-actions/phpstan@v2
64+
uses: php-actions/phpstan@v3
6565
with:
6666
path: src/

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "library",
55

66
"require": {
7-
"php": ">=7.4"
7+
"php": ">=7.3"
88
},
99

1010
"require-dev": {
@@ -26,7 +26,7 @@
2626
"Gt\\CssXPath\\Test\\": "./test/phpunit"
2727
}
2828
},
29-
29+
3030
"authors": [
3131
{
3232
"name": "Greg Bowler",
@@ -35,7 +35,7 @@
3535
"role": "Developer"
3636
}
3737
],
38-
38+
3939
"funding": [
4040
{
4141
"type": "github",

src/Translator.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ class Translator {
2323
const EQUALS_STARTS_WITH_OR_STARTS_WITH_HYPHENATED = "|=";
2424
const EQUALS_STARTS_WITH = "^=";
2525

26-
protected string $cssSelector;
27-
protected string $prefix;
26+
/** @var string */
27+
protected $cssSelector;
28+
/** @var string */
29+
protected $prefix;
2830

2931
public function __construct(string $cssSelector, string $prefix = ".//") {
3032
$this->cssSelector = $cssSelector;

0 commit comments

Comments
 (0)