Skip to content

Commit

Permalink
Merge pull request #13 from CaliforniaMountainSnake/pr-to-upstream
Browse files Browse the repository at this point in the history
Whole rebuild of the command
  • Loading branch information
imliam authored May 23, 2020
2 parents f8596e5 + 06ef4be commit d5951b3
Show file tree
Hide file tree
Showing 11 changed files with 623 additions and 78 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2
41 changes: 41 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Run Tests
on: [push]

jobs:
run:
runs-on: ubuntu-latest
strategy:
max-parallel: 15
fail-fast: false
matrix:
php-versions: ["7.1", "7.2", "7.3", "7.4"]
composer-flags: ["--prefer-lowest", "--prefer-stable"]
env:
- LARAVEL_VERSION='~5.5'
- LARAVEL_VERSION='~5.6'
- LARAVEL_VERSION='~5.7'
- LARAVEL_VERSION='~5.8'
- LARAVEL_VERSION='^6.0'
- LARAVEL_VERSION='^7.0'
exclude:
- php-versions: 7.1
env: LARAVEL_VERSION='^6.0'
- php-versions: 7.1
env: LARAVEL_VERSION='^7.0'
name: Test on PHP ${{ matrix.php-versions }}, Laravel ${{ matrix.laravel-versions }} and ${{ matrix.composer-flags }}
steps:
- name: Checkout
uses: actions/checkout@master
- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
- name: Install Dependencies
run: |
${{ matrix.env }}
composer config discard-changes true
composer self-update
composer require --dev "laravel/framework:${LARAVEL_VERSION}" --no-interaction --no-update
composer update ${{ matrix.composer-flags }} --prefer-dist --no-suggest --no-interaction
- name: Run PHPUnit
run: php vendor/bin/phpunit
15 changes: 9 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
build
composer.lock
docs
vendor
coverage
SCRATCH.md
/.idea/
/nbproject/
/build
/composer.lock
/docs
/vendor
/coverage
/SCRATCH.md
/REFACTORING.md
51 changes: 49 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,54 @@
# Changelog
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

All notable changes to `laravel-env-set-command` will be documented in this file
## [Unreleased]
### Added
### Changed
### Deprecated
### Removed
### Fixed
### Security

## 1.0.0 - 2018-07-13

## [1.1.4] - 2020-05-13
### Added
- Added the command description.
- Added Travis CI build status badge.
- Added support for using en external `.env` file when using "key=value" syntax.
### Changed
- Merged with upstream/master.

## [1.1.3] - 2020-05-12
### Security
- roave/security-advisories finds laravel 5.3/5.4 not safe, so it is removed from the travis-ci config.

## [1.1.2] - 2020-05-12
### Fixed
- Fixed travis-ci integration config.

## [1.1.1] - 2020-05-12
### Fixed
- Fixed travis-ci integration config.

## [1.1.0] - 2020-05-12
### Added
- Now you can set and update empty env-variables.
- Now you can specify external .env-file as the third optional argument.
- Now you can set the value with equals sign ("=").
- Added a lot of unit-tests.
- Added travis-ci integration.
### Changed
- composer.json now includes needed laravel components.
### Fixed
- Fixed compatibility with Laravel 6+.

## [1.0.0] - 2018-07-13
### Added
- Initial release

[1.1.4]: https://github.com/imliam/laravel-env-set-command/compare/1.1.3...1.1.4
[1.1.3]: https://github.com/imliam/laravel-env-set-command/compare/1.1.2...1.1.3
[1.1.2]: https://github.com/imliam/laravel-env-set-command/compare/1.1.1...1.1.2
[1.1.1]: https://github.com/imliam/laravel-env-set-command/compare/1.1.0...1.1.1
[1.1.0]: https://github.com/imliam/laravel-env-set-command/compare/1.0.0...1.1.0
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
[![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)
[![Total Downloads](https://img.shields.io/packagist/dt/imliam/laravel-env-set-command.svg)](https://packagist.org/packages/imliam/laravel-env-set-command)
[![License](https://img.shields.io/github/license/imliam/laravel-env-set-command.svg)](LICENSE.md)
[![Build Status](https://travis-ci.com/imliam/laravel-env-set-command.svg?branch=master)](https://travis-ci.com/imliam/laravel-env-set-command)
[![CI Status](https://github.com/imliam/laravel-env-set-command/workflows/Run%20Tests/badge.svg)](https://github.com/imliam/laravel-env-set-command/actions)

Set a .env file variable from the command line.

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

You can specify the external `.env` file in the third optional argument.

```bash
$ php artisan env:set APP_NAME TestApp /var/www/my_own_env.env
# Environment variable with key 'APP_NAME' has been changed from 'Laravel' to 'TestApp'
```

Or in the second parameter if you use key=value syntax.
```bash
$ php artisan env:set APP_NAME=TestApp /var/www/my_own_env.env
# Environment variable with key 'APP_NAME' has been changed from 'Laravel' to 'TestApp'
```

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
Expand Down
13 changes: 12 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,24 @@
}
],
"require": {
"php": "^7.1"
"php": "^7.1",
"illuminate/support": "*",
"illuminate/console": "*"
},
"require-dev": {
"phpunit/phpunit": "^7.5",
"roave/security-advisories": "dev-master"
},
"autoload": {
"psr-4": {
"ImLiam\\EnvironmentSetCommand\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"config": {
"sort-packages": true
},
Expand Down
23 changes: 23 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
>
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./app</directory>
</whitelist>
</filter>
<php>
<ini name="display_errors" value="true"/>
</php>
</phpunit>
Loading

0 comments on commit d5951b3

Please sign in to comment.