Skip to content

Commit ba57714

Browse files
committed
fix(laravel): do not require tests while autoconfiguring
fixes #7023
1 parent 935b9b5 commit ba57714

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

src/Laravel/testbench.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ workbench:
3232
to: app/ApiResource
3333
- from: ./workbench/app/State/
3434
to: app/State
35+
- from: ./workbench/app/Modules/
36+
to: app/Modules
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the API Platform project.
5+
*
6+
* (c) Kévin Dunglas <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
declare(strict_types=1);
13+
14+
namespace Workbench\App\Modules\FirstModule\Tests\Feature;
15+
16+
use Tests\TestCase;
17+
18+
pest()->extend(TestCase::class);
19+
20+
it('does nothing', function (): void {
21+
});

src/Metadata/Util/ReflectionClassRecursiveIterator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public static function getReflectionClassesFromDirectories(array $directories):
5050
new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS),
5151
\RecursiveIteratorIterator::LEAVES_ONLY
5252
),
53-
'/^.+\.php$/i',
53+
'/^(?!.*Test\.php$).+\.php$/i',
5454
\RecursiveRegexIterator::GET_MATCH
5555
);
5656

0 commit comments

Comments
 (0)