-
Notifications
You must be signed in to change notification settings - Fork 0
/
castor.php
37 lines (31 loc) · 1.36 KB
/
castor.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
use Castor\Attribute\AsTask;
use function Castor\import;
use function Castor\io;
import(__DIR__ . '/.castor/server.php');
import(__DIR__ . '/.castor/symfony.php');
import(__DIR__ . '/.castor/database.php');
import(__DIR__ . '/.castor/docker.php');
#[AsTask(description: 'Getting Started to begin with commands', aliases: ['started'])]
function gettingStarted(): void {
io()->title('Getting started for Biblios');
io()->text('It\'s a project to learn Symfony 7 from by <href=https://formation.yoandev.co/view/courses/decouvrez-symfony-7-en-7-projets>YoanDev</>.');
io()->text('To start this project, follow these steps.');
io()->section('Server');
io()->text('You can start the server with this command :');
io()->newLine();
io()->text('$ castor start');
io()->newLine();
io()->info('This command start the web server, up all services from docker compose, create tables and fill databases.');
io()->note('If you have a existing database, you could drop the database with the "castor database:drop" command.');
io()->newLine();
io()->text('To stop the server, you can use this command :');
io()->newLine();
io()->text('$ castor stop');
io()->newLine(2);
io()->section('Help');
io()->text('Run the following command to know other commands :');
io()->newLine();
io()->text('$ castor');
io()->newLine();
}