Skip to content

Commit

Permalink
add failing test reproducing larastan#1883
Browse files Browse the repository at this point in the history
  • Loading branch information
sdkawata committed May 15, 2024
1 parent 66db15f commit 46fa779
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/Integration/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public static function dataIntegrationTests(): iterable
yield [__DIR__ . '/data/model-properties.php'];
yield [__DIR__ . '/data/blade-view.php'];
yield [__DIR__ . '/data/helpers.php'];
yield [__DIR__ . '/data/bug-1883.php'];

if (! version_compare(LARAVEL_VERSION, '10.0.0', '>=')) {
return;
Expand Down
16 changes: 16 additions & 0 deletions tests/Integration/data/bug-1883.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

use Illuminate\Support\Facades\Facade;

/**
* @mixin RedisAlias
*/
class RedisFacade extends Facade
{
}


function test(): void
{
RedisFacade::noSuchMethod();
}
6 changes: 6 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,9 @@ public function customMacroString(): string
if (version_compare(PHP_VERSION, '8.1.0', '>=') && version_compare(PHP_VERSION, '8.2.0', '<')) {
include_once 'enum-definition.php';
}

class RedisFacade
{
}

class_alias(RedisFacade::class, RedisAlias::class);

0 comments on commit 46fa779

Please sign in to comment.