tamtam/composer-deploy

This package is abandoned and no longer maintained. No replacement package was suggested.

Scripts de deploiement via composer pour une application symfony de TamTam

1.0.24 2019-03-14 14:21 UTC

README

Common use case for deploying a symfony app

Deploy parameters

The deploy parameters scripts is used to generate the parameters.yml in symfony based on the tamtam dist structure file currently it has no parameters to set but it require the parameters.instance.yml file and at least the key instance in it

Parameter

The parameter name is instance, it must contain the instance key

instance: dev

Web folder link

This script symlinks some folder of the bundle contained in Resources folder by linking them directly inside the web folder

Parameter

The parameter name is web_folder_link, it should contain an array of path starting right after the Resource folder

web_folder_link:

  • public/font

This will link the font folder of the bundle public folder to web/font

You can specify the destination by putting a pipe and the destination path in the web folder. i.e. :

web_folder_link:

  • public/font|css/fonts would copy the folder font in public in web/css/fonts

Deploy files

This script copy the listed files from to the right place in the bundle. This script also accept directory path. If so, the full content of the directory is copied in the given destination

Parameter

The parameter name is deploy_file, it should contain an array of path. The key is the origin of the file, the value is the destination

  • Path starting with @ are located via kernel locateResource
  • Path starting with / are absolute so not mapped
  • otherwise, the app kernel directory is prepended

deploy_file:

  • { 'config/shared/translations-french.yml': '@TamTamSampleBundle/Resources/translations/messages.fr.yml' }

Doctrine

This script allow you to launch the common task on doctrine

Parameter

The parameter name is doctrine and can be ~, a boolean or an array

  • ~: Get the default configuration which is createDatabase and schemaUpdate
  • Boolean: Determines if we use doctrine scripts or not (full enablation/disablation)
  • Array: Each value of the array will be triggered, the others wil not
    • createDatabase: Create the database if not exists
    • dropSchema: Drop the schema
    • updateSchema: Update the schema
    • fixtures: Trigger the fixtures load

Merge translations

This script merge all translations by replacing all missing translations found in the referential with the corresponding translations of the fallback file

Parameter

The parameter name is merge_translations. The sub keys are:

  • directory: Mandatory, String

    It's the path were to find an replace the translations files

  • fallback: Mandatory, String or array

    Either a string for all locales or an array with locale => fallback structure (in this case the key all replace all unset locales in the array)

  • referential: Mandatory, String

    The locale were to find the referential file

  • domains: Optional, String or array

    The domain(s) to process, if not set then all domains are processed

merge_translations:

  • directory: '/src/MyBundle/Resources/translations'
  • fallback: {all: en, lu: de}
  • referential: fr
  • domains: [messages]