Skip to content

Commit d5951b3

Browse files
authored
Merge pull request #13 from CaliforniaMountainSnake/pr-to-upstream
Whole rebuild of the command
2 parents f8596e5 + 06ef4be commit d5951b3

11 files changed

+623
-78
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ trim_trailing_whitespace = true
1313

1414
[*.md]
1515
trim_trailing_whitespace = false
16+
17+
[*.{yml,yaml}]
18+
indent_size = 2

.github/workflows/main.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Run Tests
2+
on: [push]
3+
4+
jobs:
5+
run:
6+
runs-on: ubuntu-latest
7+
strategy:
8+
max-parallel: 15
9+
fail-fast: false
10+
matrix:
11+
php-versions: ["7.1", "7.2", "7.3", "7.4"]
12+
composer-flags: ["--prefer-lowest", "--prefer-stable"]
13+
env:
14+
- LARAVEL_VERSION='~5.5'
15+
- LARAVEL_VERSION='~5.6'
16+
- LARAVEL_VERSION='~5.7'
17+
- LARAVEL_VERSION='~5.8'
18+
- LARAVEL_VERSION='^6.0'
19+
- LARAVEL_VERSION='^7.0'
20+
exclude:
21+
- php-versions: 7.1
22+
env: LARAVEL_VERSION='^6.0'
23+
- php-versions: 7.1
24+
env: LARAVEL_VERSION='^7.0'
25+
name: Test on PHP ${{ matrix.php-versions }}, Laravel ${{ matrix.laravel-versions }} and ${{ matrix.composer-flags }}
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@master
29+
- name: Install PHP
30+
uses: shivammathur/setup-php@master
31+
with:
32+
php-version: ${{ matrix.php-versions }}
33+
- name: Install Dependencies
34+
run: |
35+
${{ matrix.env }}
36+
composer config discard-changes true
37+
composer self-update
38+
composer require --dev "laravel/framework:${LARAVEL_VERSION}" --no-interaction --no-update
39+
composer update ${{ matrix.composer-flags }} --prefer-dist --no-suggest --no-interaction
40+
- name: Run PHPUnit
41+
run: php vendor/bin/phpunit

.gitignore

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
build
2-
composer.lock
3-
docs
4-
vendor
5-
coverage
6-
SCRATCH.md
1+
/.idea/
2+
/nbproject/
3+
/build
4+
/composer.lock
5+
/docs
6+
/vendor
7+
/coverage
8+
/SCRATCH.md
9+
/REFACTORING.md

CHANGELOG.md

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,54 @@
11
# Changelog
2+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
3+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
24

3-
All notable changes to `laravel-env-set-command` will be documented in this file
5+
## [Unreleased]
6+
### Added
7+
### Changed
8+
### Deprecated
9+
### Removed
10+
### Fixed
11+
### Security
412

5-
## 1.0.0 - 2018-07-13
613

