updated streamline-setup v2

This commit is contained in:
2025-01-15 08:53:49 -08:00
committed by alec.turner
parent a2ce9248f0
commit 4b569f81b0
20228 changed files with 2932048 additions and 63204 deletions
@@ -18,8 +18,8 @@
"require": {
"php": "^7.2.5 || ^8.0",
"ext-pcre": "*",
"graham-campbell/result-type": "^1.1.2",
"phpoption/phpoption": "^1.9.2",
"graham-campbell/result-type": "^1.1.3",
"phpoption/phpoption": "^1.9.3",
"symfony/polyfill-ctype": "^1.24",
"symfony/polyfill-mbstring": "^1.24",
"symfony/polyfill-php80": "^1.24"
@@ -51,7 +51,7 @@
"extra": {
"bamarni-bin": {
"bin-links": true,
"forward-command": true
"forward-command": false
},
"branch-alias": {
"dev-master": "5.6-dev"
@@ -80,7 +80,7 @@ class Dotenv
*
* @return \Dotenv\Dotenv
*/
public static function create(RepositoryInterface $repository, $paths, $names = null, bool $shortCircuit = true, string $fileEncoding = null)
public static function create(RepositoryInterface $repository, $paths, $names = null, bool $shortCircuit = true, ?string $fileEncoding = null)
{
$builder = $names === null ? StoreBuilder::createWithDefaultName() : StoreBuilder::createWithNoNames();
@@ -109,7 +109,7 @@ class Dotenv
*
* @return \Dotenv\Dotenv
*/
public static function createMutable($paths, $names = null, bool $shortCircuit = true, string $fileEncoding = null)
public static function createMutable($paths, $names = null, bool $shortCircuit = true, ?string $fileEncoding = null)
{
$repository = RepositoryBuilder::createWithDefaultAdapters()->make();
@@ -126,7 +126,7 @@ class Dotenv
*
* @return \Dotenv\Dotenv
*/
public static function createUnsafeMutable($paths, $names = null, bool $shortCircuit = true, string $fileEncoding = null)
public static function createUnsafeMutable($paths, $names = null, bool $shortCircuit = true, ?string $fileEncoding = null)
{
$repository = RepositoryBuilder::createWithDefaultAdapters()
->addAdapter(PutenvAdapter::class)
@@ -145,7 +145,7 @@ class Dotenv
*
* @return \Dotenv\Dotenv
*/
public static function createImmutable($paths, $names = null, bool $shortCircuit = true, string $fileEncoding = null)
public static function createImmutable($paths, $names = null, bool $shortCircuit = true, ?string $fileEncoding = null)
{
$repository = RepositoryBuilder::createWithDefaultAdapters()->immutable()->make();
@@ -162,7 +162,7 @@ class Dotenv
*
* @return \Dotenv\Dotenv
*/
public static function createUnsafeImmutable($paths, $names = null, bool $shortCircuit = true, string $fileEncoding = null)
public static function createUnsafeImmutable($paths, $names = null, bool $shortCircuit = true, ?string $fileEncoding = null)
{
$repository = RepositoryBuilder::createWithDefaultAdapters()
->addAdapter(PutenvAdapter::class)
@@ -182,7 +182,7 @@ class Dotenv
*
* @return \Dotenv\Dotenv
*/
public static function createArrayBacked($paths, $names = null, bool $shortCircuit = true, string $fileEncoding = null)
public static function createArrayBacked($paths, $names = null, bool $shortCircuit = true, ?string $fileEncoding = null)
{
$repository = RepositoryBuilder::createWithNoAdapters()->addAdapter(ArrayAdapter::class)->make();
@@ -30,7 +30,7 @@ final class Entry
*
* @return void
*/
public function __construct(string $name, Value $value = null)
public function __construct(string $name, ?Value $value = null)
{
$this->name = $name;
$this->value = $value;
@@ -65,7 +65,7 @@ final class RepositoryBuilder
*
* @return void
*/
private function __construct(array $readers = [], array $writers = [], bool $immutable = false, array $allowList = null)
private function __construct(array $readers = [], array $writers = [], bool $immutable = false, ?array $allowList = null)
{
$this->readers = $readers;
$this->writers = $writers;
@@ -244,7 +244,7 @@ final class RepositoryBuilder
*
* @return \Dotenv\Repository\RepositoryBuilder
*/
public function allowList(array $allowList = null)
public function allowList(?array $allowList = null)
{
return new self($this->readers, $this->writers, $this->immutable, $allowList);
}
@@ -40,7 +40,7 @@ final class Reader
*
* @return array<string,string>
*/
public static function read(array $filePaths, bool $shortCircuit = true, string $fileEncoding = null)
public static function read(array $filePaths, bool $shortCircuit = true, ?string $fileEncoding = null)
{
$output = [];
@@ -67,7 +67,7 @@ final class Reader
*
* @return \PhpOption\Option<string>
*/
private static function readFromFile(string $path, string $encoding = null)
private static function readFromFile(string $path, ?string $encoding = null)
{
/** @var Option<string> */
$content = Option::fromValue(@\file_get_contents($path), false);
@@ -39,7 +39,7 @@ final class FileStore implements StoreInterface
*
* @return void
*/
public function __construct(array $filePaths, bool $shortCircuit, string $fileEncoding = null)
public function __construct(array $filePaths, bool $shortCircuit, ?string $fileEncoding = null)
{
$this->filePaths = $filePaths;
$this->shortCircuit = $shortCircuit;
@@ -51,7 +51,7 @@ final class StoreBuilder
*
* @return void
*/
private function __construct(array $paths = [], array $names = [], bool $shortCircuit = false, string $fileEncoding = null)
private function __construct(array $paths = [], array $names = [], bool $shortCircuit = false, ?string $fileEncoding = null)
{
$this->paths = $paths;
$this->names = $names;
@@ -120,7 +120,7 @@ final class StoreBuilder
*
* @return \Dotenv\Store\StoreBuilder
*/
public function fileEncoding(string $fileEncoding = null)
public function fileEncoding(?string $fileEncoding = null)
{
return new self($this->paths, $this->names, $this->shortCircuit, $fileEncoding);
}
@@ -64,7 +64,7 @@ final class Regex
*
* @return \GrahamCampbell\ResultType\Result<string,string>
*/
public static function replaceCallback(string $pattern, callable $callback, string $subject, int $limit = null)
public static function replaceCallback(string $pattern, callable $callback, string $subject, ?int $limit = null)
{
return self::pregAndWrap(static function (string $subject) use ($pattern, $callback, $limit) {
return (string) @\preg_replace_callback($pattern, $callback, $subject, $limit ?? -1);
@@ -33,7 +33,7 @@ final class Str
*
* @return \GrahamCampbell\ResultType\Result<string,string>
*/
public static function utf8(string $input, string $encoding = null)
public static function utf8(string $input, ?string $encoding = null)
{
if ($encoding !== null && !\in_array($encoding, \mb_list_encodings(), true)) {
/** @var \GrahamCampbell\ResultType\Result<string,string> */
@@ -79,7 +79,7 @@ final class Str
*
* @return string
*/
public static function substr(string $input, int $start, int $length = null)
public static function substr(string $input, int $start, ?int $length = null)
{
return \mb_substr($input, $start, $length, 'UTF-8');
}