Commit Graph

10 Commits

Author SHA1 Message Date
a7ade86485 phpstan 2.0 upgrade and fixes 2024-11-18 20:10:09 +09:00
b9feacaded Add Block settings to dotenv reader
Now blocks can be set as prefix names for variables via [Block Name] type
grouping.
2024-08-21 11:41:15 +09:00
c608201de1 Switch to standard PSR-12 with spaces instead of tab 2023-01-19 12:38:37 +09:00
3668e6552c Extra check to make sure _ENV array is inited before appending to it 2023-01-06 10:13:20 +09:00
e95e0db218 Update phpdoc info for error 1 2022-06-09 12:56:11 +09:00
0d3e10fe26 Ignore comments at the end of line
If the variable value had no quotes a comment at the end of the line was
added to the variable.
Spaces between text and comment mark will be removed too

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

New:
FOO=Test # Comment -> $_ENV['FOO'] = "Test"
2022-06-09 09:17:21 +09:00
b73a24b447 Class rename, composer add, phpUnit tests add
Rename the class from ReadEnvFile to DotEnv.
Add everything to a composer json file so it can be published to
composer repository.
Add phpUnit tests for system
2022-06-08 11:24:23 +09:00
6cc09fb089 Allow . in variables 2021-10-14 13:36:50 +09:00
75367b2724 Fix next line read with double quote blocks in one line
If there was this
FOO="bar"

Then the # comment block was attached to bar because FOO was seen as a
multiline block although the quotes are in one line only
2021-10-11 09:30:36 +09:00
de80a9c061 Create dotenv readEnvFile single function 2021-10-11 08:58:36 +09:00