Skip to content

telabotanica/obs-saisons.fr

Repository files navigation

obs-saisons.fr

Install

Clone the repository, install composer then run:

composer install

Copy .env to .env.local and change the settings, particulary:

  • APP_ENV
  • DATABASE_URL

If necessary, create the DB:

php bin/console doctrine:database:create

Create the tables:

php bin/console doctrine:migrations:migrate

Migrate all static data :

php bin/console odsstaticdata:migrate

Or for dev env:

php bin/console doctrine:schema:create
php bin/console doctrine:fixtures:load

Run Static Data Table Set Commands

Set All

(See Migrate all static data above)

php bin/console ods:bootstrap:all-static-data

Set Each

To set each table apart, make sure previous table is already set :

1 TypeSpecies

php bin/console ods:import:typespecies

2 Species

php bin/console ods:import:species

3 Events

php bin/console ods:import:events

4 EventSpecies

  • set event and species
php bin/console ods:generate:eventspecies
  • set events periods and aberration alert periods
php bin/console ods:import:periods

periods:import Choice Question :
Please select periods types (s : stages periods, a : observations alerts periods, b : both / default to b : both)
both (default): enter b or hit enter
stages periods : enter s
aberration alert periods : enter a

Build css/js

yarn
yarn build

Normalize code

Run PHP-CS-Fixer:

cp .php_cs.dist .php_cs
php vendor/bin/php-cs-fixer fix --diff --dry-run

Dev server

Install symfony binary, check its doc and run:

symfony server:start

Or run integrated PHP dev server:

php -S localhost:8042 -t public/