Giter Site home page Giter Site logo

svenluijten / flex-env Goto Github PK

View Code? Open in Web Editor NEW
101.0 4.0 12.0 148 KB

🌳 Manage your .env file in Laravel projects through artisan

Home Page: https://git.io/flex

License: MIT License

PHP 100.00%
artisan laravel environment-variables package hacktoberfest

flex-env's People

Contributors

jamosaur avatar pezhvak avatar svenluijten avatar vinkla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

flex-env's Issues

Flex-env does not support laravel 6.x

- sven/flex-env 2.1.1 requires laravel/framework ^5.0 -> satisfiable by laravel/framework[5.0.30, 5.0.x-dev, 5.1.x-dev, 5.2.41, 5.2.x-dev, 5.3.x-dev, 5.4.x-dev, 5.5.x-dev, 5.6.x-dev, 5.7.x-dev, 5.8.x-dev, v5.0.0, v5.0.1, v5.0.10, v5.0.11, v5.0.12, v5.0.13, v5.0.14, v5.0.15, v5.0.16, v5.0.17, v5.0.18, v5.0.19, v5.0.2, v5.0.20, v5.0.21, v5.0.22, v5.0.23, v5.0.24, v5.0.25, v5.0.26, v5.0.27, v5.0.28, v5.0.29, v5.0.3, v5.0.31, v5.0.32, v5.0.33, v5.0.34, v5.0.35, v5.0.4, v5.0.5, v5.0.6, v5.0.7, v5.0.8, v5.0.9, v5.1.0, v5.1.1, v5.1.10, v5.1.11, v5.1.12, v5.1.13, v5.1.14, v5.1.15, v5.1.16, v5.1.17, v5.1.18, v5.1.19, v5.1.2, v5.1.20, v5.1.21, v5.1.22, v5.1.23, v5.1.24, v5.1.25, v5.1.26, v5.1.27, v5.1.28, v5.1.29, v5.1.3, v5.1.30, v5.1.31, v5.1.32, v5.1.33, v5.1.34, v5.1.35, v5.1.36, v5.1.37, v5.1.38, v5.1.39, v5.1.4, v5.1.40, v5.1.41, v5.1.42, v5.1.43, v5.1.44, v5.1.45, v5.1.46, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.1.9, v5.2.0, v5.2.0-beta1, v5.2.1, v5.2.10, v5.2.11, v5.2.12, v5.2.13, v5.2.14, v5.2.15, v5.2.16, v5.2.17, v5.2.18, v5.2.19, v5.2.2, v5.2.20, v5.2.21, v5.2.22, v5.2.23, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.29, v5.2.3, v5.2.30, v5.2.31, v5.2.32, v5.2.33, v5.2.34, v5.2.35, v5.2.36, v5.2.37, v5.2.38, v5.2.39, v5.2.4, v5.2.40, v5.2.42, v5.2.43, v5.2.44, v5.2.45, v5.2.5, v5.2.6, v5.2.7, v5.2.8, v5.2.9, v5.3.0, v5.3.0-RC1, v5.3.1, v5.3.10, v5.3.11, v5.3.12, v5.3.13, v5.3.14, v5.3.15, v5.3.16, v5.3.17, v5.3.18, v5.3.19, v5.3.2, v5.3.20, v5.3.21, v5.3.22, v5.3.23, v5.3.24, v5.3.25, v5.3.26, v5.3.27, v5.3.28, v5.3.29, v5.3.3, v5.3.30, v5.3.31, v5.3.4, v5.3.5, v5.3.6, v5.3.7, v5.3.8, v5.3.9, v5.4.0, v5.4.1, v5.4.10, v5.4.11, v5.4.12, v5.4.13, v5.4.14, v5.4.15, v5.4.16, v5.4.17, v5.4.18, v5.4.19, v5.4.2, v5.4.20, v5.4.21, v5.4.22, v5.4.23, v5.4.24, v5.4.25, v5.4.26, v5.4.27, v5.4.28, v5.4.29, v5.4.3, v5.4.30, v5.4.31, v5.4.32, v5.4.33, v5.4.34, v5.4.35, v5.4.36, v5.4.4, v5.4.5, v5.4.6, v5.4.7, v5.4.8, v5.4.9, v5.5.0, v5.5.1, v5.5.10, v5.5.11, v5.5.12, v5.5.13, v5.5.14, v5.5.15, v5.5.16, v5.5.17, v5.5.18, v5.5.19, v5.5.2, v5.5.20, v5.5.21, v5.5.22, v5.5.23, v5.5.24, v5.5.25, v5.5.26, v5.5.27, v5.5.28, v5.5.29, v5.5.3, v5.5.30, v5.5.31, v5.5.32, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.38, v5.5.39, v5.5.4, v5.5.40, v5.5.41, v5.5.42, v5.5.43, v5.5.44, v5.5.45, v5.5.46, v5.5.47, v5.5.48, v5.5.5, v5.5.6, v5.5.7, v5.5.8, v5.5.9, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.18, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.12, v5.7.13, v5.7.14, v5.7.15, v5.7.16, v5.7.17, v5.7.18, v5.7.19, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.24, v5.7.25, v5.7.26, v5.7.27, v5.7.28, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9, v5.8.0, v5.8.1, v5.8.10, v5.8.11, v5.8.12, v5.8.13, v5.8.14, v5.8.15, v5.8.16, v5.8.17, v5.8.18, v5.8.19, v5.8.2, v5.8.20, v5.8.21, v5.8.22, v5.8.23, v5.8.24, v5.8.25, v5.8.26, v5.8.27, v5.8.28, v5.8.29, v5.8.3, v5.8.30, v5.8.31, v5.8.32, v5.8.33, v5.8.34, v5.8.35, v5.8.4, v5.8.5, v5.8.6, v5.8.7, v5.8.8, v5.8.9] but these conflict with your requirements or minimum-stability.
    - Installation request for sven/flex-env ^2.1 -> satisfiable by sven/flex-env[2.1.1, v2.1.0].

