Skip to content

Commit de2d298

Browse files
authored
fix: ensure template files have a tpl file extension (#6826) (#6829)
1 parent 5c7e0d2 commit de2d298

File tree

10 files changed

+6
-6
lines changed

10 files changed

+6
-6
lines changed

docs/pdg.config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pdg:
55
src: './guides'
66
references:
77
base_url: '/docs/reference'
8-
exclude: ['*Factory.php', '*.tpl.php', 'deprecation.php']
8+
exclude: ['*Factory.php', '*.php.tpl', 'deprecation.php']
99
exclude_path: ['OpenApi/Tests', 'JsonSchema/Tests', 'RamseyUuid/Tests', 'Metadata/Tests', 'HttpCache/Tests', 'Elasticsearch/Tests', 'Doctrine/Common/Tests', 'GraphQl/Tests', 'Serializer/Tests']
1010
namespace: 'ApiPlatform'
1111
output: 'dist/reference'

src/Laravel/Console/Maker/Utils/StateTemplateGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ public function generate(string $pathLink, string $stateClassName, StateTypeEnum
4949
private function loadTemplate(StateTypeEnum $stateTypeEnum): string
5050
{
5151
$templateFile = match ($stateTypeEnum) {
52-
StateTypeEnum::Provider => 'StateProvider.tpl.php',
53-
StateTypeEnum::Processor => 'StateProcessor.tpl.php',
52+
StateTypeEnum::Provider => 'StateProvider.php.tpl',
53+
StateTypeEnum::Processor => 'StateProcessor.php.tpl',
5454
};
5555

5656
$templatePath = \dirname(__DIR__).'/Resources/skeleton/'.$templateFile;

src/Laravel/Tests/Console/Maker/Utils/AppServiceFileGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __construct(private Filesystem $filesystem)
2727
*/
2828
public function regenerateProviderFile(): void
2929
{
30-
$templatePath = \dirname(__DIR__).'/Resources/skeleton/AppServiceProvider.tpl.php';
30+
$templatePath = \dirname(__DIR__).'/Resources/skeleton/AppServiceProvider.php.tpl';
3131
$targetPath = base_path('app/Providers/AppServiceProvider.php');
3232

3333
$this->regenerateFileFromTemplate($templatePath, $targetPath);

src/Symfony/Maker/MakeStateProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
6969

7070
$generator->generateClass(
7171
$stateProcessorClassNameDetails->getFullName(),
72-
__DIR__.'/Resources/skeleton/StateProcessor.tpl.php'
72+
__DIR__.'/Resources/skeleton/StateProcessor.php.tpl'
7373
);
7474
$generator->writeChanges();
7575

src/Symfony/Maker/MakeStateProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
6969

7070
$generator->generateClass(
7171
$stateProviderClassNameDetails->getFullName(),
72-
__DIR__.'/Resources/skeleton/StateProvider.tpl.php'
72+
__DIR__.'/Resources/skeleton/StateProvider.php.tpl'
7373
);
7474
$generator->writeChanges();
7575

0 commit comments

Comments
 (0)