From e5221d6d746907b59a314a41e0383bebc1ad9d9c Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 24 Jan 2023 15:02:24 +0100 Subject: [PATCH 1/4] Update license years (last time) --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index f234523..0223acd 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2016-2023 Fabien Potencier +Copyright (c) 2016-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 434066786a981c31c3b5c7260b10b6e1c0a9ea61 Mon Sep 17 00:00:00 2001 From: Antoine Lamirault Date: Sun, 5 Feb 2023 18:27:03 +0100 Subject: [PATCH 2/4] [Dotenv] Fix phpdoc Dotenv --- Dotenv.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Dotenv.php b/Dotenv.php index 2c76d52..4091c67 100644 --- a/Dotenv.php +++ b/Dotenv.php @@ -81,8 +81,8 @@ public function usePutenv(bool $usePutenv = true): self /** * Loads one or several .env files. * - * @param string $path A file to load - * @param string[] ...$extraPaths A list of additional files to load + * @param string $path A file to load + * @param string ...$extraPaths A list of additional files to load * * @throws FormatException when a file has a syntax error * @throws PathException when a file does not exist or is not readable @@ -98,10 +98,10 @@ public function load(string $path, string ...$extraPaths): void * .env.local is always ignored in test env because tests should produce the same results for everyone. * .env.dist is loaded when it exists and .env is not found. * - * @param string $path A file to load - * @param string $envKey|null The name of the env vars that defines the app env - * @param string $defaultEnv The app env to use when none is defined - * @param array $testEnvs A list of app envs for which .env.local should be ignored + * @param string $path A file to load + * @param string|null $envKey The name of the env vars that defines the app env + * @param string $defaultEnv The app env to use when none is defined + * @param array $testEnvs A list of app envs for which .env.local should be ignored * * @throws FormatException when a file has a syntax error * @throws PathException when a file does not exist or is not readable @@ -167,8 +167,8 @@ public function bootEnv(string $path, string $defaultEnv = 'dev', array $testEnv /** * Loads one or several .env files and enables override existing vars. * - * @param string $path A file to load - * @param string[] ...$extraPaths A list of additional files to load + * @param string $path A file to load + * @param string ...$extraPaths A list of additional files to load * * @throws FormatException when a file has a syntax error * @throws PathException when a file does not exist or is not readable From c45210b1c43d2d24e263eefe72e8162754dd4c9f Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Wed, 14 Dec 2022 15:42:16 +0100 Subject: [PATCH 3/4] Migrate to `static` data providers using `rector/rector` --- Tests/DotenvTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/DotenvTest.php b/Tests/DotenvTest.php index 47c9bfb..2089e4b 100644 --- a/Tests/DotenvTest.php +++ b/Tests/DotenvTest.php @@ -33,7 +33,7 @@ public function testParseWithFormatError($data, $error) } } - public function getEnvDataWithFormatErrors() + public static function getEnvDataWithFormatErrors() { $tests = [ ['FOO=BAR BAZ', "A value containing spaces must be surrounded by quotes in \".env\" at line 1.\n...FOO=BAR BAZ...\n ^ line 1 offset 11"], @@ -71,7 +71,7 @@ public function testParse($data, $expected) $this->assertSame($expected, $dotenv->parse($data)); } - public function getEnvData() + public static function getEnvData() { putenv('LOCAL=local'); $_ENV['LOCAL'] = 'local'; From 77b7660bfcb85e8f28287d557d7af0046bcd2ca3 Mon Sep 17 00:00:00 2001 From: Antoine Lamirault Date: Thu, 9 Mar 2023 21:36:58 +0100 Subject: [PATCH 4/4] [Dotenv] Improve Dotenv::usePutenv phpdoc --- Dotenv.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dotenv.php b/Dotenv.php index 4091c67..4406e1f 100644 --- a/Dotenv.php +++ b/Dotenv.php @@ -67,7 +67,7 @@ public function setProdEnvs(array $prodEnvs): self /** * @param bool $usePutenv If `putenv()` should be used to define environment variables or not. - * Beware that `putenv()` is not thread safe, that's why this setting defaults to false + * Beware that `putenv()` is not thread safe, that's why it's not enabled by default * * @return $this */