ang3/symfony-scripts

Symfony scripts to control app state.

Installs: 54

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:Shell

Type:binary

v1.2.0 2023-02-01 13:39 UTC

This package is auto-updated.

Last update: 2024-10-29 17:17:29 UTC


README

Latest Stable Version Latest Unstable Version Total Downloads

This package provides useful scripts to start and stop your Symfony app.

Installation

This package should be installed globally.

Open a command console, enter your project directory and execute the following command to download the latest stable version of this package:

$ composer global require ang3/symfony-scripts --dev

Finally, do not forget to add the composer bin folder to your environment variable PATH.

Usage

Scripts

At the root of your project, execute these following command as to your needs:

Reset the application

To reset application (deleting cache, logs and migrations files), you just have to pass the argument reset to the command sf_restart.sh like below:

sf_restart.sh reset

Handlers

Handlers allows you to add custom logic. The script will try to execute some files depending on its job. To add your custom shell code, create the related handler script:

  • bin/dev/handlers/sf_start.sh Executed just before starting the Web server.
  • bin/dev/handlers/sf_stop.sh Executed when Web server and Docker has been stopped.
  • bin/dev/handlers/sf_reset.sh Executed when you start with the argument reset, just after deleting cache and logs.
  • bin/dev/handlers/sf_test.sh Executed just before PHPUnit tests.