Todos for 2.0

A little todo-list for myself to keep track of:

  • More logical API (chainable?)
  • Decouple functionality from commands
  • Add list & get methods
  • Combine set and new into set (if entry doesn't exist, create a new one)

The development branch is development.

Contribution

Hi, i just needed this for my project, but it's outdated, i would like to be a member to help you out if you will

"env:set" does not support non-alphabetical characters

Did you try to set a value with a plus character? The result will surprise you:
.env file:

MAIL_USERNAME=[email protected]
MAIL_PASSWORD=hy6gGbS+
MAIL_ENCRYPTION=tls

Executing command: php artisan env:set MAIL_PASSWORD ABCDEF+
Result file looks like this:

MAIL_USERNAME=[email protected]
MAIL_PASSWORD=ABCDEF+
+
MAIL_ENCRYPTION=tls

If your old value has other charaters, you get error:
.env file:

MAIL_USERNAME=[email protected]
MAIL_PASSWORD=hy6^gGbS+
MAIL_ENCRYPTION=tls

Executing command: php artisan env:set MAIL_PASSWORD ABCDEF+
got error Could not set the value in your .env file, reverting...

The problem is preg_replace function...

Trouble with 3.x

when i composer update with:

{
"require-dev": {
"sven/flex-env": "^3.0"
}
}

Then:

Problem 1
- Installation request for sven/flex-env ^3.0 -> satisfiable by sven/flex-env[3.0.x-dev].
- Removal request for sven/flex-env == 3.0.9999999.9999999-dev

Change it to: "sven/flex-env": "3.0.x-dev", composer update ok ,but when i use: php artisan env:list

[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Sven\FlexEnv\Env' not found

with the Laravel 5.5

Add env:build command

php artisan env:build (name here is up for discussion) should copy over the .env.example command into a valid .env file. This should take a few things into consideration:

  • The current values in the .env file must still exist after executing this command
  • All values in the .env file with a space ( ) in them must be wrapped in quotes

Boolean Value??

php artisan env:set APP_DEBUG false
Could not set the value in your .env file, reverting...

is any way to set a boolean value?

Thnx

Todos

  • Clean up code significantly (DRY & KISS)
  • Create env:example command to create a .env.example (or .env.dist) with empty values
  • Create env:build command to build a .env file from .env.example or .env.dist

Add env:example command

php artisan env:example should generate a file called .env.example (or overwrite if it already exists) with all the keys from the regular .env file. The example file should have empty values.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.