diff --git a/.github/workflows/app.yml b/.github/workflows/app.yml index b5ff8f7..8d4ad31 100644 --- a/.github/workflows/app.yml +++ b/.github/workflows/app.yml @@ -5,6 +5,7 @@ on: branches: [2.x] schedule: - cron: '4 3 1 * *' + workflow_dispatch: {} jobs: build: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3db79b8..1a2b7fd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,6 +7,7 @@ on: branches: [2.x, 1.x] schedule: - cron: '3 2 1 * *' + workflow_dispatch: {} env: SYMFONY_DEPRECATIONS_HELPER: "max[direct]=0" @@ -33,7 +34,7 @@ jobs: experimental: false composer: v2 - - deps: 'dev' + - deps: 'stable' php: '8.3' symfony: '7.x' laravel: '11.x' @@ -43,7 +44,7 @@ jobs: - deps: 'dev' php: '8.4' symfony: '7.x' - laravel: '11.x' + laravel: '12.x' experimental: true composer: preview @@ -84,14 +85,6 @@ jobs: echo "LARAVEL_REQUIRE=$(echo '${{ matrix.laravel }}' | tr x \\*)" >> $GITHUB_ENV fi - #if [ "${{ matrix.symfony }}" = "7.x" ]; then - # # Psalm Symfony Plugin doesn't support Symfony 7 yet - # composer remove --no-update --dev vimeo/psalm psalm/plugin-symfony - - # # Carbon needs version 3 - # composer require --no-update nesbot/carbon:"3.x-dev as 2.99.0" - #fi - echo "PHP_VERSION=${{ matrix.php }}" >> $GITHUB_ENV - name: Cache dependencies diff --git a/composer.json b/composer.json index e99abe1..ab86803 100644 --- a/composer.json +++ b/composer.json @@ -10,13 +10,14 @@ "illuminate/database": "^9.0 || ^10.0 || ^11.0", "illuminate/events": "^9.0 || ^10.0 || ^11.0", "illuminate/console": "^9.39 || ^10.0 || ^11.0", + "laravel/serializable-closure": "^1.0", "symfony/framework-bundle": "^6.0 || ^7.0", "symfony/dependency-injection": "^6.0 || ^7.0", "jdorn/sql-formatter": "^1.2.17" }, "require-dev": { "doctrine/annotations": "1.*", - "symfony/maker-bundle": "^1.44", + "symfony/maker-bundle": "^1.49", "mockery/mockery": "^1.6", "symfony/console": "^6.0 || ^7.0", "symfony/event-dispatcher": "^6.0 || ^7.0", diff --git a/src/DependencyInjection/WouterJEloquentExtension.php b/src/DependencyInjection/WouterJEloquentExtension.php index c7b4580..7bd6390 100644 --- a/src/DependencyInjection/WouterJEloquentExtension.php +++ b/src/DependencyInjection/WouterJEloquentExtension.php @@ -14,7 +14,7 @@ use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Config\FileLocator; -use Symfony\Component\HttpKernel\DependencyInjection\Extension; +use Symfony\Component\DependencyInjection\Extension\Extension; use Symfony\Component\DependencyInjection\Loader; use Symfony\Component\DependencyInjection\Reference; use Illuminate\Database\Events\QueryExecuted; diff --git a/src/Factory/Factory.php b/src/Factory/Factory.php index 7e19f2a..e461cfc 100644 --- a/src/Factory/Factory.php +++ b/src/Factory/Factory.php @@ -22,6 +22,7 @@ public function modelName(): string return str_replace('\\Factory\\', '\\Model\\', $name); }; + /** @psalm-suppress RedundantPropertyInitializationCheck the model is incorrectly typed as not being able to be null */ return $this->model ?? $resolver($this); } } diff --git a/tests/Maker/MakerTestTrait.php b/tests/Maker/MakerTestTrait.php index 48299e7..c6e9b7a 100644 --- a/tests/Maker/MakerTestTrait.php +++ b/tests/Maker/MakerTestTrait.php @@ -20,7 +20,12 @@ private function callGenerate(array $input) $app = new Application(); $app->setAutoExit(false); $app->add( - (new MakerCommand($this->maker, \Mockery::spy(FileManager::class), $this->generator ?? \Mockery::spy(Generator::class), class_exists(TemplateLinter::class) ? new TemplateLinter() : null)) + (new MakerCommand( + $this->maker, + $fileManager = \Mockery::spy(FileManager::class), + $this->generator ?? \Mockery::spy(Generator::class), + new TemplateLinter(method_exists(Generator::class, 'generateClassFromClassData') ? $fileManager : null) + )) ->setName($this->maker->getCommandName()) );