Skip to content

Commit ddbca7f

Browse files
committed
Remove unsupported version of Symfony + refactor
1 parent d50b2ac commit ddbca7f

21 files changed

Lines changed: 195 additions & 759 deletions

.github/workflows/tests.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,17 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
php: [ '8.1', '8.2', '8.3', '8.4', '8.5' ]
17-
symfony: [ '4.4', '5.2', '5.3', '5.4', '6.0', '6.1', '6.2', '6.3', '6.4', '7.0' ]
17+
symfony: [ '6.4', '7.4', '8.0' ]
1818
dependencies: [ 'highest', 'lowest' ]
1919
exclude:
2020
- php: '8.1'
21-
symfony: '7.0'
21+
symfony: '7.4'
22+
- php: '8.1'
23+
symfony: '8.0'
24+
- php: '8.2'
25+
symfony: '8.0'
26+
- php: '8.3'
27+
symfony: '8.0'
2228
env:
2329
SYMFONY_REQUIRE: ${{ matrix.symfony }}.*
2430
name: PHP ${{ matrix.php }} & Symfony ${{ matrix.symfony }}${{ matrix.dependencies == 'lowest' && ' (lowest)' || '' }} Test

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Symfony bundle which provides a way to version your application using various ve
1111

1212
## Features
1313

14-
- Stores the application's version & release date into a compliant YAML or XML Symfony container configuration file
14+
- Stores the application's version & release date into a compliant YAML Symfony container configuration file
1515
- Automatically imports the file with the parameters into Symfony's container
1616
- Supports multiple versioning strategies & creating custom ones
1717
- Includes a console command for incrementing the version using the configured versioning strategy
@@ -21,7 +21,7 @@ Symfony bundle which provides a way to version your application using various ve
2121
## Requirements
2222

2323
- [PHP 8.1](http://php.net/releases/8_1_0.php) or higher
24-
- [Symfony 4.4](https://symfony.com/roadmap/4.4) or [Symfony 5.2](https://symfony.com/roadmap/5.2) or higher
24+
- [Symfony 6.4](https://symfony.com/roadmap/6.4) or [Symfony 7.4](https://symfony.com/roadmap/7.4) or higher
2525

2626
## Installation
2727

@@ -49,7 +49,7 @@ Symfony bundle which provides a way to version your application using various ve
4949
filepath: '%kernel.project_dir%/config'
5050
5151
# The format used for the version file.
52-
format: yaml # One of "yaml"; "xml"
52+
format: yaml # One of "yaml"
5353
5454
# Configuration for the VCS integration,
5555
# set to false to disable the integration.

composer.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,15 @@
1919
],
2020
"require": {
2121
"php": ">=8.1",
22-
"ext-dom": "*",
23-
"symfony/config": "^4.4 || ^5.2 || ^6.0 || ^7.0",
24-
"symfony/console": "^4.4 || ^5.2 || ^6.0 || ^7.0",
25-
"symfony/dependency-injection": "^4.4.2 || ^5.2 || ^6.0 || ^7.0",
26-
"symfony/http-kernel": "^4.4 || ^5.2 || ^6.0 || ^7.0",
27-
"symfony/process": "^4.4 || ^5.2 || ^6.0 || ^7.0",
28-
"symfony/yaml": "^4.4 || ^5.2 || ^6.0 || ^7.0"
22+
"symfony/config": "^6.4 || ^7.4 || ^8.0",
23+
"symfony/console": "^6.4 || ^7.4 || ^8.0",
24+
"symfony/dependency-injection": "^6.4 || ^7.4 || ^8.0",
25+
"symfony/http-kernel": "^6.4 || ^7.4 || ^8.0",
26+
"symfony/process": "^6.4 || ^7.4 || ^8.0",
27+
"symfony/yaml": "^6.4 || ^7.4 || ^8.0"
2928
},
3029
"require-dev": {
31-
"symfony/phpunit-bridge": "^6.4.1"
30+
"symfony/phpunit-bridge": "^8.0"
3231
},
3332
"autoload": {
3433
"psr-4": {

config/services.php

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
6+
7+
use Bizkit\VersioningBundle\Command\IncrementCommand;
8+
use Bizkit\VersioningBundle\Reader\ReaderInterface;
9+
use Bizkit\VersioningBundle\Reader\YamlFileReader;
10+
use Bizkit\VersioningBundle\Strategy\IncrementingStrategy;
11+
use Bizkit\VersioningBundle\Strategy\SemVerStrategy;
12+
use Bizkit\VersioningBundle\Strategy\StrategyInterface;
13+
use Bizkit\VersioningBundle\VCS\GitHandler;
14+
use Bizkit\VersioningBundle\VCS\VCSHandlerInterface;
15+
use Bizkit\VersioningBundle\Writer\WriterInterface;
16+
use Bizkit\VersioningBundle\Writer\YamlFileWriter;
17+
18+
return function (ContainerConfigurator $container): void {
19+
$container->services()
20+
->defaults()
21+
->private()
22+
23+
->set(YamlFileReader::class)
24+
->args([
25+
param('.bizkit_versioning.file'),
26+
param('.bizkit_versioning.parameter_prefix'),
27+
])
28+
->tag('bizkit_versioning.reader', ['format' => 'yaml'])
29+
30+
->set(YamlFileWriter::class)
31+
->args([
32+
param('.bizkit_versioning.file'),
33+
param('.bizkit_versioning.parameter_prefix'),
34+
])
35+
->tag('bizkit_versioning.writer', ['format' => 'yaml'])
36+
37+
->set(IncrementingStrategy::class)
38+
->tag('bizkit_versioning.strategy', ['alias' => 'incrementing'])
39+
40+
->set(SemVerStrategy::class)
41+
->args([
42+
'minor',
43+
])
44+
->tag('bizkit_versioning.strategy', ['alias' => 'semver'])
45+
46+
->set(GitHandler::class)
47+
->args([
48+
param('.bizkit_versioning.file'),
49+
param('.bizkit_versioning.vcs_commit_message'),
50+
param('.bizkit_versioning.vcs_tag_message'),
51+
param('.bizkit_versioning.vcs_name'),
52+
param('.bizkit_versioning.vcs_email'),
53+
param('.bizkit_versioning.path_to_vcs_executable'),
54+
])
55+
->tag('bizkit_versioning.vcs_handler', ['alias' => 'git'])
56+
57+
->set(IncrementCommand::class)
58+
->args([
59+
param('.bizkit_versioning.file'),
60+
service(ReaderInterface::class),
61+
service(WriterInterface::class),
62+
service(StrategyInterface::class),
63+
service(VCSHandlerInterface::class)->nullOnInvalid(),
64+
param('.bizkit_versioning.vcs_tagging_mode'),
65+
])
66+
->tag('console.command')
67+
;
68+
};

config/services.xml

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

0 commit comments

Comments
 (0)