14+
## [1.1.4] - 2020-05-13
15+
### Added
16+
- Added the command description.
17+
- Added Travis CI build status badge.
18+
- Added support for using en external `.env` file when using "key=value" syntax.
19+
### Changed
20+
- Merged with upstream/master.
21+
22+
## [1.1.3] - 2020-05-12
23+
### Security
24+
- roave/security-advisories finds laravel 5.3/5.4 not safe, so it is removed from the travis-ci config.
25+
26+
## [1.1.2] - 2020-05-12
27+
### Fixed
28+
- Fixed travis-ci integration config.
29+
30+
## [1.1.1] - 2020-05-12
31+
### Fixed
32+
- Fixed travis-ci integration config.
33+
34+
## [1.1.0] - 2020-05-12
35+
### Added
36+
- Now you can set and update empty env-variables.
37+
- Now you can specify external .env-file as the third optional argument.
38+
- Now you can set the value with equals sign ("=").
39+
- Added a lot of unit-tests.
40+
- Added travis-ci integration.
41+
### Changed
42+
- composer.json now includes needed laravel components.
43+
### Fixed
44+
- Fixed compatibility with Laravel 6+.
45+
46+
## [1.0.0] - 2018-07-13
47+
### Added
748
- Initial release
49+
50+
[1.1.4]: https://github.com/imliam/laravel-env-set-command/compare/1.1.3...1.1.4
51+
[1.1.3]: https://github.com/imliam/laravel-env-set-command/compare/1.1.2...1.1.3
52+
[1.1.2]: https://github.com/imliam/laravel-env-set-command/compare/1.1.1...1.1.2
53+
[1.1.1]: https://github.com/imliam/laravel-env-set-command/compare/1.1.0...1.1.1
54+
[1.1.0]: https://github.com/imliam/laravel-env-set-command/compare/1.0.0...1.1.0

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
[![Latest Version on Packagist](https://img.shields.io/packagist/v/imliam/laravel-env-set-command.svg)](https://packagist.org/packages/imliam/laravel-env-set-command)
44
[![Total Downloads](https://img.shields.io/packagist/dt/imliam/laravel-env-set-command.svg)](https://packagist.org/packages/imliam/laravel-env-set-command)
55
[![License](https://img.shields.io/github/license/imliam/laravel-env-set-command.svg)](LICENSE.md)
6+
[![Build Status](https://travis-ci.com/imliam/laravel-env-set-command.svg?branch=master)](https://travis-ci.com/imliam/laravel-env-set-command)
7+
[![CI Status](https://github.com/imliam/laravel-env-set-command/workflows/Run%20Tests/badge.svg)](https://github.com/imliam/laravel-env-set-command/actions)
68

79
Set a .env file variable from the command line.
810

@@ -64,6 +66,19 @@ $ php artisan env:set @pp_n@me Laravel
6466
# Invalid environment key. Only use letters and underscores
6567
```
6668

69+
You can specify the external `.env` file in the third optional argument.
70+
71+
```bash
72+
$ php artisan env:set APP_NAME TestApp /var/www/my_own_env.env
73+
# Environment variable with key 'APP_NAME' has been changed from 'Laravel' to 'TestApp'
74+
```
75+
76+
Or in the second parameter if you use key=value syntax.
77+
```bash
78+
$ php artisan env:set APP_NAME=TestApp /var/www/my_own_env.env
79+
# Environment variable with key 'APP_NAME' has been changed from 'Laravel' to 'TestApp'
80+
```
81+
6782
## Changelog
6883

6984
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

composer.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,24 @@
2020
}
2121
],
2222
"require": {
23-
"php": "^7.1"
23+
"php": "^7.1",
24+
"illuminate/support": "*",
25+
"illuminate/console": "*"
26+
},
27+
"require-dev": {
28+
"phpunit/phpunit": "^7.5",
29+
"roave/security-advisories": "dev-master"
2430
},
2531
"autoload": {
2632
"psr-4": {
2733
"ImLiam\\EnvironmentSetCommand\\": "src"
2834
}
2935
},
36+
"autoload-dev": {
37+
"psr-4": {
38+
"Tests\\": "tests/"
39+
}
40+
},
3041
"config": {
3142
"sort-packages": true
3243
},

phpunit.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
5+
colors="true"
6+
>
7+
<testsuites>
8+
<testsuite name="Unit">
9+
<directory suffix="Test.php">./tests/Unit</directory>
10+
</testsuite>
11+
<testsuite name="Feature">
12+
<directory suffix="Test.php">./tests/Feature</directory>
13+
</testsuite>
14+
</testsuites>
15+
<filter>
16+
<whitelist processUncoveredFilesFromWhitelist="true">
17+
<directory suffix=".php">./app</directory>
18+
</whitelist>
19+
</filter>
20+
<php>
21+
<ini name="display_errors" value="true"/>
22+
</php>
23+
</phpunit>

0 commit comments

Comments
 (0)