Skip to content

Add support for BOM-signed env files - #501

Merged
GrahamCampbell merged 1 commit into
phpdotenv:masterfrom
hosni:master
Nov 10, 2021
Merged

GrahamCampbell merged 1 commit into
phpdotenv:masterfrom
hosni:master

Conversation

@hosni

@hosni hosni commented Nov 8, 2021

Copy link
Copy Markdown
Contributor

Fix #500

@hosni

hosni commented Nov 8, 2021 •

Copy link
Copy Markdown
Contributor Author

Some checks were not successful by GitHub actions runner, But I did not encounter this problem on the local system when run test command!

So, I run the test command more and more until I face the above problem!
I realized the problem is sometime the uuid function of PHP generates a UUID that is like Scientific Notation
For example: 61898400105e6 or 61898400105e7
And for unknown reason, PHP treated this string as int! (even with strict_types)
I put a var_dump to print the generated key and value pair, see:
image

Actually, I don't know why string is treated as int by PHP (even with strict_types)
But I think one of the solutions is to add a prefix to uuid method, something like: pdenv, But I don't know it is a correct solution for solve this or not!
See: https://github.com/vlucas/phpdotenv/blob/accaddf133651d4b5cf81a119f25296736ffc850/tests/Dotenv/Repository/RepositoryTest.php#L54

@GrahamCampbell
GrahamCampbell merged commit d4394d0 into phpdotenv:master Nov 10, 2021
@GrahamCampbell

Copy link
Copy Markdown
Collaborator

Thanks. 🍻

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.

Add support for BOM-signed env files

2 participants