Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suggestion - removing unneeded env option #16

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cron/DumpFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ private function render(): string
'user' => $this->configuration->getUser(),
'absolute_path' => $this->configuration->getAbsolutePath(),
'php_version' => $this->configuration->getPhpVersion(),
'env' => $this->env,
'mailto' => $this->configuration->getMailto(),
]);
}
Expand Down
2 changes: 1 addition & 1 deletion Resources/views/template.txt.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ MAILTO="{{ mailto }}"
{% for cron in crons %}
# {{ cron.name }}

{{ cron.expression }} {{ user }} {{ php_version }} {{ absolute_path }} {{ cron.command }} --env={{ env }}
{{ cron.expression }} {{ user }} {{ php_version }} {{ absolute_path }} {{ cron.command }}

{% endfor %}
4 changes: 2 additions & 2 deletions Tests/Functional/Command/GenerateCronFileCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function testGenerateFullConfiguration()

$this->assertSame(0, $tester->execute(['env-mode' => 'staging']));

$expected = '* * * * * project_staging php7.3 path/to/staging app:test --env=staging';
$expected = '* * * * * project_staging php7.3 path/to/staging app:test';

$cacheDir = $kernel->getContainer()->getParameter('kernel.cache_dir').'/cron_test';

Expand Down Expand Up @@ -52,7 +52,7 @@ public function testDryRun()
$this->assertStringContainsString('[OK] Dry run generated', $tester->getDisplay());
$this->assertStringContainsString('# send email', $tester->getDisplay());
$this->assertStringContainsString(
'* * * * * project_staging php7.3 path/to/staging app:test --env=staging',
'* * * * * project_staging php7.3 path/to/staging app:test',
$tester->getDisplay()
);
}
Expand Down