Skip to content

Commit ca1022b

Browse files
authored
feature toggle bundle (#236)
1 parent ba79778 commit ca1022b

File tree

61 files changed

+537
-11
lines changed

Some content is hidden

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

61 files changed

+537
-11
lines changed

bard.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@
4747
},
4848
{
4949
"path": "src/SonsOfPHP/Bundle/Cqrs",
50-
"repository": "[email protected]:SonsOfPHP/cqrs-bundle.git"
50+
"repository": "[email protected]:SonsOfPHP/cqrs-bundle.git",
51+
"config": {
52+
"merge": false
53+
}
5154
},
5255
{
5356
"path": "src/SonsOfPHP/Bridge/Symfony/Cqrs",
@@ -188,6 +191,13 @@
188191
{
189192
"path": "src/SonsOfPHP/Contract/Version",
190193
"repository": "[email protected]:SonsOfPHP/version-contract.git"
194+
},
195+
{
196+
"path": "src/SonsOfPHP/Bundle/FeatureToggleBundle",
197+
"repository": "[email protected]:SonsOfPHP/feature-toggle-bundle.git",
198+
"config": {
199+
"merge": false
200+
}
191201
}
192202
]
193-
}
203+
}

composer.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
"homepage": "https://github.com/SonsOfPHP",
1313
"license": "MIT",
1414
"authors": [
15+
{
16+
"name": "Sons of PHP Community",
17+
"homepage": "https://github.com/SonsOfPHP/sonsofphp/graphs/contributors"
18+
},
1519
{
1620
"name": "Joshua Estes",
1721
"email": "[email protected]"
@@ -79,11 +83,8 @@
7983
"psr/log": "^2.0 || ^3.0",
8084
"psr/simple-cache": "^2.0 || ^3.0",
8185
"symfony/console": "^4 || ^5 || ^6 || ^7",
82-
"symfony/dependency-injection": "^5 || ^6 || ^7",
8386
"symfony/dotenv": "^5 || ^6 || ^7",
8487
"symfony/finder": "^5 || ^6 || ^7",
85-
"symfony/http-kernel": "^5 || ^6 || ^7",
86-
"symfony/messenger": "^5 || ^6 || ^7",
8788
"symfony/options-resolver": "^6 || ^7",
8889
"symfony/process": "^5 || ^6 || ^7",
8990
"symfony/security-bundle": "^6 || ^7",
@@ -100,7 +101,6 @@
100101
"sonsofphp/cookie": "self.version",
101102
"sonsofphp/cookie-contract": "self.version",
102103
"sonsofphp/cqrs": "self.version",
103-
"sonsofphp/cqrs-bundle": "self.version",
104104
"sonsofphp/cqrs-contract": "self.version",
105105
"sonsofphp/cqrs-symfony": "self.version",
106106
"sonsofphp/event-dispatcher": "self.version",
@@ -150,7 +150,6 @@
150150
"src/SonsOfPHP/Component/Container/Tests",
151151
"src/SonsOfPHP/Component/Cookie/Tests",
152152
"src/SonsOfPHP/Component/Cqrs/Tests",
153-
"src/SonsOfPHP/Bundle/Cqrs/Tests",
154153
"src/SonsOfPHP/Bridge/Symfony/Cqrs/Tests",
155154
"src/SonsOfPHP/Bridge/Symfony/EventSourcing/Tests",
156155
"src/SonsOfPHP/Bridge/Twig/Money/Tests",
@@ -186,7 +185,6 @@
186185
"SonsOfPHP\\Bridge\\Symfony\\Cqrs\\": "src/SonsOfPHP/Bridge/Symfony/Cqrs",
187186
"SonsOfPHP\\Bridge\\Symfony\\EventSourcing\\": "src/SonsOfPHP/Bridge/Symfony/EventSourcing",
188187
"SonsOfPHP\\Bridge\\Twig\\Money\\": "src/SonsOfPHP/Bridge/Twig/Money",
189-
"SonsOfPHP\\Bundle\\Cqrs\\": "src/SonsOfPHP/Bundle/Cqrs",
190188
"SonsOfPHP\\Component\\Assert\\": "src/SonsOfPHP/Component/Assert",
191189
"SonsOfPHP\\Component\\Cache\\": "src/SonsOfPHP/Component/Cache",
192190
"SonsOfPHP\\Component\\Clock\\": "src/SonsOfPHP/Component/Clock",
@@ -234,13 +232,13 @@
234232
"require-dev": {
235233
"phpunit/phpunit": "^10.4",
236234
"symfony/http-foundation": "^5 || ^6 || ^7",
235+
"symfony/messenger": "^5 || ^6 || ^7",
237236
"symfony/serializer": "^5 || ^6 || ^7"
238237
},
239238
"autoload-dev": {
240239
"psr-4": {
241240
"SonsOfPHP\\Bard\\Tests\\": "src/SonsOfPHP/Bard/Tests",
242-
"SonsOfPHP\\Bridge\\Symfony\\Cqrs\\Tests\\": "src/SonsOfPHP/Bridge/Symfony/Cqrs/Tests",
243-
"SonsOfPHP\\Bundle\\Cqrs\\Tests\\": "src/SonsOfPHP/Bundle/Cqrs/Tests"
241+
"SonsOfPHP\\Bridge\\Symfony\\Cqrs\\Tests\\": "src/SonsOfPHP/Bridge/Symfony/Cqrs/Tests"
244242
}
245243
},
246244
"scripts": {

src/SonsOfPHP/Bard/composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@
5252
"docs": "https://docs.sonsofphp.com"
5353
},
5454
"authors": [
55+
{
56+
"name": "Sons of PHP Community",
57+
"homepage": "https://github.com/SonsOfPHP/sonsofphp/graphs/contributors"
58+
},
5559
{
5660
"name": "Joshua Estes",
5761
"email": "[email protected]"

src/SonsOfPHP/Bard/src/Console/Command/MergeCommand.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
7070
;
7171

7272
foreach ($this->bardConfig->getSection('packages') as $pkg) {
73+
if (array_key_exists('config', $pkg) && array_key_exists('merge', $pkg['config']) && false === $pkg['config']['merge']) {
74+
// Do not merge this package
75+
continue;
76+
}
77+
7378
$pkgComposerFile = realpath($input->getOption('working-dir') . '/' . $pkg['path'] . '/composer.json');
7479
if (!file_exists($pkgComposerFile)) {
7580
$output->writeln(sprintf('No "%s" found, skipping', $pkgComposerFile));
@@ -116,6 +121,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
116121
$io->text(sprintf('Updated "%s"', $rootComposerJsonFile->getRealPath()));
117122
}
118123

124+
// @todo if not dry-run, run composer dump
125+
119126
$io->success('Merge Complete');
120127

121128
return self::SUCCESS;

src/SonsOfPHP/Bridge/Aws/Filesystem/composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
"homepage": "https://github.com/SonsOfPHP/filesystem-aws",
1111
"license": "MIT",
1212
"authors": [
13+
{
14+
"name": "Sons of PHP Community",
15+
"homepage": "https://github.com/SonsOfPHP/sonsofphp/graphs/contributors"
16+
},
1317
{
1418
"name": "Joshua Estes",
1519
"email": "[email protected]"

src/SonsOfPHP/Bridge/Doctrine/Collections/Pager/composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
"homepage": "https://github.com/SonsOfPHP/pager-doctrine-collections",
99
"license": "MIT",
1010
"authors": [
11+
{
12+
"name": "Sons of PHP Community",
13+
"homepage": "https://github.com/SonsOfPHP/sonsofphp/graphs/contributors"
14+
},
1115
{
1216
"name": "Joshua Estes",
1317
"email": "[email protected]"

src/SonsOfPHP/Bridge/Doctrine/DBAL/Pager/composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
"homepage": "https://github.com/SonsOfPHP/pager-doctrine-dbal",
99
"license": "MIT",
1010
"authors": [
11+
{
12+
"name": "Sons of PHP Community",
13+
"homepage": "https://github.com/SonsOfPHP/sonsofphp/graphs/contributors"
14+
},
1115
{
1216
"name": "Joshua Estes",
1317
"email": "[email protected]"

src/SonsOfPHP/Bridge/Doctrine/EventSourcing/composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
"homepage": "https://github.com/SonsOfPHP/event-sourcing",
99
"license": "MIT",
1010
"authors": [
11+
{
12+
"name": "Sons of PHP Community",
13+
"homepage": "https://github.com/SonsOfPHP/sonsofphp/graphs/contributors"
14+
},
1115
{
1216
"name": "Joshua Estes",
1317
"email": "[email protected]"

src/SonsOfPHP/Bridge/Doctrine/ORM/Pager/composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
"homepage": "https://github.com/SonsOfPHP/pager-doctrine-orm",
99
"license": "MIT",
1010
"authors": [
11+
{
12+
"name": "Sons of PHP Community",
13+
"homepage": "https://github.com/SonsOfPHP/sonsofphp/graphs/contributors"
14+
},
1115
{
1216
"name": "Joshua Estes",
1317
"email": "[email protected]"

src/SonsOfPHP/Bridge/LiipImagine/Filesystem/composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
"homepage": "https://github.com/SonsOfPHP/filesystem-liip-imagine",
1414
"license": "MIT",
1515
"authors": [
16+
{
17+
"name": "Sons of PHP Community",
18+
"homepage": "https://github.com/SonsOfPHP/sonsofphp/graphs/contributors"
19+
},
1620
{
1721
"name": "Joshua Estes",
1822
"email": "[email protected]"

0 commit comments

Comments
 (0)