File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ final class Application extends Container
68
68
{
69
69
use InvokerAware;
70
70
71
- public const APP_VERSION = '2.1.0 ' ;
71
+ public const APP_VERSION = '2.1.1 ' ;
72
72
73
73
public const MIN_PHP_VERSION = '8.2 ' ;
74
74
@@ -869,6 +869,7 @@ public function isDevelopment(): bool
869
869
public static function getInstance (?string $ path = null ): self
870
870
{
871
871
$ basePath = match (true ) {
872
+ self ::$ ROOT_PATH !== '' => self ::$ ROOT_PATH ,
872
873
is_string ($ path ) && $ path !== '' => $ path ,
873
874
default => self ::inferBasePath (),
874
875
};
Original file line number Diff line number Diff line change 38
38
* @param string|null $name
39
39
* @param array $args
40
40
* @return mixed
41
- * @throws TypeException
42
41
*/
43
42
function app (?string $ name = null , array $ args = []): mixed
44
43
{
45
- $ app = Application::getInstance ();
46
-
47
- if (is_null__ ($ app )) {
48
- $ app = get_fresh_bootstrap ();
49
- }
44
+ /** @var Application $app */
45
+ $ app = get_fresh_bootstrap ();
50
46
51
47
if (is_null__ (var: $ name )) {
52
48
return $ app ->getContainer ();
53
49
}
54
-
55
50
return $ app ->getContainer ()->make ($ name , $ args );
56
51
}
57
52
You can’t perform that action at this time.
0 commit comments