Skip to content

Commit

Permalink
Merge branch '1-2-0' into 'main'
Browse files Browse the repository at this point in the history
1-2-0

See merge request fluxlabs/flux-eco/dot-env!3
  • Loading branch information
mstuder committed Apr 8, 2022
2 parents 018e9cc + fc14d5c commit e051c39
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 19 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## [1.2.0]
* changed functional namespace to fluxDotEnv

## [1.1.0]
* change set required version from php8.0 to php 7.4

Expand Down
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Loads .env-Files
.env-File

```
MYSQL_HOST=localhost
MYSQL_DATABASE=projection
MYSQL_USER=emmett
PASSWORD=fluxcapacitor
STORAGE_HOST=localhost
STORAGE_NAME=projection
STORAGE_USER=emmett
STORAGE_PASSWORD=fluxcapacitor
```

loadAndPrint.php
Expand All @@ -22,8 +22,8 @@ require_once __DIR__ . '/../vendor/autoload.php';
FluxEco\DotEnv\Api::new()->load(__DIR__);
echo getenv('MYSQL_USER').PHP_EOL;
echo getenv('PASSWORD').PHP_EOL;
echo getenv('STORAGE_USER').PHP_EOL;
echo getenv('STORAGE_PASSWORD').PHP_EOL;
```

output
Expand All @@ -40,7 +40,10 @@ fluxcapacitor
require_once __DIR__ . '/../vendor/autoload.php';
fluxy\loadDotEnv(__DIR__);
fluxDotEnv\loadDotEnv(__DIR__);
echo getenv('STORAGE_USER').PHP_EOL;
echo getenv('STORAGE_PASSWORD').PHP_EOL;
```

## Contributing :purple_heart:
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "flux-eco/dot-env",
"description": "Loads .env-Files",
"version": "1.1.0",
"version": "1.2.0",
"type": "flux-app",
"keywords": [
"flux-eco",
Expand Down Expand Up @@ -35,7 +35,7 @@
"FluxEco\\DotEnv\\": [
"src/"
],
"fluxy\\": [
"fluxDotEnv\\": [
"fn/"
]
}
Expand Down
8 changes: 4 additions & 4 deletions examples/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MYSQL_HOST=localhost
MYSQL_DATABASE=projection
MYSQL_USER=emmett
PASSWORD=fluxcapacitor
STORAGE_HOST=localhost
STORAGE_NAME=projection
STORAGE_USER=emmett
STORAGE_PASSWORD=fluxcapacitor
4 changes: 2 additions & 2 deletions examples/loadAndPrint.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

FluxEco\DotEnv\Api::new()->load(__DIR__);

echo getenv('MYSQL_USER').PHP_EOL;
echo getenv('PASSWORD').PHP_EOL;
echo getenv('STORAGE_USER').PHP_EOL;
echo getenv('STORAGE_PASSWORD').PHP_EOL;
6 changes: 3 additions & 3 deletions examples/loadAndPrintFunctional.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require_once __DIR__ . '/../vendor/autoload.php';

fluxy\loadDotEnv(__DIR__);
fluxDotEnv\loadDotEnv(__DIR__);

echo getenv('MYSQL_USER').PHP_EOL;
echo getenv('PASSWORD').PHP_EOL;
echo getenv('STORAGE_USER').PHP_EOL;
echo getenv('STORAGE_PASSWORD').PHP_EOL;
2 changes: 1 addition & 1 deletion fn/loadDotEnv.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace fluxy;
namespace fluxDotEnv;

use FluxEco\DotEnv\Api;

Expand Down

0 comments on commit e051c39

Please sign in to comment.