Skip to content

Commit cd59ef0

Browse files
Test on PHP 8.5 (#591)
1 parent 24ac4c7 commit cd59ef0

File tree

13 files changed

+16
-159
lines changed

13 files changed

+16
-159
lines changed

.gitattributes

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
/phpstan-baseline.neon export-ignore
1111
/phpstan.neon.dist export-ignore
1212
/phpunit.xml.dist export-ignore
13-
/psalm-baseline.xml export-ignore
14-
/psalm.xml export-ignore
1513
/README.md export-ignore
1614
/UPGRADING.md export-ignore
1715
/vendor-bin export-ignore

.github/workflows/static.yml

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ jobs:
1111

1212
steps:
1313
- name: Checkout code
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v6
1515

1616
- name: Setup PHP
1717
uses: shivammathur/setup-php@v2
1818
with:
19-
php-version: '8.4'
19+
php-version: '8.5'
2020
tools: composer:v2
2121
coverage: none
2222
env:
@@ -38,37 +38,3 @@ jobs:
3838

3939
- name: Execute PHPStan
4040
run: vendor/bin/phpstan analyze --no-progress
41-
42-
psalm:
43-
name: Psalm
44-
runs-on: ubuntu-24.04
45-
46-
steps:
47-
- name: Checkout code
48-
uses: actions/checkout@v4
49-
50-
- name: Setup PHP
51-
uses: shivammathur/setup-php@v2
52-
with:
53-
php-version: '8.4'
54-
tools: composer:v2
55-
coverage: none
56-
env:
57-
update: true
58-
59-
- name: Install Dependencies
60-
uses: nick-invision/retry@v3
61-
with:
62-
timeout_minutes: 5
63-
max_attempts: 5
64-
command: composer update --no-interaction --no-progress
65-
66-
- name: Install Psalm
67-
uses: nick-invision/retry@v3
68-
with:
69-
timeout_minutes: 5
70-
max_attempts: 5
71-
command: composer bin psalm update --no-interaction --no-progress
72-
73-
- name: Execute Psalm
74-
run: vendor/bin/psalm.phar --no-progress --output-format=github

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111

1212
strategy:
1313
matrix:
14-
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
14+
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
1515

1616
steps:
1717
- name: Checkout Code
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@v6
1919

2020
- name: Setup PHP
2121
uses: shivammathur/setup-php@v2
@@ -43,11 +43,11 @@ jobs:
4343

4444
strategy:
4545
matrix:
46-
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
46+
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
4747

4848
steps:
4949
- name: Checkout Code
50-
uses: actions/checkout@v4
50+
uses: actions/checkout@v6
5151

5252
- name: Setup PHP
5353
uses: shivammathur/setup-php@v2

Makefile

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
11
install:
2-
@docker run -it -w /data -v ${PWD}:/data:delegated -v ~/.composer:/root/.composer:delegated --entrypoint composer --rm registry.gitlab.com/grahamcampbell/php:8.4-base update
3-
@docker run -it -w /data -v ${PWD}:/data:delegated -v ~/.composer:/root/.composer:delegated --entrypoint composer --rm registry.gitlab.com/grahamcampbell/php:8.4-base bin all update
2+
@docker run -it -w /data -v ${PWD}:/data:delegated -v ~/.composer:/root/.composer:delegated --entrypoint composer --rm registry.gitlab.com/grahamcampbell/php:8.5-base update
3+
@docker run -it -w /data -v ${PWD}:/data:delegated -v ~/.composer:/root/.composer:delegated --entrypoint composer --rm registry.gitlab.com/grahamcampbell/php:8.5-base bin all update
44

55
phpunit:
6-
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit --rm registry.gitlab.com/grahamcampbell/php:8.4-cli
6+
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit --rm registry.gitlab.com/grahamcampbell/php:8.5-cli
77

88
phpstan-analyze:
9-
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpstan --rm registry.gitlab.com/grahamcampbell/php:8.4-cli analyze
9+
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpstan --rm registry.gitlab.com/grahamcampbell/php:8.5-cli analyze
1010

1111
phpstan-baseline:
12-
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpstan --rm registry.gitlab.com/grahamcampbell/php:8.4-cli analyze --generate-baseline
12+
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpstan --rm registry.gitlab.com/grahamcampbell/php:8.5-cli analyze --generate-baseline
1313

14-
psalm-analyze:
15-
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm.phar --rm registry.gitlab.com/grahamcampbell/php:8.4-cli
16-
17-
psalm-baseline:
18-
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm.phar --rm registry.gitlab.com/grahamcampbell/php:8.4-cli --set-baseline=psalm-baseline.xml
19-
20-
psalm-show-info:
21-
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm.phar --rm registry.gitlab.com/grahamcampbell/php:8.4-cli --show-info=true
22-
23-
test: phpunit phpstan-analyze psalm-analyze
14+
test: phpunit phpstan-analyze
2415

2516
clean:
2617
@rm -rf .phpunit.result.cache composer.lock vendor vendor-bin/*/composer.lock vendor-bin/*/vendor

README.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,7 @@ Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` au
1212
</p>
1313

1414
<div align="center">
15-
1615
**Special thanks to [our sponsors](https://github.com/sponsors/GrahamCampbell)**
17-
18-
<br>
19-
<a href="https://www.dotenvx.com/?utm_source=github&utm_medium=referral&utm_campaign=phpdotenv">
20-
<div>
21-
<img src="https://dotenvx.com/logo.png" width="120" alt="Dotenvx">
22-
</div>
23-
<b>Need to sync .env files across teams and environments?</b>
24-
<div>
25-
<sup>Dotenvx builds on the simplicity of phpdotenv with support for encryption, multiple environments, and team workflows. Use it alongside phpdotenv to modernize your secrets management.</sup>
26-
</div>
27-
</a>
28-
2916
<hr>
3017
</div>
3118

phpstan-baseline.neon

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,6 @@ parameters:
138138
count: 1
139139
path: src/Util/Regex.php
140140

141-
-
142-
message: '#^Call to function is_string\(\) with string will always evaluate to true\.$#'
143-
identifier: function.alreadyNarrowedType
144-
count: 1
145-
path: src/Util/Str.php
146-
147141
-
148142
message: '#^Loose comparison via "\=\=" is not allowed\.$#'
149143
identifier: equal.notAllowed

psalm-baseline.xml

Lines changed: 0 additions & 51 deletions
This file was deleted.

psalm.xml

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/Parser/EntryParser.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ private static function parseValue(string $value)
168168
});
169169
});
170170
}, Success::create([Value::blank(), self::INITIAL_STATE]))->flatMap(static function (array $result) {
171-
/** @psalm-suppress DocblockTypeContradiction */
172171
if (in_array($result[1], self::REJECT_STATES, true)) {
173172
/** @var \GrahamCampbell\ResultType\Result<\Dotenv\Parser\Value, string> */
174173
return Error::create('a missing closing quote');

src/Repository/Adapter/EnvConstAdapter.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ public function read(string $name)
5353
return 'true';
5454
}
5555

56-
/** @psalm-suppress PossiblyInvalidCast */
5756
return (string) $value;
5857
});
5958
}

0 commit comments

Comments
 (0)