Skip to content

Commit

Permalink
Merge branch 'v2.x-php82' into v2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
wakebit committed Apr 24, 2023
2 parents bab5607 + 1ecdfdf commit dd34f00
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests-laravel-9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [8.0, 8.1]
php: [8.0, 8.1, 8.2]

name: PHP ${{ matrix.php }}

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "library",
"license": "MIT",
"require": {
"php": "^8.0|^8.1",
"php": "^8.0|^8.1|^8.2",
"illuminate/console": "^7.0|^8.0|^9.0",
"illuminate/contracts": "^7.0|^8.0|^9.0",
"illuminate/support": "^7.0|^8.0|^9.0",
Expand Down
6 changes: 4 additions & 2 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ final class ServiceProvider extends \Illuminate\Support\ServiceProvider
/** {@inheritDoc} */
public function register(): void
{
/** @psalm-suppress DeprecatedMethod */
AnnotationRegistry::registerLoader('class_exists');
if (method_exists(AnnotationRegistry::class, 'registerLoader')) {
/** @psalm-suppress DeprecatedMethod */
AnnotationRegistry::registerLoader('class_exists');
}

$configPath = __DIR__ . '/../config/cycle.php';
$this->mergeConfigFrom($configPath, 'cycle');
Expand Down
7 changes: 5 additions & 2 deletions tests/src/Command/Schema/RenderCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@ public function testRender(): void
$console = $this->app->get(Kernel::class);
$exitCode = $console->call('cycle:schema:render', ['-nc' => true]);
$realOutput = $console->output();
$expectedOutput = [
$articlesOutput = [
'[customer] :: default.customers',
'Entity:', Customer::class,
'Mapper:', Mapper::class,
'Repository:', Repository::class,
'Primary key:', 'id',
'Fields', '(property -> db.field -> typecast)', 'id -> id -> int', 'name -> name',
'Relations:', 'not defined',
];

$customersOutput = [
'[article] :: default.articles',
'Entity:', Article::class,
'Mapper:', Mapper::class,
Expand All @@ -43,6 +45,7 @@ public function testRender(): void
: new \Illuminate\Foundation\Testing\Constraints\SeeInOrder($realOutput);

$this->assertSame(Command::SUCCESS, $exitCode);
$this->assertThat($expectedOutput, $constraint);
$this->assertThat($articlesOutput, $constraint);
$this->assertThat($customersOutput, $constraint);
}
}

0 comments on commit dd34f00

Please sign in to comment.