Skip to content

Commit

Permalink
Merge pull request #37 from sergiz/pr/properly-support-L5.8
Browse files Browse the repository at this point in the history
Properly support current Laravel versions
  • Loading branch information
JackieDo authored Jun 7, 2020
2 parents 44062c8 + a5496c5 commit 16d796e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 19 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Latest Unstable Version](https://poser.pugx.org/jackiedo/dotenv-editor/v/unstable)](https://packagist.org/packages/jackiedo/dotenv-editor)
[![License](https://poser.pugx.org/jackiedo/dotenv-editor/license)](https://packagist.org/packages/jackiedo/dotenv-editor)

Laravel Dotenv Editor is the .env file editor (or files with same structure and syntax) for Laravel 5+. Now you can easily edit .env files with the following features:
Laravel Dotenv Editor is the .env file editor (or files with same structure and syntax) for Laravel 5.8+. Now you can easily edit .env files with the following features:

* Read raw content of file
* Read lines of file content
Expand Down Expand Up @@ -42,7 +42,7 @@ Look at one of the following topics to learn more about Laravel Dotenv Editor
* [Thanks from author](#thanks-for-use)

## Versions and compatibility
Currently, only Laravel Dotenv Editor 1.x is compatible with Laravel 5+ and later. This package does not support Laravel 4.2 and earlier versions.
Laravel Dotenv Editor is compatible with Laravel 5.8 and later. This package does not support earlier Laravel versions.

## Installation
You can install this package through [Composer](https://getcomposer.org).
Expand All @@ -65,7 +65,7 @@ $ composer update

> **Note:** Instead of performing the above two steps, it may be faster to use the command line `$ composer require jackiedo/dotenv-editor:1.*`.
Since Laravel 5.5, [service providers and aliases are automatically registered](https://laravel.com/docs/5.5/packages#package-discovery). But if you are using Laravel 5.4 or earlier, you must perform these two steps:
Since Laravel 5.5, [service providers and aliases are automatically registered](https://laravel.com/docs/5.5/packages#package-discovery), so you can safely skip the following two steps:

- The third step is to register the service provider. Open `config/app.php`, and add a new item to the providers array:

Expand Down
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jackiedo/dotenv-editor",
"description": "The .env file editor tool for Laravel 5+",
"description": "The .env file editor tool for Laravel 5.8+",
"license": "MIT",
"keywords": ["laravel", "dotenv", "dotenv-editor"],
"authors": [
Expand All @@ -10,10 +10,9 @@
}
],
"require": {
"php": ">=5.4.0",
"illuminate/config": ">=5.0",
"illuminate/container": ">=5.0",
"illuminate/support": ">=5.0"
"illuminate/console": "^5.8|^6.0|^7.0",
"illuminate/contracts": "^5.8|^6.0|^7.0",
"illuminate/support": "^5.8|^6.0|^7.0"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/Jackiedo/DotenvEditor/DotenvEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ class DotenvEditor
/**
* The IoC Container
*
* @var \Illuminate\Container\Container
* @var \Illuminate\Contracts\Container\Container
*/
protected $app;

/**
* Store instance of Config Repository;
*
* @var \Illuminate\Config\Repository
* @var \Illuminate\Contracts\Config\Repository
*/
protected $config;

Expand Down
11 changes: 2 additions & 9 deletions src/Jackiedo/DotenvEditor/DotenvEditorServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
<?php namespace Jackiedo\DotenvEditor;

use Illuminate\Support\ServiceProvider;
use Illuminate\Contracts\Support\DeferrableProvider;

/**
* DotenvEditorServiceProvider
*
* @package Jackiedo\DotenvEditor
* @author Jackie Do <anhvudo@gmail.com>
*/
class DotenvEditorServiceProvider extends ServiceProvider
class DotenvEditorServiceProvider extends ServiceProvider implements DeferrableProvider
{

/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = true;

/**
* Bootstrap the application events.
*
Expand Down

0 comments on commit 16d796e

Please sign in to comment.