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
6868{
6969 use InvokerAware;
7070
71- public const APP_VERSION = '2.1.0 ' ;
71+ public const APP_VERSION = '2.1.1 ' ;
7272
7373 public const MIN_PHP_VERSION = '8.2 ' ;
7474
@@ -869,6 +869,7 @@ public function isDevelopment(): bool
869869 public static function getInstance (?string $ path = null ): self
870870 {
871871 $ basePath = match (true ) {
872+ self ::$ ROOT_PATH !== '' => self ::$ ROOT_PATH ,
872873 is_string ($ path ) && $ path !== '' => $ path ,
873874 default => self ::inferBasePath (),
874875 };
Original file line number Diff line number Diff line change 3838 * @param string|null $name
3939 * @param array $args
4040 * @return mixed
41- * @throws TypeException
4241 */
4342function app (?string $ name = null , array $ args = []): mixed
4443{
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 ();
5046
5147 if (is_null__ (var: $ name )) {
5248 return $ app ->getContainer ();
5349 }
54-
5550 return $ app ->getContainer ()->make ($ name , $ args );
5651}
5752
You can’t perform that action at this time.
0 commit comments