From 7f33a42fa02f4596efaac2c5a92e471724390eda Mon Sep 17 00:00:00 2001 From: TangRufus Date: Thu, 11 Jun 2020 15:54:42 +0800 Subject: [PATCH] Upgrade `oscarotero/env` to `^2.0` --- composer.json | 2 +- composer.lock | 30 +++++++++++++++++++----------- config/application.php | 6 +----- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/composer.json b/composer.json index 60b0e44b11..09b3b1572f 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "php": ">=7.1", "composer/installers": "^1.8", "vlucas/phpdotenv": "^4.1.3", - "oscarotero/env": "^1.2.0", + "oscarotero/env": "^2.0", "roots/wordpress": "5.4.1", "roots/wp-config": "1.0.0", "roots/wp-password-bcrypt": "1.0.0" diff --git a/composer.lock b/composer.lock index d3c123db36..569531f510 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bc849afd6db045cab0f924b32f28065b", + "content-hash": "363452268ecb2d0187c9152605e791be", "packages": [ { "name": "composer/installers", @@ -135,27 +135,34 @@ }, { "name": "oscarotero/env", - "version": "v1.2.0", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/oscarotero/env.git", - "reference": "4ab45ce5c1f2c62549208426bfa20a3d5fa008c6" + "reference": "af3fe9677f4609f387abc53efb16a9a01594db8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/oscarotero/env/zipball/4ab45ce5c1f2c62549208426bfa20a3d5fa008c6", - "reference": "4ab45ce5c1f2c62549208426bfa20a3d5fa008c6", + "url": "https://api.github.com/repos/oscarotero/env/zipball/af3fe9677f4609f387abc53efb16a9a01594db8e", + "reference": "af3fe9677f4609f387abc53efb16a9a01594db8e", "shasum": "" }, "require": { "ext-ctype": "*", - "php": ">=5.2" + "php": ">=7.1" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.16", + "phpunit/phpunit": "^7.0" }, "type": "library", "autoload": { - "psr-0": { - "Env": "src/" - } + "psr-4": { + "Env\\": "src/" + }, + "files": [ + "src/env_function.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -174,7 +181,7 @@ "keywords": [ "env" ], - "time": "2019-04-03T18:28:43+00:00" + "time": "2020-06-03T21:16:26+00:00" }, { "name": "phpoption/phpoption", @@ -241,7 +248,8 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress/zipball/5.4.1" + "url": "https://api.github.com/repos/WordPress/WordPress/zipball/5.4.1", + "reference": "5.4.1" }, "require": { "php": ">=5.3.2", diff --git a/config/application.php b/config/application.php index 541e05a641..5253ecabd9 100644 --- a/config/application.php +++ b/config/application.php @@ -9,6 +9,7 @@ */ use Roots\WPConfig\Config; +use function Env\env; /** * Directory containing all of the site's files @@ -24,11 +25,6 @@ */ $webroot_dir = $root_dir . '/web'; -/** - * Expose global env() function from oscarotero/env - */ -Env::init(); - /** * Use Dotenv to set required environment variables and load .env file in root */