Skip to content

[3.3] Rewrite parser and fix escaped quotes in multiline values - #322

Merged
GrahamCampbell merged 1 commit into
phpdotenv:masterfrom
GrahamCampbell:parser-rewrite
Jan 26, 2019
Merged

GrahamCampbell merged 1 commit into
phpdotenv:masterfrom
GrahamCampbell:parser-rewrite

Conversation

@GrahamCampbell

Copy link
Copy Markdown
Collaborator

Closes #319.

@GrahamCampbell
GrahamCampbell merged commit 21c540a into phpdotenv:master Jan 26, 2019
@GrahamCampbell
GrahamCampbell deleted the parser-rewrite branch January 26, 2019 16:57
@GrahamCampbell GrahamCampbell changed the title Rewrite parser and fix escaped quotes in multiline values [3.3] Rewrite parser and fix escaped quotes in multiline values Jan 28, 2019
@drzraf

drzraf commented Feb 27, 2019

Copy link
Copy Markdown

This commit added symfony/polyfill-ctype to composer.json instead php[ctype].
I can't see the rational of this choice. (And I'd rather before off this extra-dependency)

@GrahamCampbell

Copy link
Copy Markdown
Collaborator Author

This adds the dependency because we are using the ctype functions.

@GrahamCampbell

Copy link
Copy Markdown
Collaborator Author

The symfony/polyfill-ctype package has ext-ctype as a recommended package. When you install phpdotenv and you don't have the php extension, composer will actually warn you about this, and recommend you install it.

@drzraf

drzraf commented Feb 28, 2019

Copy link
Copy Markdown

... but if one has php[ctype] it installs an unneeded dependency.

@GrahamCampbell

Copy link
Copy Markdown
Collaborator Author

You can stop this happening in your app with the following trick. In your app's composer.json, do this:

{
    ...
    "replace": {
        "symfony/polyfill-ctype": "*"
    },
    "require": {
        ...
        "ext-ctype": "*",
        ...
        "vlucas/phpdotenv": "^3.3"
    },
    ...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants