Skip to content

Commit 9e409c2

Browse files
committed
Merge branch 'release/0.6.32'
2 parents e08c7d4 + 3a7d0dd commit 9e409c2

File tree

8 files changed

+29
-15
lines changed

8 files changed

+29
-15
lines changed

.travis.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

.version.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"strategy": "semver",
3+
"major": 0,
4+
"minor": 6,
5+
"patch": 32,
6+
"build": 0
7+
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"ext-curl": "*",
1515
"ext-json": "*",
1616
"neuron-php/application": "0.6.*",
17-
"neuron-php/routing": "0.6.*",
17+
"neuron-php/routing": "^0.6.8",
1818
"symfony/yaml": "^6.4",
1919
"league/commonmark": "^2.6"
2020
},

src/Bootstrap.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,20 @@
1616
function Boot( string $ConfigPath ) : Application
1717
{
1818
/** @var Neuron\Data\Setting\Source\ISettingSource $Settings */
19-
$Settings = new Yaml( "$ConfigPath/config.yaml" );
2019

21-
$BasePath = $Settings->get( 'system', 'base_path' );
20+
try
21+
{
22+
$Settings = new Yaml( "$ConfigPath/config.yaml" );
23+
$BasePath = $Settings->get( 'system', 'base_path' );
24+
}
25+
catch( Exception $e )
26+
{
27+
$Settings = null;
28+
$BasePath = getenv( 'SYSTEM_BASE_PATH' ) ? : '.';
29+
}
2230

2331
$Version = new Version();
24-
$Version->loadFromFile( "$BasePath/version.json" );
32+
$Version->loadFromFile( "$BasePath/.version.json" );
2533

2634
return new Application( $Version->getAsString(), $Settings );
2735
}

tests/BootstrapTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,12 @@ public function testBootstrap()
1515
Dispatch( $App );
1616
}
1717

18+
public function testMissingConfig()
19+
{
20+
$cwd = getcwd();
21+
$App = Boot( 'examples/non-there' );
22+
$this->assertTrue( is_object( $App ) );
1823

24+
Dispatch( $App );
25+
}
1926
}

version.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

versionlog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 0.6.32 2025-05-21
2+
* Can now operate with no config file present and default to env settings.
3+
14
## 0.6.31 2025-02-18
25
* Updated router.
36
* Cleaned up bootstrap functions.

0 commit comments

Comments
 (0)