Skip to content

Commit d5020f6

Browse files
authored
refactor: Move the init file template to the res directory (#1054)
1 parent 507fa1b commit d5020f6

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

.makefile/e2e.file

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ e2e_013: $(PHP_SCOPER_PHAR_BIN)
4141

4242
$(PHP_SCOPER_PHAR_BIN) init --working-dir=build/set013 --no-interaction
4343

44-
diff src/scoper.inc.php.tpl build/set013/scoper.inc.php
44+
diff res/scoper.inc.php.tpl build/set013/scoper.inc.php
4545

4646
.PHONY: e2e_014
4747
e2e_014: # Runs end-to-end tests for the fixture set 014 — Codebase with PSR-0 autoloading

box.json.dist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"with this source code in the file LICENSE."
1313
],
1414

15-
"files": [
16-
"src/scoper.inc.php.tpl"
15+
"files-bin": [
16+
"res/scoper.inc.php.tpl",
17+
"vendor-hotfix/.gitkeep"
1718
],
18-
"files-bin": ["vendor-hotfix/.gitkeep"],
1919

2020
"git": "git_version_placeholder",
2121
"datetime": "release-date",
File renamed without changes.

src/Console/Command/InitCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
final readonly class InitCommand implements Command
3434
{
3535
private const CONFIG_FILE_OPT = 'config';
36-
private const CONFIG_FILE_TEMPLATE = __DIR__.'/../../scoper.inc.php.tpl';
36+
private const CONFIG_FILE_TEMPLATE = __DIR__.'/../../../res/scoper.inc.php.tpl';
3737
private const CONFIG_FILE_DEFAULT = 'scoper.inc.php';
3838

3939
public function __construct(

tests/Configuration/DefaultConfigurationTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
#[CoversNothing]
3131
final class DefaultConfigurationTest extends TestCase
3232
{
33+
private const TEMPLATE_PATH = __DIR__.'/../../res/scoper.inc.php.tpl';
34+
3335
private ConfigurationFactory $configurationFactory;
3436

3537
protected function setUp(): void
@@ -43,9 +45,7 @@ class_alias(Finder::class, IsolatedFinder::class);
4345

4446
public function test_the_template_file_is_in_sync_with_the_default_configuration(): void
4547
{
46-
$templateConfiguration = $this->configurationFactory->create(
47-
__DIR__.'/../../src/scoper.inc.php.tpl',
48-
);
48+
$templateConfiguration = $this->configurationFactory->create(self::TEMPLATE_PATH);
4949

5050
$defaultConfiguration = $this->configurationFactory->create();
5151

tests/TemplateFileTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#[CoversNothing]
2727
final class TemplateFileTest extends TestCase
2828
{
29-
private const TEMPLATE_PATH = __DIR__.'/../src/scoper.inc.php.tpl';
29+
private const TEMPLATE_PATH = __DIR__.'/../res/scoper.inc.php.tpl';
3030

3131
public function test_the_template_file_contains_an_entry_for_each_configuration_key(): void
3232
{

0 commit comments

Comments
 (0)