Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vlucas/phpdotenv
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.1.5
Choose a base ref
...
head repository: vlucas/phpdotenv
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.1.6
Choose a head ref
  • 8 commits
  • 6 files changed
  • 3 contributors

Commits on May 14, 2020

  1. Fixed readme typo (#436)

    chapeupreto authored May 14, 2020

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    e7aea0d View commit details
  2. Update .travis.yml

    GrahamCampbell committed May 14, 2020

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    ac71f12 View commit details
  3. Updated phpstan

    GrahamCampbell committed May 14, 2020

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    763e8e5 View commit details

Commits on May 22, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5c8934c View commit details
  2. Merge branch '3.6'

    GrahamCampbell committed May 22, 2020

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    8f71e9a View commit details

Commits on May 23, 2020

  1. Create .editorconfig (#404)

    Musa authored and GrahamCampbell committed May 23, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8b64814 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a6f9fbb View commit details
  3. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    0b32505 View commit details
Showing with 26 additions and 25 deletions.
  1. +18 −18 .travis.yml
  2. +1 −1 README.md
  3. +3 −3 phpstan.src.neon.dist
  4. +2 −1 src/Loader/Parser.php
  5. +1 −1 src/Store/FileStore.php
  6. +1 −1 vendor-bin/phpstan/composer.json
36 changes: 18 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -14,37 +14,37 @@ jobs:
script: vendor/bin/phpunit
- name: PHP 5.6
dist: bionic
install: travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:5.6 update -n -o
script: docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit registry.gitlab.com/grahamcampbell/php:5.6
install: travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:5.6-base update -n -o
script: docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit registry.gitlab.com/grahamcampbell/php:5.6-cli
- name: PHP 7.0
dist: bionic
install: travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:7.0 update -n -o
script: docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit registry.gitlab.com/grahamcampbell/php:7.0
install: travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:7.0-base update -n -o
script: docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit registry.gitlab.com/grahamcampbell/php:7.0-cli
- name: PHP 7.1
dist: bionic
install: travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:7.1 update -n -o
script: docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit registry.gitlab.com/grahamcampbell/php:7.1
install: travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:7.1-base update -n -o
script: docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit registry.gitlab.com/grahamcampbell/php:7.1-cli
- name: PHP 7.2
dist: bionic
install: travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:7.2 update -n -o
script: docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit registry.gitlab.com/grahamcampbell/php:7.2
install: travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:7.2-base update -n -o
script: docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit registry.gitlab.com/grahamcampbell/php:7.2-cli
- name: PHP 7.3
dist: bionic
install: travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:7.3 update -n -o
script: docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit registry.gitlab.com/grahamcampbell/php:7.3
install: travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:7.3-base update -n -o
script: docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit registry.gitlab.com/grahamcampbell/php:7.3-cli
- name: PHP 7.4
dist: bionic
install: travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:7.4 update -n -o
script: docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit registry.gitlab.com/grahamcampbell/php:7.4
install: travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:7.4-base update -n -o
script: docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit registry.gitlab.com/grahamcampbell/php:7.4-cli
- name: PHP 8.0
dist: bionic
install: travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:8.0 update -n -o --ignore-platform-reqs
script: docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit registry.gitlab.com/grahamcampbell/php:8.0
install: travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:8.0-base update -n -o --ignore-platform-reqs
script: docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit registry.gitlab.com/grahamcampbell/php:8.0-cli
- name: PHPStan
dist: bionic
install:
- travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:7.4 update -n -o
- travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:7.4 bin phpstan update -n -o
- travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:7.4-base update -n -o
- travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:7.4-base bin phpstan update -n -o
script:
- docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpstan registry.gitlab.com/grahamcampbell/php:7.4 analyse src -c phpstan.src.neon.dist
- docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpstan registry.gitlab.com/grahamcampbell/php:7.4 analyse tests -c phpstan.tests.neon.dist
- docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpstan registry.gitlab.com/grahamcampbell/php:7.4-cli analyse src -c phpstan.src.neon.dist
- docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpstan registry.gitlab.com/grahamcampbell/php:7.4-cli analyse tests -c phpstan.tests.neon.dist
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -183,7 +183,7 @@ $dotenv->load();

Behind the scenes, this is instructing the "repository" to allow immutability
or not. By default, the repository is configured to allow overwriting existing
values by default, which is relevent if one is calling the "create" method
values by default, which is relevant if one is calling the "create" method
using the `RepositoryBuilder` to construct a more custom repository:

```php
6 changes: 3 additions & 3 deletions phpstan.src.neon.dist
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@ parameters:
- '#Variable \$defaults might not be defined.#'
- '/^Parameter \#1 \$readers of class Dotenv\\Repository\\[a-zA-Z]*Repository[a-zA-Z]* constructor expects/'
- '/^Parameter \#2 \$writers of class Dotenv\\Repository\\[a-zA-Z]*Repository[a-zA-Z]* constructor expects/'
- '#Method Dotenv\\Repository\\AbstractRepository::offset[a-zA-Z\(\)\$ ]* typehint specified.#'
- '#Unable to resolve the template type S in call to method PhpOption\\Option<mixed>::flatMap\(\)#'
- '#Method Dotenv\\Loader\\Parser::processChar\(\) should return Dotenv\\Result\\Result<array<int, bool\|int\|string>, string> but returns Dotenv\\Result\\Result<array<int, [a-z\|\,]+>, mixed>.#'
- '#Method Dotenv\\Loader\\Parser::processChar\(\) should return Dotenv\\Result\\Result<array.+, string> but returns Dotenv\\Result\\Result<array.+, mixed>.#'
- '#Parameter \#1 \$callable of method PhpOption\\Option<Dotenv\\Loader\\Value\|null>::map\(\) expects callable\(Dotenv\\Loader\\Value\|null\): mixed, Closure\(Dotenv\\Loader\\Value\): mixed given.#'
- '#Parameter \#1 \$callable of method PhpOption\\Option<array\|null>::[a-z]+\(\) expects callable\(array\|null\): [a-z]+, Closure\(array\): mixed given.#'
- '#Parameter \#1 \$callable of method PhpOption\\Option<array\|null>::[a-z]+\(\) expects callable\(array\|null\): [a-z]+, Closure\(array\): mixed given.#'
- '#Parameter \#1 \$name of method Dotenv\\Repository\\AbstractRepository::set\(\) expects string, string\|null given.#'
3 changes: 2 additions & 1 deletion src/Loader/Parser.php
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
namespace Dotenv\Loader;

use Dotenv\Exception\InvalidFileException;
use Dotenv\Regex\Regex;
use Dotenv\Result\Error;
use Dotenv\Result\Success;
use RuntimeException;
@@ -91,7 +92,7 @@ private static function parseName($name)
*/
private static function isValidName($name)
{
return preg_match('~\A[a-zA-Z0-9_.]+\z~', $name) === 1;
return Regex::match('~\A[a-zA-Z0-9_.]+\z~', $name)->success()->getOrElse(0) === 1;
}

/**
2 changes: 1 addition & 1 deletion src/Store/FileStore.php
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ public function read()

$contents = Reader::read($this->filePaths, $this->shortCircuit);

if ($contents) {
if (count($contents) > 0) {
return implode("\n", $contents);
}

2 changes: 1 addition & 1 deletion vendor-bin/phpstan/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"require": {
"phpstan/phpstan": "^0.12.12"
"phpstan/phpstan": "^0.12.25"
}
}