Skip to content

Commit 6c389df

Browse files
committed
mostly functional feature flags
1 parent 88d50a1 commit 6c389df

23 files changed

+8710
-6
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/vendor
2+
/build
3+
.php-cs-fixer.cache
4+
.phpunit.result.cache

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changelog
2+
3+
All notable changes to `laravel-feature-flags` will be documented in this file.
4+
5+
## 1.0.0 - 202X-XX-XX
6+
7+
- initial release
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
MIT License
1+
The MIT License (MIT)
22

3-
Copyright (c) 2022 Coding Labs
3+
Copyright (c) Codinglabs <steve@codinglabs.com.au>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
99
copies of the Software, and to permit persons to whom the Software is
1010
furnished to do so, subject to the following conditions:
1111

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
1414

1515
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1616
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1717
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
2+
[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/support-ukraine.svg?t=1" />](https://supportukrainenow.org)
3+
4+
# Dynamic feature flags for laravel.
5+
6+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/codinglabsau/laravel-feature-flags.svg?style=flat-square)](https://packagist.org/packages/codinglabsau/laravel-feature-flags)
7+
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/codinglabsau/laravel-feature-flags/run-tests?label=tests)](https://github.com/codinglabsau/laravel-feature-flags/actions?query=workflow%3Arun-tests+branch%3Amain)
8+
[![GitHub Code Style Action Status](https://img.shields.io/github/workflow/status/codinglabsau/laravel-feature-flags/Check%20&%20fix%20styling?label=code%20style)](https://github.com/codinglabsau/laravel-feature-flags/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3Amain)
9+
[![Total Downloads](https://img.shields.io/packagist/dt/codinglabsau/laravel-feature-flags.svg?style=flat-square)](https://packagist.org/packages/codinglabsau/laravel-feature-flags)
10+
11+
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
12+
13+
## Support us
14+
15+
[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/laravel-feature-flags.jpg?t=1" width="419px" />](https://spatie.be/github-ad-click/laravel-feature-flags)
16+
17+
We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).
18+
19+
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).
20+
21+
## Installation
22+
23+
You can install the package via composer:
24+
25+
```bash
26+
composer require codinglabsau/laravel-feature-flags
27+
```
28+
29+
You can publish and run the migrations with:
30+
31+
```bash
32+
php artisan vendor:publish --tag="laravel-feature-flags-migrations"
33+
php artisan migrate
34+
```
35+
36+
You can publish the config file with:
37+
38+
```bash
39+
php artisan vendor:publish --tag="laravel-feature-flags-config"
40+
```
41+
42+
This is the contents of the published config file:
43+
44+
```php
45+
return [
46+
];
47+
```
48+
49+
Optionally, you can publish the views using
50+
51+
```bash
52+
php artisan vendor:publish --tag="laravel-feature-flags-views"
53+
```
54+
55+
## Usage
56+
57+
```php
58+
$features = new Codinglabs\FeatureFlags();
59+
echo $features->echoPhrase('Hello, Codinglabs!');
60+
```
61+
62+
## Testing
63+
64+
```bash
65+
composer test
66+
```
67+
68+
## Changelog
69+
70+
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
71+
72+
## Contributing
73+
74+
Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.
75+
76+
## Security Vulnerabilities
77+
78+
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
79+
80+
## Credits
81+
82+
- [Steve Thomas](https://github.com/codinglabsau)
83+
- [All Contributors](../../contributors)
84+
85+
## License
86+
87+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

composer.json

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"name": "codinglabsau/laravel-feature-flags",
3+
"description": "Dynamic feature flags for laravel.",
4+
"keywords": [
5+
"Codinglabs",
6+
"laravel",
7+
"Feature",
8+
"Flags",
9+
"laravel-feature-flags"
10+
],
11+
"homepage": "https://github.com/codinglabsau/laravel-feature-flags",
12+
"license": "MIT",
13+
"authors": [
14+
{
15+
"name": "Steve Thomas",
16+
"email": "steve@codinglabs.com.au",
17+
"role": "Developer"
18+
}
19+
],
20+
"require": {
21+
"php": "^7.4|^8.0",
22+
"spatie/laravel-package-tools": "^1.9.2",
23+
"illuminate/contracts": "^7.0|^8.0|^9.0"
24+
},
25+
"require-dev": {
26+
"nunomaduro/collision": "^6.0",
27+
"orchestra/testbench": "^7.0",
28+
"pestphp/pest": "^1.21",
29+
"pestphp/pest-plugin-laravel": "^1.1",
30+
"phpunit/phpunit": "^9.5",
31+
"spatie/laravel-ray": "^1.26"
32+
},
33+
"autoload": {
34+
"psr-4": {
35+
"Codinglabs\\FeatureFlags\\": "src",
36+
"Codinglabs\\FeatureFlags\\Database\\Factories\\": "database/factories"
37+
}
38+
},
39+
"autoload-dev": {
40+
"psr-4": {
41+
"Codinglabs\\FeatureFlags\\Tests\\": "tests"
42+
}
43+
},
44+
"scripts": {
45+
"analyse": "vendor/bin/phpstan analyse",
46+
"test": "vendor/bin/pest",
47+
"test-coverage": "vendor/bin/pest --coverage"
48+
},
49+
"config": {
50+
"sort-packages": true
51+
},
52+
"extra": {
53+
"laravel": {
54+
"providers": [
55+
"Codinglabs\\FeatureFlags\\FeatureFlagsServiceProvider"
56+
],
57+
"aliases": {
58+
"Features": "Codinglabs\\FeatureFlags\\Facades\\Features"
59+
}
60+
}
61+
},
62+
"minimum-stability": "dev",
63+
"prefer-stable": true
64+
}

0 commit comments

Comments
 (0)