Skip to content

Commit a46e7b7

Browse files
authored
Allow manual test workflow triggers (#144)
2 parents 442a725 + 3024944 commit a46e7b7

File tree

6 files changed

+14
-13
lines changed

6 files changed

+14
-13
lines changed

.github/workflows/app.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: [2.x]
66
schedule:
77
- cron: '4 3 1 * *'
8+
workflow_dispatch: {}
89

910
jobs:
1011
build:

.github/workflows/tests.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
branches: [2.x, 1.x]
88
schedule:
99
- cron: '3 2 1 * *'
10+
workflow_dispatch: {}
1011

1112
env:
1213
SYMFONY_DEPRECATIONS_HELPER: "max[direct]=0"
@@ -33,7 +34,7 @@ jobs:
3334
experimental: false
3435
composer: v2
3536

36-
- deps: 'dev'
37+
- deps: 'stable'
3738
php: '8.3'
3839
symfony: '7.x'
3940
laravel: '11.x'
@@ -43,7 +44,7 @@ jobs:
4344
- deps: 'dev'
4445
php: '8.4'
4546
symfony: '7.x'
46-
laravel: '11.x'
47+
laravel: '12.x'
4748
experimental: true
4849
composer: preview
4950

@@ -84,14 +85,6 @@ jobs:
8485
echo "LARAVEL_REQUIRE=$(echo '${{ matrix.laravel }}' | tr x \\*)" >> $GITHUB_ENV
8586
fi
8687
87-
#if [ "${{ matrix.symfony }}" = "7.x" ]; then
88-
# # Psalm Symfony Plugin doesn't support Symfony 7 yet
89-
# composer remove --no-update --dev vimeo/psalm psalm/plugin-symfony
90-
91-
# # Carbon needs version 3
92-
# composer require --no-update nesbot/carbon:"3.x-dev as 2.99.0"
93-
#fi
94-
9588
echo "PHP_VERSION=${{ matrix.php }}" >> $GITHUB_ENV
9689
9790
- name: Cache dependencies

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010
"illuminate/database": "^9.0 || ^10.0 || ^11.0",
1111
"illuminate/events": "^9.0 || ^10.0 || ^11.0",
1212
"illuminate/console": "^9.39 || ^10.0 || ^11.0",
13+
"laravel/serializable-closure": "^1.0",
1314
"symfony/framework-bundle": "^6.0 || ^7.0",
1415
"symfony/dependency-injection": "^6.0 || ^7.0",
1516
"jdorn/sql-formatter": "^1.2.17"
1617
},
1718
"require-dev": {
1819
"doctrine/annotations": "1.*",
19-
"symfony/maker-bundle": "^1.44",
20+
"symfony/maker-bundle": "^1.49",
2021
"mockery/mockery": "^1.6",
2122
"symfony/console": "^6.0 || ^7.0",
2223
"symfony/event-dispatcher": "^6.0 || ^7.0",

src/DependencyInjection/WouterJEloquentExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
1515
use Symfony\Component\DependencyInjection\ContainerBuilder;
1616
use Symfony\Component\Config\FileLocator;
17-
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
17+
use Symfony\Component\DependencyInjection\Extension\Extension;
1818
use Symfony\Component\DependencyInjection\Loader;
1919
use Symfony\Component\DependencyInjection\Reference;
2020
use Illuminate\Database\Events\QueryExecuted;

src/Factory/Factory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public function modelName(): string
2222
return str_replace('\\Factory\\', '\\Model\\', $name);
2323
};
2424

25+
/** @psalm-suppress RedundantPropertyInitializationCheck the model is incorrectly typed as not being able to be null */
2526
return $this->model ?? $resolver($this);
2627
}
2728
}

tests/Maker/MakerTestTrait.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ private function callGenerate(array $input)
2020
$app = new Application();
2121
$app->setAutoExit(false);
2222
$app->add(
23-
(new MakerCommand($this->maker, \Mockery::spy(FileManager::class), $this->generator ?? \Mockery::spy(Generator::class), class_exists(TemplateLinter::class) ? new TemplateLinter() : null))
23+
(new MakerCommand(
24+
$this->maker,
25+
$fileManager = \Mockery::spy(FileManager::class),
26+
$this->generator ?? \Mockery::spy(Generator::class),
27+
new TemplateLinter(method_exists(Generator::class, 'generateClassFromClassData') ? $fileManager : null)
28+
))
2429
->setName($this->maker->getCommandName())
2530
);
2631

0 commit comments

Comments
 (0)