Skip to content

Commit 1b31030

Browse files
Merge branch '2.6' into 3.6
2 parents 96aeafd + df4c4d0 commit 1b31030

File tree

2 files changed

+46
-38
lines changed

2 files changed

+46
-38
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
github: GrahamCampbell
12
tidelift: "packagist/vlucas/phpdotenv"

README.md

Lines changed: 45 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,16 @@
11
PHP dotenv
22
==========
33

4-
Loads environment variables from `.env` to `getenv()`, `$_ENV` and
5-
`$_SERVER` automagically.
4+
Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.
65

7-
This is a PHP version of the original [Ruby
8-
dotenv](https://github.com/bkeepers/dotenv).
9-
10-
[![Build Status](https://travis-ci.org/vlucas/phpdotenv.svg?branch=master)](https://travis-ci.org/vlucas/phpdotenv)
11-
12-
13-
UPGRADING FROM V2
14-
-----------------
15-
16-
New in Version 3 is first-class support for multiline variables
17-
([#301](https://github.com/vlucas/phpdotenv/pull/301)) and much more
18-
flexibility in terms of which parts of the environment we try to read and
19-
modify ([#300](https://github.com/vlucas/phpdotenv/pull/300)). Consequently,
20-
you will need to replace any occurrences of `new Dotenv(...)` with
21-
`Dotenv::create(...)`, since our new native constructor takes a `Loader`
22-
instance now, so that it can be truly customized if required. Finally, one
23-
should note that the loader will no longer be trimming values
24-
([#302](https://github.com/vlucas/phpdotenv/pull/302)), moreover
25-
`Loader::load()` and its callers now return an associative array of the
26-
variables loaded with their values, rather than an array of raw lines from the
27-
environment file ([#306](https://github.com/vlucas/phpdotenv/pull/306)).
6+
![Banner](https://user-images.githubusercontent.com/2829600/71564012-31105580-2a91-11ea-9ad7-ef1278411b35.png)
287

29-
For more details, please see the
30-
[release notes](https://github.com/vlucas/phpdotenv/releases/tag/v3.0.0) and
31-
the [upgrading guide](UPGRADING.md).
8+
<p align="center">
9+
<a href="https://travis-ci.org/vlucas/phpdotenv"><img src="https://img.shields.io/travis/vlucas/phpdotenv/master.svg?style=flat-square" alt="Build Status"></img></a>
10+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-BSD%203--Clause-brightgreen.svg?style=flat-square" alt="Software License"></img></a>
11+
<a href="https://packagist.org/packages/vlucas/phpdotenv"><img src="https://img.shields.io/packagist/dt/vlucas/phpdotenv.svg?style=flat-square" alt="Total Downloads"></img></a>
12+
<a href="https://github.com/vlucas/phpdotenv/releases"><img src="https://img.shields.io/github/release/vlucas/phpdotenv.svg?style=flat-square" alt="Latest Version"></img></a>
13+
</p>
3214

3315

3416
Why .env?
@@ -54,16 +36,46 @@ variables, and you're going to love it!
5436
* EASY portability and sharing of required ENV values
5537
* COMPATIBLE with PHP's built-in web server and CLI runner
5638

39+
PHP dotenv is a PHP version of the original [Ruby
40+
dotenv](https://github.com/bkeepers/dotenv).
41+
5742

5843
Installation with Composer
5944
--------------------------
6045

61-
```shell
62-
composer require vlucas/phpdotenv
46+
Installation is super-easy via [Composer](https://getcomposer.org/):
47+
48+
```bash
49+
$ composer require vlucas/phpdotenv
6350
```
6451

52+
or add it by hand to your `composer.json` file.
53+
54+
55+
UPGRADING FROM V2
56+
-----------------
57+
58+
New in Version 3 is first-class support for multiline variables
59+
([#301](https://github.com/vlucas/phpdotenv/pull/301)) and much more
60+
flexibility in terms of which parts of the environment we try to read and
61+
modify ([#300](https://github.com/vlucas/phpdotenv/pull/300)). Consequently,
62+
you will need to replace any occurrences of `new Dotenv(...)` with
63+
`Dotenv::create(...)`, since our new native constructor takes a `Loader`
64+
instance now, so that it can be truly customized if required. Finally, one
65+
should note that the loader will no longer be trimming values
66+
([#302](https://github.com/vlucas/phpdotenv/pull/302)), moreover
67+
`Loader::load()` and its callers now return an associative array of the
68+
variables loaded with their values, rather than an array of raw lines from the
69+
environment file ([#306](https://github.com/vlucas/phpdotenv/pull/306)).
70+
71+
For more details, please see the
72+
[release notes](https://github.com/vlucas/phpdotenv/releases/tag/v3.0.0) and
73+
the [upgrading guide](UPGRADING.md).
74+
75+
6576
Usage
6677
-----
78+
6779
The `.env` file is generally kept out of version control since it can contain
6880
sensitive API keys and passwords. A separate `.env.example` file is created
6981
with all the required environment variables defined except for the sensitive
@@ -302,14 +314,9 @@ License
302314
PHP dotenv is licensed under [The BSD 3-Clause License](LICENSE).
303315

304316

305-
---
317+
For Enterprise
318+
--------------
319+
320+
Available as part of the Tidelift Subscription
306321

307-
<div align="center">
308-
<b>
309-
<a href="https://tidelift.com/subscription/pkg/packagist-vlucas-phpdotenv?utm_source=packagist-vlucas-phpdotenv&utm_medium=referral&utm_campaign=readme">Get professional support for PHP dotenv with a Tidelift subscription</a>
310-
</b>
311-
<br>
312-
<sub>
313-
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
314-
</sub>
315-
</div>
322+
The maintainers of `vlucas/phpdotenv` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-vlucas-phpdotenv?utm_source=packagist-vlucas-phpdotenv&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)

0 commit comments

Comments
 (0)