orkestra-cms / setup-bundle
Bundle allowing easy setup of new Symfony projects
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 1
Type:symfony-bundle
Requires
- php: >=7.1.0
Requires (Dev)
- symfony/config: ~3.4|~4.0
- symfony/console: ~3.4|~4.0
- symfony/finder: ~3.4|~4.0
- symfony/yaml: ~3.4|~4.0
This package is not auto-updated.
Last update: 2024-12-22 05:50:16 UTC
README
Prerequisites
Make sure you install Node.js and also the Yarn package manager.
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require --dev orkestra/setup-bundle
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php
file of your project:
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { // ... if (in_array($this->getEnvironment(), array('dev'), true)) { // ... $bundles[] = new Orkestra\Bundles\SetupBundle\OrkestraSetupBundle(); } return $bundles; } // ... }
Available commands
Nanobox
$ php bin/console setup:nanobox
Creates a Nanobox environment for your project. Make sure to add
a Nanobox DNS entry as well as an evar SYMFONY_ENV
. Also, enable the bundle
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle
in your app/AppKernel.php
.
Adjust your parameters.yml
file to contain the following values:
database_host: '%env(DATA_DB_HOST)%' database_port: null database_name: gonano database_user: '%env(DATA_DB_USER)%' database_password: '%env(DATA_DB_PASS)%'
CKEditor
$ php bin/console setup:ckeditor
Installs the CKEditor bundle and a default toolbar configuration. This will also
adjust the boxfile.yml
to ensure the CKEditor assets get installed on deployment.
Make sure to import merges/ckeditor.yml
in app/config/config.yml
and enable the
bundle Ivory\CKEditorBundle\IvoryCKEditorBundle
in your app/AppKernel.php
.
After that install the CKEditor assets for your development environment:
$ php bin/console ckeditor:install web/bundles/ivoryckeditor
MailHog
$ php bin/console setup:mailhog
Installs MailHog with required configuration
files and adds a reverse proxy on your Nanobox environment so MailHog is accessible at
the URL /mailbox
(except for production).
Make sure to remove the default swiftmailer
options from config.yml
and
config_test.yml
and import merges/mailhog.yml
for every environment you wish.
Import merges/mail_prod.yml
into your config_prod.yml
. Also add the two Nanobox
evars MAIL_USER
and MAIL_PASS
so online environments require authentication to access
the mailbox.
Memcached
Configures Symfony to use memcached for session handling and Doctrine caching.
Make sure to import merges/memcached.yml
for every environment you wish to use it.
$ php bin/console setup:memcached
Namespaced sessions
$ php bin/console setup:session
Configures Symfony to use Namespaced sessions.
Make sure to import merges/session.yml
for every environment you wish to use it.
Webpack/Encore
$ php bin/console setup:webpack --bootstrap 3 # Includes Bootstrap v3 $ php bin/console setup:webpack --bootstrap 4 # Includes Bootstrap v4
Installs Webpack/Encore and a default Webpack configuration. This also includes a default set of stylesheets/scripts for Bootstrap and Font-Awesome.
Make sure to import merges/webpack.yml
in app/config/config.yml
.
During development you may run node_modules/.bin/encore dev --watch
to have
real-time compilation of your assets.