Skip to content

Commit d9a0f2d

Browse files
committed
release PHP 7.2 downgraded
1 parent f64a7c9 commit d9a0f2d

File tree

1,233 files changed

+124574
-3406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,233 files changed

+124574
-3406
lines changed

.editorconfig

-9
This file was deleted.

.github/workflows/bare_run.yaml

+4-14
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
name: Bare Run on various PHP versions
1+
name: Bare Run
22

3-
on:
4-
push:
5-
branches:
6-
- 'main'
3+
on: [pull_request, push]
74

85
jobs:
96
bare_run:
@@ -12,7 +9,7 @@ jobs:
129
strategy:
1310
fail-fast: false
1411
matrix:
15-
php_version: ['7.2', '8.0']
12+
php_version: ['7.2', '7.3', '7.4', '8.0']
1613

1714
steps:
1815
- uses: actions/checkout@v2
@@ -23,11 +20,4 @@ jobs:
2320
php-version: ${{ matrix.php_version }}
2421
coverage: none
2522

26-
- run: mkdir nested-dir
27-
28-
29-
- run: composer require symplify/config-transformer --dev --ansi
30-
working-directory: nested-dir
31-
32-
- run: vendor/bin/config-transformer -h --ansi
33-
working-directory: nested-dir
23+
- run: php bin/config-transformer list --ansi

.gitignore

-7
This file was deleted.

README.md

+9-27
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Convert Symfony YAML configs to PHP
1+
# Config Format Converter
22

