Skip to content

Commit bb89862

Browse files
Quick patch 1.1.4
1 parent 32be00e commit bb89862

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ I will be really happy hearing from you.
5858

5959
## Changelog
6060

61+
### 1.1.4
62+
63+
* Fixed the ".env" autoload respect of the "working_dir" which was not working
64+
6165
### 1.1.3
6266

6367
* Implemented method `\spaf\simputils\models\Box::batch()` that allows to easily export items
@@ -215,7 +219,7 @@ so documentation will come after that in the very nearest time. My apologies.
215219

216220
Minimal PHP version: **8.0**
217221

218-
Current framework version: **1.1.3**
222+
Current framework version: **1.1.4**
219223
```shell
220224
composer require spaf/simputils "^1"
221225
```

src/PHP.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public static function frameworkDir() {
113113
*/
114114
public static function simpUtilsVersion(): Version|string {
115115
$class = static::redef(Version::class);
116-
return new $class('1.1.3', 'SimpUtils');
116+
return new $class('1.1.4', 'SimpUtils');
117117
}
118118

119119
/**

src/components/initblocks/DotEnvInitBlock.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use spaf\simputils\interfaces\InitBlockInterface;
99
use spaf\simputils\models\File;
1010
use spaf\simputils\PHP;
11+
use const DIRECTORY_SEPARATOR;
1112

1213
/**
1314
* @property-read ?File $default_file The default file reference (.env) or null if file does
@@ -39,7 +40,10 @@ public function initBlock(BasicInitConfig $config) {
3940
$class_file = PHP::redef(File::class);
4041
$res = true;
4142

42-
$file = new $class_file(static::DEFAULT_FILE_NAME);
43+
/** @var File $file */
44+
$file = new $class_file(
45+
$config->working_dir.DIRECTORY_SEPARATOR.static::DEFAULT_FILE_NAME
46+
);
4347
$this->_default_file = $file->exists
4448
?$file
4549
:null; // @codeCoverageIgnore

0 commit comments

Comments
 (0)