File tree Expand file tree Collapse file tree 4 files changed +2
-13
lines changed
Expand file tree Collapse file tree 4 files changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -39,10 +39,6 @@ public function __construct(
3939 if (! isset ($ this ->mainNamespace ) && count ($ this ->namespaces )) {
4040 $ this ->mainNamespace = $ this ->namespaces [0 ];
4141 }
42-
43- if (! isset ($ this ->mainNamespace )) {
44- throw new KernelException ("Tempest requires at least one PSR-4 namespace to be defined in composer.json. " );
45- }
4642 }
4743
4844 public function setMainNamespace (ComposerNamespace $ namespace ): self
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public function isOther(): bool
4747
4848 public static function fromEnv (): self
4949 {
50- $ value = env ('ENVIRONMENT ' , 'production ' );
50+ $ value = env ('ENVIRONMENT ' , 'local ' );
5151
5252 return self ::tryFrom ($ value ) ?? throw new InvalidEnvironment ($ value );
5353 }
Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ private function registerKernelErrorHandler(): self
186186 $ handler = new HttpProductionErrorHandler ();
187187 set_exception_handler ($ handler ->handleException (...));
188188 set_error_handler ($ handler ->handleError (...)); // @phpstan-ignore-line
189- } else {
189+ } elseif ( PHP_SAPI !== ' cli ' ) {
190190 $ whoops = new Run ();
191191 $ whoops ->pushHandler (new PrettyPageHandler ());
192192 $ whoops ->register ();
Original file line number Diff line number Diff line change @@ -92,13 +92,6 @@ public function takes_src_namespace_in_priority(): void
9292 $ this ->assertSame ('src/ ' , $ composer ->mainNamespace ->path );
9393 }
9494
95- #[Test]
96- public function errors_without_namespace (): void
97- {
98- $ this ->expectException (KernelException::class);
99- $ this ->initializeComposer ([]);
100- }
101-
10295 #[Test]
10396 public function errors_without_composer_file (): void
10497 {
You can’t perform that action at this time.
0 commit comments