-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba79778
commit ca1022b
Showing
61 changed files
with
537 additions
and
11 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -47,7 +47,10 @@ | |
}, | ||
{ | ||
"path": "src/SonsOfPHP/Bundle/Cqrs", | ||
"repository": "[email protected]:SonsOfPHP/cqrs-bundle.git" | ||
"repository": "[email protected]:SonsOfPHP/cqrs-bundle.git", | ||
"config": { | ||
"merge": false | ||
} | ||
}, | ||
{ | ||
"path": "src/SonsOfPHP/Bridge/Symfony/Cqrs", | ||
|
@@ -188,6 +191,13 @@ | |
{ | ||
"path": "src/SonsOfPHP/Contract/Version", | ||
"repository": "[email protected]:SonsOfPHP/version-contract.git" | ||
}, | ||
{ | ||
"path": "src/SonsOfPHP/Bundle/FeatureToggleBundle", | ||
"repository": "[email protected]:SonsOfPHP/feature-toggle-bundle.git", | ||
"config": { | ||
"merge": false | ||
} | ||
} | ||
] | ||
} | ||
} |
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 |
---|---|---|
|
@@ -12,6 +12,10 @@ | |
"homepage": "https://github.com/SonsOfPHP", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Sons of PHP Community", | ||
"homepage": "https://github.com/SonsOfPHP/sonsofphp/graphs/contributors" | ||
}, | ||
{ | ||
"name": "Joshua Estes", | ||
"email": "[email protected]" | ||
|
@@ -79,11 +83,8 @@ | |
"psr/log": "^2.0 || ^3.0", | ||
"psr/simple-cache": "^2.0 || ^3.0", | ||
"symfony/console": "^4 || ^5 || ^6 || ^7", | ||
"symfony/dependency-injection": "^5 || ^6 || ^7", | ||
"symfony/dotenv": "^5 || ^6 || ^7", | ||
"symfony/finder": "^5 || ^6 || ^7", | ||
"symfony/http-kernel": "^5 || ^6 || ^7", | ||
"symfony/messenger": "^5 || ^6 || ^7", | ||
"symfony/options-resolver": "^6 || ^7", | ||
"symfony/process": "^5 || ^6 || ^7", | ||
"symfony/security-bundle": "^6 || ^7", | ||
|
@@ -100,7 +101,6 @@ | |
"sonsofphp/cookie": "self.version", | ||
"sonsofphp/cookie-contract": "self.version", | ||
"sonsofphp/cqrs": "self.version", | ||
"sonsofphp/cqrs-bundle": "self.version", | ||
"sonsofphp/cqrs-contract": "self.version", | ||
"sonsofphp/cqrs-symfony": "self.version", | ||
"sonsofphp/event-dispatcher": "self.version", | ||
|
@@ -150,7 +150,6 @@ | |
"src/SonsOfPHP/Component/Container/Tests", | ||
"src/SonsOfPHP/Component/Cookie/Tests", | ||
"src/SonsOfPHP/Component/Cqrs/Tests", | ||
"src/SonsOfPHP/Bundle/Cqrs/Tests", | ||
"src/SonsOfPHP/Bridge/Symfony/Cqrs/Tests", | ||
"src/SonsOfPHP/Bridge/Symfony/EventSourcing/Tests", | ||
"src/SonsOfPHP/Bridge/Twig/Money/Tests", | ||
|
@@ -186,7 +185,6 @@ | |
"SonsOfPHP\\Bridge\\Symfony\\Cqrs\\": "src/SonsOfPHP/Bridge/Symfony/Cqrs", | ||
"SonsOfPHP\\Bridge\\Symfony\\EventSourcing\\": "src/SonsOfPHP/Bridge/Symfony/EventSourcing", | ||
"SonsOfPHP\\Bridge\\Twig\\Money\\": "src/SonsOfPHP/Bridge/Twig/Money", | ||
"SonsOfPHP\\Bundle\\Cqrs\\": "src/SonsOfPHP/Bundle/Cqrs", | ||
"SonsOfPHP\\Component\\Assert\\": "src/SonsOfPHP/Component/Assert", | ||
"SonsOfPHP\\Component\\Cache\\": "src/SonsOfPHP/Component/Cache", | ||
"SonsOfPHP\\Component\\Clock\\": "src/SonsOfPHP/Component/Clock", | ||
|
@@ -234,13 +232,13 @@ | |
"require-dev": { | ||
"phpunit/phpunit": "^10.4", | ||
"symfony/http-foundation": "^5 || ^6 || ^7", | ||
"symfony/messenger": "^5 || ^6 || ^7", | ||
"symfony/serializer": "^5 || ^6 || ^7" | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"SonsOfPHP\\Bard\\Tests\\": "src/SonsOfPHP/Bard/Tests", | ||
"SonsOfPHP\\Bridge\\Symfony\\Cqrs\\Tests\\": "src/SonsOfPHP/Bridge/Symfony/Cqrs/Tests", | ||
"SonsOfPHP\\Bundle\\Cqrs\\Tests\\": "src/SonsOfPHP/Bundle/Cqrs/Tests" | ||
"SonsOfPHP\\Bridge\\Symfony\\Cqrs\\Tests\\": "src/SonsOfPHP/Bridge/Symfony/Cqrs/Tests" | ||
} | ||
}, | ||
"scripts": { | ||
|
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 |
---|---|---|
|
@@ -52,6 +52,10 @@ | |
"docs": "https://docs.sonsofphp.com" | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "Sons of PHP Community", | ||
"homepage": "https://github.com/SonsOfPHP/sonsofphp/graphs/contributors" | ||
}, | ||
{ | ||
"name": "Joshua Estes", | ||
"email": "[email protected]" | ||
|
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
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 |
---|---|---|
|
@@ -10,6 +10,10 @@ | |
"homepage": "https://github.com/SonsOfPHP/filesystem-aws", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Sons of PHP Community", | ||
"homepage": "https://github.com/SonsOfPHP/sonsofphp/graphs/contributors" | ||
}, | ||
{ | ||
"name": "Joshua Estes", | ||
"email": "[email protected]" | ||
|
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 |
---|---|---|
|
@@ -8,6 +8,10 @@ | |
"homepage": "https://github.com/SonsOfPHP/pager-doctrine-collections", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Sons of PHP Community", | ||
"homepage": "https://github.com/SonsOfPHP/sonsofphp/graphs/contributors" | ||
}, | ||
{ | ||
"name": "Joshua Estes", | ||
"email": "[email protected]" | ||
|
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 |
---|---|---|
|
@@ -8,6 +8,10 @@ | |
"homepage": "https://github.com/SonsOfPHP/pager-doctrine-dbal", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Sons of PHP Community", | ||
"homepage": "https://github.com/SonsOfPHP/sonsofphp/graphs/contributors" | ||
}, | ||
{ | ||
"name": "Joshua Estes", | ||
"email": "[email protected]" | ||
|
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 |
---|---|---|
|
@@ -8,6 +8,10 @@ | |
"homepage": "https://github.com/SonsOfPHP/event-sourcing", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Sons of PHP Community", | ||
"homepage": "https://github.com/SonsOfPHP/sonsofphp/graphs/contributors" | ||
}, | ||
{ | ||
"name": "Joshua Estes", | ||
"email": "[email protected]" | ||
|
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 |
---|---|---|
|
@@ -8,6 +8,10 @@ | |
"homepage": "https://github.com/SonsOfPHP/pager-doctrine-orm", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Sons of PHP Community", | ||
"homepage": "https://github.com/SonsOfPHP/sonsofphp/graphs/contributors" | ||
}, | ||
{ | ||
"name": "Joshua Estes", | ||
"email": "[email protected]" | ||
|
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 |
---|---|---|
|
@@ -13,6 +13,10 @@ | |
"homepage": "https://github.com/SonsOfPHP/filesystem-liip-imagine", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Sons of PHP Community", | ||
"homepage": "https://github.com/SonsOfPHP/sonsofphp/graphs/contributors" | ||
}, | ||
{ | ||
"name": "Joshua Estes", | ||
"email": "[email protected]" | ||
|
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 |
---|---|---|
|
@@ -12,6 +12,10 @@ | |
"homepage": "https://github.com/SonsOfPHP/cqrs-symfony", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Sons of PHP Community", | ||
"homepage": "https://github.com/SonsOfPHP/sonsofphp/graphs/contributors" | ||
}, | ||
{ | ||
"name": "Joshua Estes", | ||
"email": "[email protected]" | ||
|
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 |
---|---|---|
|
@@ -8,6 +8,10 @@ | |
"homepage": "https://github.com/SonsOfPHP/event-sourcing-symfony", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Sons of PHP Community", | ||
"homepage": "https://github.com/SonsOfPHP/sonsofphp/graphs/contributors" | ||
}, | ||
{ | ||
"name": "Joshua Estes", | ||
"email": "[email protected]" | ||
|
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 |
---|---|---|
|
@@ -10,6 +10,10 @@ | |
"homepage": "https://github.com/SonsOfPHP/money", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Sons of PHP Community", | ||
"homepage": "https://github.com/SonsOfPHP/sonsofphp/graphs/contributors" | ||
}, | ||
{ | ||
"name": "Joshua Estes", | ||
"email": "[email protected]" | ||
|
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 @@ | ||
Copyright 2022 to Present Joshua Estes | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
of the Software, and to permit persons to whom the Software is furnished to do | ||
so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,23 @@ | ||
<div align="center"> | ||
<img src="https://raw.githubusercontent.com/SonsOfPHP/.github/main/assets/top-rocker.png" /> | ||
</div> | ||
<br/> | ||
<div align="center"> | ||
<a href="https://codecov.io/github/SonsOfPHP/sonsofphp"><img src="https://codecov.io/github/SonsOfPHP/sonsofphp/graph/badge.svg?token=VZ2FVOUKUW" /></a> | ||
<img src="https://img.shields.io/packagist/l/sonsofphp/sonsofphp" /> | ||
<img src="https://img.shields.io/packagist/v/sonsofphp/sonsofphp" /> | ||
</div> | ||
|
||
# Sons of PHP | ||
|
||
Sons of PHP is builds reusable components and tools using PHP. | ||
|
||
* Documentation can be found at [docs.SonsOfPHP.com][docs] | ||
* Please [Report Issues][issues] and send [Pull Requests][pull-requests] in the [Mother Repository][mother-repo] | ||
* You can get more help by posting questions in the [GitHub Discussions][discussions] | ||
|
||
[mother-repo]: <https://github.com/SonsOfPHP/sonsofphp> "Sons of PHP Mother Repository" | ||
[discussions]: https://github.com/orgs/SonsOfPHP/discussions | ||
[issues]: https://github.com/SonsOfPHP/sonsofphp/issues | ||
[pull-requests]: https://github.com/SonsOfPHP/sonsofphp/pulls | ||
[docs]: https://docs.sonsofphp.com |
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,56 @@ | ||
{ | ||
"name": "sonsofphp/feature-toggle-bundle", | ||
"type": "symfony-bundle", | ||
"description": "Sons of PHP | Feature Toggle Bundle", | ||
"keywords": [ | ||
"sonsofphp", | ||
"sons of php", | ||
"feature", | ||
"toggle", | ||
"feature toggle", | ||
"symfony" | ||
], | ||
"homepage": "https://github.com/SonsOfPHP/feature-toggle-bundle", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Joshua Estes", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"support": { | ||
"issues": "https://github.com/SonsOfPHP/sonsofphp/issues", | ||
"forum": "https://github.com/orgs/SonsOfPHP/discussions", | ||
"docs": "https://docs.sonsofphp.com/symfony-bundles/feature-toggle" | ||
}, | ||
"funding": [ | ||
{ | ||
"type": "github", | ||
"url": "https://github.com/sponsors/JoshuaEstes" | ||
}, | ||
{ | ||
"type": "tidelift", | ||
"url": "https://tidelift.com/subscription/pkg/packagist-sonsofphp-sonsofphp" | ||
} | ||
], | ||
"require": { | ||
"php": ">=8.2", | ||
"sonsofphp/feature-toggle": "^0.3@dev" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"SonsOfPHP\\Bundle\\FeatureToggleBundle\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"SonsOfPHP\\Bundle\\FeatureToggleBundle\\Tests\\": "tests/" | ||
} | ||
}, | ||
"extra": { | ||
"sort-packages": true, | ||
"branch-alias": { | ||
"dev-main": "0.3.x-dev" | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
src/SonsOfPHP/Bundle/FeatureToggleBundle/config/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,40 @@ | ||
services: | ||
SonsOfPHP\Bundle\FeatureToggleBundle\Command\DebugCommand: | ||
arguments: ['@sons_of_php.feature_toggle.provider'] | ||
tags: | ||
- { name: 'console.command' } | ||
|
||
SonsOfPHP\Bundle\FeatureToggleBundle\Twig\Extension\FeatureToggleExtension: | ||
tags: | ||
- { name: 'twig.extension' } | ||
|
||
SonsOfPHP\Bundle\FeatureToggleBundle\Twig\Runtime\FeatureToggleExtensionRuntime: | ||
arguments: ['@sons_of_php.feature_toggle.provider'] | ||
tags: | ||
- { name: 'twig.runtime' } | ||
|
||
SonsOfPHP\Component\FeatureToggle\Toggle\AlwaysDisabledToggle: | ||
tags: | ||
- { name: 'sons_of_php.feature_toggle.toggle' } | ||
|
||
sons_of_php.feature_toggle.toggle.disabled: | ||
alias: SonsOfPHP\Component\FeatureToggle\Toggle\AlwaysDisabledToggle | ||
public: true | ||
|
||
SonsOfPHP\Component\FeatureToggle\Toggle\AlwaysEnabledToggle: | ||
tags: | ||
- { name: 'sons_of_php.feature_toggle.toggle' } | ||
|
||
sons_of_php.feature_toggle.toggle.enabled: | ||
alias: SonsOfPHP\Component\FeatureToggle\Toggle\AlwaysEnabledToggle | ||
public: true | ||
|
||
# The provider contains all the different features and their toggles Default | ||
# provider should be a chain provider so that users can define additional | ||
# providers | ||
SonsOfPHP\Contract\FeatureToggle\FeatureToggleProviderInterface: | ||
class: SonsOfPHP\Component\FeatureToggle\Provider\InMemoryFeatureToggleProvider | ||
|
||
sons_of_php.feature_toggle.provider: | ||
alias: SonsOfPHP\Contract\FeatureToggle\FeatureToggleProviderInterface | ||
public: true |
7 changes: 7 additions & 0 deletions
7
src/SonsOfPHP/Bundle/FeatureToggleBundle/src/Attribute/AsFeature.php
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,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace SonsOfPHP\Bundle\FeatureToggleBundle\Attribute; | ||
|
||
final class AsFeature {} |
Oops, something went wrong.