Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/**/.gitignore export-ignore
/**/.gitattributes export-ignore
/**/Tests export-ignore
/**/*Test.php export-ignore
/.github export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/tests export-ignore
/ecs.php export-ignore
/phpstan.dist.neon export-ignore
/phpunit.xml.dist export-ignore
/ecs.php export-ignore
/rector.php export-ignore
2 changes: 1 addition & 1 deletion ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
return static function (ECSConfig $ecsConfig): void {
$ecsConfig->sets([PhdSetList::ecs()->getPath()]);

$ecsConfig->paths([__DIR__.'/src', __DIR__.'/tests']);
$ecsConfig->paths([__DIR__.'/src']);
$ecsConfig->skip([__DIR__.'/vendor']);
};
9 changes: 5 additions & 4 deletions phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
includes:
- vendor/phpstan/phpstan-strict-rules/rules.neon
- vendor/tomasvotruba/type-coverage/config/extension.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
- vendor/tomasvotruba/type-coverage/config/extension.neon

parameters:
level: 9
phpVersion: 80127
level: max
phpVersion:
min: 80100
max: 80599
editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%'
paths:
- src
- tests
fileExtensions:
- 'php'
type_coverage:
Expand Down
5 changes: 3 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
failOnWarning="true">
<testsuites>
<testsuite name="Unit">
<directory suffix="UnitTest.php">tests</directory>
<directory suffix="UnitTest.php">src</directory>
</testsuite>
<testsuite name="Integration">
<directory suffix="IntegrationTest.php">tests</directory>
<directory suffix="ServiceTest.php">src</directory>
</testsuite>
</testsuites>

Expand All @@ -22,6 +22,7 @@
<directory>src</directory>
</include>
<exclude>
<directory>src/*/Tests</directory>
<directory>src/*/*/Tests</directory>
<directory>src/*/*/*/Tests</directory>
<directory suffix="Test.php">src</directory>
Expand Down
2 changes: 1 addition & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Rector\ValueObject\PhpVersion;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([__DIR__.'/src', __DIR__.'/tests']);
$rectorConfig->paths([__DIR__.'/src']);

$rectorConfig->sets([PhdSetList::rector()->getPath()]);
$rectorConfig->phpVersion(PhpVersion::PHP_81);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

declare(strict_types=1);

namespace PhPhD\ExceptionToolkit\Tests\Bundle;
namespace PhPhD\ExceptionToolkit\Bundle\Tests;

use Nyholm\BundleTest\TestKernel;
use PhPhD\ExceptionToolkit\Bundle\PhdExceptionToolkitBundle;
use PhPhD\ExceptionToolkit\Tests\Bundle\Compiler\TestServicesCompilerPass;
use PhPhD\ExceptionToolkit\Bundle\Tests\Compiler\TestServicesCompilerPass;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\HttpKernel\KernelInterface;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace PhPhD\ExceptionToolkit\Tests\Bundle\Compiler;
namespace PhPhD\ExceptionToolkit\Bundle\Tests\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

declare(strict_types=1);

namespace PhPhD\ExceptionToolkit\Tests\Bundle;
namespace PhPhD\ExceptionToolkit\Unwrapper\Tests;

use PhPhD\ExceptionToolkit\Bundle\Tests\BundleTestCase;
use PhPhD\ExceptionToolkit\Unwrapper\Amp\AmpExceptionUnwrapper;
use PhPhD\ExceptionToolkit\Unwrapper\ExceptionUnwrapper;
use PhPhD\ExceptionToolkit\Unwrapper\Messenger\MessengerExceptionUnwrapper;
use Symfony\Component\VarExporter\LazyObjectInterface;

Expand All @@ -14,7 +16,7 @@
*
* @internal
*/
final class DependencyInjectionIntegrationTest extends BundleTestCase
final class ExceptionUnwrapperServiceTest extends BundleTestCase
{
public function testServiceDefinitions(): void
{
Expand All @@ -30,7 +32,7 @@ private function checkExceptionUnwrapper(): void

private function checkTopmostUnwrapper(): void
{
$exceptionUnwrapper = self::getContainer()->get('phd_exception_toolkit.exception_unwrapper');
$exceptionUnwrapper = self::getContainer()->get(ExceptionUnwrapper::class);
self::assertInstanceOf(LazyObjectInterface::class, $exceptionUnwrapper);
self::assertFalse($exceptionUnwrapper->isLazyObjectInitialized());
$topmostUnwrapper = $exceptionUnwrapper->initializeLazyObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace PhPhD\ExceptionToolkit\Tests\Unwrapper;
namespace PhPhD\ExceptionToolkit\Unwrapper\Tests;

use Amp\CompositeException;
use Exception;
Expand Down