Rename class ReadEnvFile to DotEnv and add test cases

previous named Get\ReadEnvFile is no Get\DotEnv, static method is the
same.
Update for not parsing comments at the end of a line if the line was not
in quotes. Strips everything after comment mark and also right trims any
trailing spaces

Old:
FOO=Test # Comment -> $_ENV['FOO'] = "Test # Comment"

New:
FOO=Test # Comment -> $_ENV['FOO'] = "Test"

Add phpUnit tests for DotEnv class.
Update config.php with new class name

The old class name exists and is markted as deprecated until next major
release
This commit is contained in:
Clemens Schwaighofer
2022-06-09 07:00:03 +09:00
parent 5d98be06be
commit 88178cb08d
12 changed files with 334 additions and 59 deletions

View File