Skip to content

Commit cf2aeba

Browse files
authored
Merge pull request #33 from bnf/php84-cautious
2 parents f6fc1f5 + af77b31 commit cf2aeba

File tree

5 files changed

+7
-12
lines changed

5 files changed

+7
-12
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
php: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
12+
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
1313

1414
steps:
1515
- uses: actions/checkout@v2
@@ -28,13 +28,7 @@ jobs:
2828
find src/ tests/ -name '*.php' -print0 | xargs -0 -n1 -P4 php -dxdebug.mode=off -l >/dev/null
2929
3030
- name: Install dependencies
31-
if: ${{ matrix.php <= '8.1' }}
3231
run: composer update
3332

34-
- name: Install dependencies PHP 8.2
35-
# @todo: Needed until prophecy (req by phpunit) allows PHP 8.2, https://github.com/phpspec/prophecy/issues/556
36-
if: ${{ matrix.php > '8.1' }}
37-
run: composer update --ignore-platform-req=php+
38-
3933
- name: Run test suite
4034
run: vendor/bin/phpunit

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"psr-4": { "TYPO3\\ClassAliasLoader\\Test\\": "tests/"}
2121
},
2222
"require": {
23-
"php": ">=5.3.7",
23+
"php": ">=7.1",
2424
"composer-plugin-api": "^1.0 || ^2.0"
2525
},
2626
"require-dev": {

src/ClassAliasMapGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class ClassAliasMapGenerator
4646
* @param Composer $composer
4747
* @param IOInterface $io
4848
*/
49-
public function __construct(Composer $composer, IOInterface $io = null, $config = null)
49+
public function __construct(Composer $composer, ?IOInterface $io = null, $config = null)
5050
{
5151
$this->composer = $composer;
5252
$this->io = $io ?: new NullIO();

src/Config.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Config
3939
* @param PackageInterface $package
4040
* @param IOInterface $io
4141
*/
42-
public function __construct(PackageInterface $package, IOInterface $io = null)
42+
public function __construct(PackageInterface $package, ?IOInterface $io = null)
4343
{
4444
$this->io = $io ?: new NullIO();
4545
$this->setAliasLoaderConfigFromPackage($package);
@@ -55,7 +55,8 @@ public function get($configKey)
5555
throw new \InvalidArgumentException('Configuration key must not be empty', 1444039407);
5656
}
5757
// Extract parts of the path
58-
$configKey = str_getcsv($configKey, '.');
58+
$configKey = str_getcsv($configKey, '.', '"', '\\');
59+
5960
// Loop through each part and extract its value
6061
$value = $this->config;
6162
foreach ($configKey as $segment) {

src/IncludeFile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class IncludeFile
4848
* @param TokenInterface[] $tokens
4949
* @param Filesystem $filesystem
5050
*/
51-
public function __construct(IOInterface $io, Composer $composer, array $tokens, Filesystem $filesystem = null)
51+
public function __construct(IOInterface $io, Composer $composer, array $tokens, ?Filesystem $filesystem = null)
5252
{
5353
$this->io = $io;
5454
$this->composer = $composer;

0 commit comments

Comments
 (0)