33
[![Downloads total](https://img.shields.io/packagist/dt/symplify/config-transformer.svg?style=flat-square)](https://packagist.org/packages/symplify/config-transformer/stats)
44

5-
<br>
5+
Convert Symfony Config Formats From XML/YAML to PHP.
66

77
Why to PHP? It's the best format for PHP Symfony applications:
88

@@ -19,36 +19,18 @@ composer require symplify/config-transformer --dev
1919

2020
## Usage
2121

22-
By default, the command uses `/config` directory to transform all files in it. At first, try to run it with `--dry-run`, just to see what files *would be* transformed:
23-
24-
```bash
25-
vendor/bin/config-transformer --dry-run
26-
```
27-
28-
<br>
29-
30-
Do you want to convert single file or directory at a time? Specify the paths as arguments:
31-
32-
```bash
33-
vendor/bin/config-transformer config/parameters.yml --dry-run
34-
```
35-
36-
<br>
37-
38-
Are you ready to go? Remove `--dry-run`:
22+
Provide paths to files/dirs you want to convert:
3923

4024
```bash
41-
vendor/bin/config-transformer
25+
vendor/bin/config-transformer switch-format config/packages/config-transformer.yaml app/config
4226
```
4327

44-
The input files are deleted automatically.
28+
The input file will be deleted automatically.
4529

46-
<br>
30+
## Report Issues
4731

48-
### Skip Routes at First
32+
In case you are experiencing a bug or want to request a new feature head over to the [Symplify monorepo issue tracker](https://github.com/symplify/symplify/issues)
4933

50-
It's typical to upgrade first services and then routes as follow up PR. To do that, use `--skip-routes` option:
34+
## Contribute
5135

52-
```bash
53-
vendor/bin/config-transformer --skip-routes
54-
```
36+
The sources of this package are contained in the Symplify monorepo. We welcome contributions for this package on [symplify/symplify](https://github.com/symplify/symplify).

bin/config-transformer

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env php
2-
<?php
2+
<?php
3+
namespace ConfigTransformerPrefix202501;
34

45
require __DIR__ . '/config-transformer.php';

bin/config-transformer.php

+6-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22

3-
declare(strict_types=1);
3+
declare (strict_types=1);
4+
namespace ConfigTransformerPrefix202501;
45

5-
use Symfony\Component\Console\Input\ArgvInput;
6-
use Symfony\Component\Console\Output\ConsoleOutput;
6+
use ConfigTransformerPrefix202501\Symfony\Component\Console\Input\ArgvInput;
7+
use ConfigTransformerPrefix202501\Symfony\Component\Console\Output\ConsoleOutput;
78
use Symplify\ConfigTransformer\Console\ConfigTransformerApplication;
89
use Symplify\ConfigTransformer\Kernel\ConfigTransformerContainerFactory;
9-
1010
$possibleAutoloadPaths = [
1111
// dependency
1212
__DIR__ . '/../../../autoload.php',
@@ -15,25 +15,20 @@
1515
// after split package
1616
__DIR__ . '/../vendor/autoload.php',
1717
];
18-
1918
foreach ($possibleAutoloadPaths as $possibleAutoloadPath) {
20-
if (file_exists($possibleAutoloadPath)) {
19+
if (\file_exists($possibleAutoloadPath)) {
2120
require_once $possibleAutoloadPath;
2221
break;
2322
}
2423
}
25-
2624
$scoperAutoloadFilepath = __DIR__ . '/../vendor/scoper-autoload.php';
27-
if (file_exists($scoperAutoloadFilepath)) {
25+
if (\file_exists($scoperAutoloadFilepath)) {
2826
require_once $scoperAutoloadFilepath;
2927
}
30-
3128
$configTransformerContainerFactory = new ConfigTransformerContainerFactory();
3229
$container = $configTransformerContainerFactory->create();
33-
3430
/** @var ConfigTransformerApplication $configTransformerApplication */
3531
$configTransformerApplication = $container->get(ConfigTransformerApplication::class);
36-
3732
$input = new ArgvInput();
3833
$output = new ConsoleOutput();
3934
$configTransformerApplication->run($input, $output);

build/build-scoped.sh

-52
This file was deleted.

build/rector-downgrade-php-72.php

-16
This file was deleted.

build/target-repository/.github/FUNDING.yml

-3
This file was deleted.

build/target-repository/.github/workflows/bare_run.yaml

-23
This file was deleted.

build/target-repository/README.md

-36
This file was deleted.

build/target-repository/composer.json

-11
This file was deleted.

composer.json

+5-70
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,11 @@
11
{
22
"name": "symplify/config-transformer",
3-
"description": "Convert Symfony YAML/XML format to PHP/YAML",
3+
"description": "Prefixed version of Symfony YAML/XML to PHP/YAML config converter",
44
"license": "MIT",
5-
"bin": [
6-
"bin/config-transformer"
7-
],
85
"require": {
9-
"php": ">=8.2",
10-
"nette/utils": "^3.2|^4.0",
11-
"nikic/php-parser": "^5.4",
12-
"symfony/config": "^6.4",
13-
"symfony/console": "^6.4",
14-
"symfony/dependency-injection": "6.1.*",
15-
"symfony/expression-language": "^6.4",
16-
"symfony/filesystem": "^6.4",
17-
"symfony/finder": "^6.4",
18-
"symfony/yaml": "^6.4",
19-
"symplify/php-config-printer": "^12.0.2",
20-
"webmozart/assert": "^1.11"
21-
},
22-
"require-dev": {
23-
"phpstan/extension-installer": "^1.4",
24-
"phpstan/phpstan-deprecation-rules": "^2.0",
25-
"phpstan/phpstan": "^2.1",
26-
"phpunit/phpunit": "^11.2",
27-
"rector/rector": "^2.0.7",
28-
"shipmonk/composer-dependency-analyser": "^1.8",
29-
"phpecs/phpecs": "^2.0",
30-
"symplify/phpstan-extensions": "^12.0",
31-
"symplify/vendor-patches": "^11.3",
32-
"tomasvotruba/class-leak": "^2.0",
33-
"tomasvotruba/unused-public": "^2.0"
34-
},
35-
"autoload": {
36-
"psr-4": {
37-
"Symplify\\ConfigTransformer\\": "src"
38-
}
39-
},
40-
"autoload-dev": {
41-
"psr-4": {
42-
"Symplify\\ConfigTransformer\\Tests\\": "tests"
43-
}
6+
"php": ">=7.2"
447
},
45-
"config": {
46-
"sort-packages": true,
47-
"platform-check": false,
48-
"allow-plugins": {
49-
"cweagans/composer-patches": true,
50-
"phpstan/extension-installer": true
51-
}
52-
},
53-
"extra": {
54-
"patches": {
55-
"symfony/dependency-injection": [
56-
"patches/symfony-dependency-injection-loader-yamlfileloader-php.patch",
57-
"patches/symfony-dependency-injection-definition-php.patch"
58-
]
59-
},
60-
"enable-patching": true
61-
},
62-
"replace": {
63-
"symfony/polyfill-ctype": "*",
64-
"symfony/polyfill-intl-grapheme": "*",
65-
"symfony/polyfill-php74": "*",
66-
"symfony/polyfill-php80": "*",
67-
"symfony/polyfill-php81": "*",
68-
"symfony/polyfill-php82": "*"
69-
},
70-
"scripts": {
71-
"check-cs": "vendor/bin/ecs check --ansi",
72-
"fix-cs": "vendor/bin/ecs check --fix --ansi",
73-
"phpstan": "vendor/bin/phpstan analyse --ansi",
74-
"rector": "vendor/bin/rector process --dry-run --ansi"
75-
}
8+
"bin": [
9+
"bin/config-transformer"
10+
]
7611
}

0 commit comments

Comments
 (0)