Skip to content

Commit

Permalink
Merge pull request #33 from bnf/php84-cautious
Browse files Browse the repository at this point in the history
  • Loading branch information
helhum authored Oct 11, 2024
2 parents f6fc1f5 + af77b31 commit cf2aeba
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 12 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
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']
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']

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

- name: Install dependencies PHP 8.2
# @todo: Needed until prophecy (req by phpunit) allows PHP 8.2, https://github.com/phpspec/prophecy/issues/556
if: ${{ matrix.php > '8.1' }}
run: composer update --ignore-platform-req=php+

- name: Run test suite
run: vendor/bin/phpunit
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"psr-4": { "TYPO3\\ClassAliasLoader\\Test\\": "tests/"}
},
"require": {
"php": ">=5.3.7",
"php": ">=7.1",
"composer-plugin-api": "^1.0 || ^2.0"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/ClassAliasMapGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ClassAliasMapGenerator
* @param Composer $composer
* @param IOInterface $io
*/
public function __construct(Composer $composer, IOInterface $io = null, $config = null)
public function __construct(Composer $composer, ?IOInterface $io = null, $config = null)
{
$this->composer = $composer;
$this->io = $io ?: new NullIO();
Expand Down
5 changes: 3 additions & 2 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Config
* @param PackageInterface $package
* @param IOInterface $io
*/
public function __construct(PackageInterface $package, IOInterface $io = null)
public function __construct(PackageInterface $package, ?IOInterface $io = null)
{
$this->io = $io ?: new NullIO();
$this->setAliasLoaderConfigFromPackage($package);
Expand All @@ -55,7 +55,8 @@ public function get($configKey)
throw new \InvalidArgumentException('Configuration key must not be empty', 1444039407);
}
// Extract parts of the path
$configKey = str_getcsv($configKey, '.');
$configKey = str_getcsv($configKey, '.', '"', '\\');

// Loop through each part and extract its value
$value = $this->config;
foreach ($configKey as $segment) {
Expand Down
2 changes: 1 addition & 1 deletion src/IncludeFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class IncludeFile
* @param TokenInterface[] $tokens
* @param Filesystem $filesystem
*/
public function __construct(IOInterface $io, Composer $composer, array $tokens, Filesystem $filesystem = null)
public function __construct(IOInterface $io, Composer $composer, array $tokens, ?Filesystem $filesystem = null)
{
$this->io = $io;
$this->composer = $composer;
Expand Down

0 comments on commit cf2aeba

Please sign in to comment.