Skip to content

Commit c21be45

Browse files
committed
update dependencies
1 parent 4aa135f commit c21be45

File tree

10 files changed

+60
-72
lines changed

10 files changed

+60
-72
lines changed

.github/workflows/php.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,23 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
php-versions: [ '8.2', '8.3' ]
18+
php-versions: [ '8.4', '8.5' ]
19+
dependencies: [ 'locked', 'latest', 'lowest' ]
1920

2021
steps:
21-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v4
2223

2324
- name: Setup PHP
2425
uses: shivammathur/setup-php@v2
2526
with:
2627
php-version: ${{ matrix.php-versions }}
2728

2829
- run: composer validate --strict -n
29-
- run: composer install --prefer-dist --no-progress --no-suggest
30+
31+
- name: Install Composer dependencies
32+
uses: ramsey/composer-install@v3
33+
with:
34+
dependency-versions: ${{ matrix.dependencies }}
35+
composer-options: --prefer-dist --no-suggest --no-scripts
36+
3037
- run: composer check

composer-dependency-analyser.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use ShipMonk\ComposerDependencyAnalyser\Config\Configuration;
6+
use ShipMonk\ComposerDependencyAnalyser\Config\ErrorType;
7+
8+
return new Configuration()
9+
// Adjusting scanned paths
10+
->addPathToScan(__DIR__ . '/src', false)
11+
->addPathToScan(__DIR__ . '/tests', true);

composer-require-checker.json

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

composer-unused.php

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

composer.json

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,26 @@
2828
}
2929
],
3030
"require": {
31-
"php": "^8.1",
31+
"php": "^8.4",
3232

33-
"symfony/framework-bundle": "^5.4 || ^6.4 || ^7.0",
34-
"symfony/dependency-injection": "^5.4 || ^6.4 || ^7.0",
35-
"symfony/http-kernel": "^5.4 || ^6.4 || ^7.0",
36-
"symfony/config": "^5.4 || ^6.4 || ^7.0",
37-
"symfony/twig-bundle": "^5.4 || ^6.4 || ^7.0",
38-
"symfony/yaml": "^5.4 || ^6.4 || ^7.0",
33+
"symfony/dependency-injection": "^7.4 || ^8.0",
34+
"symfony/http-kernel": "^7.4 || ^8.0",
35+
"symfony/config": "^7.4 || ^8.0",
3936

4037
"shapecode/twig-string-loader": "^2.0"
4138
},
4239
"require-dev": {
43-
"doctrine/coding-standard": "^12.0",
40+
"doctrine/coding-standard": "^14.0",
4441
"roave/security-advisories": "dev-master",
45-
"squizlabs/php_codesniffer": "^3.7",
46-
"phpstan/phpstan": "^1.10",
47-
"phpstan/phpstan-deprecation-rules": "^1.1",
48-
"phpstan/phpstan-phpunit": "^1.3",
49-
"phpstan/phpstan-strict-rules": "^1.5",
50-
"maglnet/composer-require-checker": "^4.7",
51-
"phpunit/phpunit": "^10.5",
52-
"symfony/var-dumper": "^7.0",
53-
"icanhazstring/composer-unused": "^0.8"
54-
},
42+
"squizlabs/php_codesniffer": "^4.0",
43+
"phpstan/phpstan": "^2.1",
44+
"phpstan/phpstan-deprecation-rules": "^2.0",
45+
"phpstan/phpstan-phpunit": "^2.0",
46+
"phpstan/phpstan-strict-rules": "^2.0",
47+
"phpunit/phpunit": "^12.5.3",
48+
"symfony/var-dumper": "^8.0",
49+
"shipmonk/composer-dependency-analyser": "^1.8.4"
50+
},
5551
"autoload": {
5652
"psr-4": {
5753
"Shapecode\\Bundle\\TwigStringLoaderBundle\\": "src/"
@@ -64,14 +60,12 @@
6460
},
6561
"scripts": {
6662
"check": [
67-
"@crc",
68-
"@unused",
63+
"@cda",
6964
"@cs-check",
7065
"@phpstan"
7166
],
72-
"unused": "vendor/bin/composer-unused",
7367
"phpstan": "./vendor/bin/phpstan analyse ./src",
74-
"crc": "./vendor/bin/composer-require-checker --config-file=./composer-require-checker.json",
68+
"cda": "vendor/bin/composer-dependency-analyser --config=./composer-dependency-analyser.php",
7569
"phpunit": "./vendor/bin/phpunit",
7670
"cs-fix": "./vendor/bin/phpcbf",
7771
"cs-check": "./vendor/bin/phpcs -s"
File renamed without changes.

src/DependencyInjection/ShapecodeTwigStringLoaderExtension.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66

77
use Symfony\Component\Config\FileLocator;
88
use Symfony\Component\DependencyInjection\ContainerBuilder;
9-
use Symfony\Component\DependencyInjection\Loader;
10-
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
9+
use Symfony\Component\DependencyInjection\Extension\Extension;
10+
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
1111

12-
class ShapecodeTwigStringLoaderExtension extends Extension
12+
final class ShapecodeTwigStringLoaderExtension extends Extension
1313
{
1414
/** @inheritDoc */
1515
public function load(array $configs, ContainerBuilder $container): void
1616
{
17-
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
18-
$loader->load('services.yml');
17+
$fileLocator = new FileLocator(__DIR__ . '/../Resources/config');
18+
$loader = new PhpFileLoader($container, $fileLocator);
19+
$loader->load('services.php');
1920
}
2021
}

src/Resources/config/services.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Shapecode\Twig\Loader\StringLoader;
6+
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
7+
8+
return static function (ContainerConfigurator $containerConfigurator): void {
9+
$services = $containerConfigurator->services();
10+
11+
$services->defaults()
12+
->autowire()
13+
->autoconfigure();
14+
15+
$services->set(StringLoader::class);
16+
};

src/Resources/config/services.yml

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

src/ShapecodeTwigStringLoaderBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66

77
use Symfony\Component\HttpKernel\Bundle\Bundle;
88

9-
class ShapecodeTwigStringLoaderBundle extends Bundle
9+
final class ShapecodeTwigStringLoaderBundle extends Bundle
1010
{
1111
}

0 commit comments

Comments
 (0)