Skip to content

Commit

Permalink
Remove artisan:create_key task
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Nov 26, 2024
1 parent a6ae5ec commit a3a339d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion recipe/deploy/env.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
cd('{{release_or_current_path}}');
if (test('[ ! -e .env ] && [ -f {{dotenv_example}} ]')) {
run('cp {{dotenv_example}} .env');
set('new_deployment', true);
}
});
8 changes: 0 additions & 8 deletions recipe/laravel.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,6 @@ function laravel_version_compare($version, $comparator)
desc('Sets the application key');
task('artisan:key:generate', artisan('key:generate'));

desc('Generates the application key for new deployments');
task('artisan:create_key', function () {
if (has('new_deployment')) {
invoke('artisan:key:generate');
}
})->hidden();

desc('Creates the encryption keys for API authentication');
task('artisan:passport:keys', artisan('passport:keys'));

Expand Down Expand Up @@ -282,7 +275,6 @@ function laravel_version_compare($version, $comparator)
task('deploy', [
'deploy:prepare',
'deploy:vendors',
'artisan:create_key',
'artisan:storage:link',
'artisan:config:cache',
'artisan:route:cache',
Expand Down

5 comments on commit a3a339d

@jonnott
Copy link

@jonnott jonnott commented on a3a339d Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@antonmedv Can I ask, what is the reason for removing this? Just curious, how would we now create the key for a new Laravel deployment?

@antonmedv
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a new deployment run this task: https://deployer.org/docs/7.x/recipe/laravel#artisan-key-generate

This step should be done manually, running it automatically can lead to potential problems.

@jonnott
Copy link

@jonnott jonnott commented on a3a339d Nov 27, 2024 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@antonmedv
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! True.

@jonnott
Copy link

@jonnott jonnott commented on a3a339d Nov 27, 2024 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.