This repository has been archived by the owner on Dec 3, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some test cases for basic comment support
- Loading branch information
1 parent
ba28094
commit c67225c
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
...mer/tests/Converter/ConfigFormatConverter/YamlToPhp/Fixture/normal/comments_packages.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Intro comment | ||
security: | ||
# Some nice comment 1 | ||
encoders: true # inline comment | ||
# Some nice comment 2 | ||
other: true # inline comment | ||
----- | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; | ||
|
||
return static function (ContainerConfigurator $containerConfigurator): void { | ||
// Intro comment | ||
$containerConfigurator->extension('security', [ | ||
// Some nice comment 1 | ||
'encoders' => true, // inline comment | ||
// Some nice comment 2 | ||
'other' => true, // inline comment | ||
]); | ||
}; |
17 changes: 17 additions & 0 deletions
17
...r/tests/Converter/ConfigFormatConverter/YamlToPhp/Fixture/normal/comments_parameters.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Intro comment | ||
parameters: | ||
# Some nice comment | ||
key: 'value' # another comment | ||
----- | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; | ||
|
||
return static function (ContainerConfigurator $containerConfigurator): void { | ||
$parameters = $containerConfigurator->parameters(); | ||
|
||
// Some nice comment | ||
$parameters->set('key', 'value'); | ||
}; |
19 changes: 19 additions & 0 deletions
19
...mer/tests/Converter/ConfigFormatConverter/YamlToPhp/Fixture/normal/comments_services.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Intro comment | ||
services: | ||
# Some nice comment | ||
App\Service: ~ # inline comment | ||
----- | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use App\Service; | ||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; | ||
|
||
return static function (ContainerConfigurator $containerConfigurator): void { | ||
// Intro comment | ||
$services = $containerConfigurator->services(); | ||
|
||
// Some nice comment | ||
$services->set(Service::class); // inline comment | ||
}; |