PHPackages                             lin3s/symfony-standard - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. lin3s/symfony-standard

ActiveProject[Framework](/categories/framework)

lin3s/symfony-standard
======================

The "Symfony Standard Edition" distribution in the LIN3S way

v0.6.3(9y ago)14722MITPHPPHP &gt;=5.4

Since Sep 9Pushed 9y ago4 watchersCompare

[ Source](https://github.com/LIN3S/SymfonyStandard)[ Packagist](https://packagist.org/packages/lin3s/symfony-standard)[ RSS](/packages/lin3s-symfony-standard/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (28)Versions (23)Used By (0)

Symfony Standard
================

[](#symfony-standard)

> The "Symfony Standard" distribution in the LIN3S way.

[![SensioLabsInsight](https://camo.githubusercontent.com/0c86c1c59a5b93a77536adee02c99e7f9615ed50c0c9971340530b2e7b83d0f1/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f30306336376161652d336635322d343139622d393364662d3735313035303239396463622f6d696e692e706e67)](https://insight.sensiolabs.com/projects/00c67aae-3f52-419b-93df-751050299dcb)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/d310c738cdfd7e166c6ce9d43d4854667efa148a577244bdf891585d7b5c793c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4c494e33532f53796d666f6e795374616e646172642f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/LIN3S/SymfonyStandard/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/2aa775de027ae8d88d64783c296814b9eb3c7936213a2345e62378848b13095d/68747470733a2f2f706f7365722e707567782e6f72672f6c696e33732f73796d666f6e792d7374616e646172642f646f776e6c6f616473)](https://packagist.org/packages/lin3s/symfony-standard) [![Latest Stable Version](https://camo.githubusercontent.com/b65ae88e332f0b8bd7f648098a11ed0121797c365168aca6b3005aa3a44d7ded/68747470733a2f2f706f7365722e707567782e6f72672f6c696e33732f73796d666f6e792d7374616e646172642f762f737461626c652e737667)](https://packagist.org/packages/lin3s/symfony-standard)[![Latest Unstable Version](https://camo.githubusercontent.com/b4d476627fba7cb9cf9a2577c943feabf1f8726d80db522e66a1e2304c88074f/68747470733a2f2f706f7365722e707567782e6f72672f6c696e33732f73796d666f6e792d7374616e646172642f762f756e737461626c652e737667)](https://packagist.org/packages/lin3s/symfony-standard)

Why?
----

[](#why)

[**Symfony**](http://symfony.com/) is a set of reusable PHP components and a PHP framework for web projects. In [*LIN3S*](http://www.lin3s.com/) we implement this solution providing some useful features that the standard edition of Symfony doesn't come with:

1. [SonataAdminBundle](https://sonata-project.org/bundles/admin)
2. [SonataUserBundle](https://sonata-project.org/bundles/user)

- Dependencies not included in this file.

3. [Doctrine Migrations](http://symfony.com/doc/current/bundles/DoctrineMigrationsBundle/index.html)
4. [LiipImagineBundle](https://github.com/liip/LiipImagineBundle)
5. [StofDoctrineExtensions](https://github.com/stof/StofDoctrineExtensionsBundle/blob/master/Resources/doc/index.rst)
6. Front-end workflow

- [Sass](http://sass-lang.com/)
- [Npm](https://www.npmjs.com/)
- [Gulp.js](http://gulpjs.com/)

6. [Capistrano](http://capistranorb.com/) deploy
7. A complete base.html.twig based on [HTML5 Boilerplate](https://html5boilerplate.com/)
8. As dev dependency, [Doctrine Fixtures](http://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html)
9. [Coding standards library](https://github.com/LIN3S/CS) made by LIN3S

Prerequisites
-------------

[](#prerequisites)

The above sounds great so, now, to start developing with our Symfony Standard, you need to meet the following requirements:

1. [PHP](http://php.net) 5.4 or higher
2. [MySQL](http://dev.mysql.com/downloads/) or \[MongoDB\]\[178\]
3. [Composer](https://getcomposer.org/): `curl -sS https://getcomposer.org/installer | php`
4. [Ruby](https://www.ruby-lang.org/en/downloads/)

- Bundler: `gem install bundler`
- After bundler: `bundle install` (see Gemfile)

5. [Node.js](https://nodejs.org/download/) 4.0 or higher

- Gulp.js: `npm install -g gulp`
- ESLint: `npm install -g eslint`

Getting Started
---------------

[](#getting-started)

After installing all the prerequisites, to create a Symfony project based on this *Symfony Standard*, you should follow these steps.

Firstly, you need to **create the project**:

```
$ composer create-project lin3s/symfony-standard  && cd

```

> If your `app/config/parameters.yml` file was not created right after finishing the composer process, the system will ask you some questions in order to create the needed file. If you want to create it by hand, just copy the *app/config/parameters.yml.dist* file: `$ cp app/config/parameters.yml.dist app/config/parameters.yml`

> If the process fails as soon as it finishes, it's because the database is not created yet. Run `php app/console doctrine:database:create` in order to create it and then create the needed tables with `php app/console doctrine:migrations:migrate` command.

After that, *if you use a Web server*, you should visit the [Symfony permissions section](http://symfony.com/doc/2.8/book/installation.html#book-installation-permissions) of the installation documentation so your CLI user and Web server user are allowed to write **cache**, **logs** and *sessions*\* folders. You may use these commands:

```
$ rm -rf app/cache/*
$ rm -rf app/logs/*
$ rm -rf app/sessions/*

$ HTTPDUSER=`ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\  -f1`
$ sudo chmod +a "$HTTPDUSER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs app/sessions
$ sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs app/sessions

```

Also, if you are using Apache Web server, consider renaming `.htaccess.dist` files located within the `app`, `src` and `web` folders to `.htaccess` or create the proper server configuration to improve global performances.

If you are willing to use LiipImagineBundle, create the needed folder:

```
$ mkdir -p web/media/cache

```

You can modify this path editing the `cache` parameter in the `liip_imagine` section within the `app/config/config.yml`file. Also remember to give this folder the right permissions so the web server is allowed to write.

If you want to load some default users, run the following command in order to create an *admin/admin* account and 50 fake users:

```
$ php app/console doctrine:fixtures:load

```

Also, if you want to create an admin user by hand, follow these steps:

```
$ php app/console fos:user:create
$ php app/console fos:user:promote --> give the ROLE_SUPER_ADMIN permission

```

In order to use the built-in server, use the following command:

```
$ php app/console server:run

```

Access to your admin panel by going to `/admin`

A complete `app/Resources/views/base.html.twig` file is provided by default. Be sure to modify this file and override the meta blocks whenever it's needed. Commented out you can find usefull examples with the full information links and validators.

We improved the production logs managed by [*monolog*](http://symfony.com/doc/master/cookbook/logging/monolog.html). Edit `app/config/config_prod.yml` so it suits your needs.

If you are planning to add some tests, be sure to edit your composer.json `autoload` section with something like this:

```
"autoload": {
    "psr-4": { "": "src/" },
    "classmap": [ "app/AppKernel.php", "app/AppCache.php" ],
    "exclude-from-classmap": [ "/Tests/", "/test/", "/tests/" ]
},

```

Also, if your development IDE is [PhpStorm](https://www.jetbrains.com/phpstorm/), uncomment the following line in `app/config/config.yml`:

```
framework:
    ide: "phpstorm://open?file=%%f&line=%%l"

```

Front-end workflow
------------------

[](#front-end-workflow)

First of all, download all the dependencies needed for Ruby and Node.js:

```
$ bundle install
$ npm install

```

Feel free to add and/or edit the npm dependencies by editing the `package.json` file.

After this initial step, you will have the following gulp tasks available:

- `gulp sass`: compiles `app/Resources/assets/scss/app.scss` and moves the resulting file to `web/` folder.
- `gulp sass:prod`: compiles and minifies `app/Resources/assets/scss/app.scss` and moves the resulting file to `web/` folder.
- `gulp scss-lint`: it helps you to keep your SCSS files clean and readable.
- `gulp modernizr`: creates a `modernizr.js` file with the selected tests.
- `gulp js`: copies the JS files to the `web/js` folder to work in the dev environment.
- `gulp js:prod`: combines and minifies the needed JS files, including `modernizr.js`.
- `gulp sprites`: creates a SVG sprite.
- `gulp watch`: checks SCSS, JS and SVG changes to launch the corresponding task.
- `gulp default`: executes sass, js:prod, sprites and starts watching.
- `gulp prod`: executes sass:prod, modernizr, js:prod and spritest tasks.

As you see, you should create and/or edit .scss files within the `app/Resources/assets/scss/` folder. An initial structure is already given for you. You can also add/or edit .js files, but **remember** to modify `gulpfile.js``jsFiles` variable in order to add what your project needs, adding the new files to `base.html.twig` too.

Also, `livereload` is up and running when launching `gulp watch`. You should install the correct browser extension and be sure to navigate through the dev environment.

Doctrine Extensions
-------------------

[](#doctrine-extensions)

This bundle is installed by default. You just have to enable what your project needs, for example:

```
stof_doctrine_extensions:
    orm:
        default:
            sluggable: true
            timestampable: true

```

Some extensions do need an extra configuration in the `doctrine` section of the `app/config/config.yml` file. Check the full configuration [here](https://github.com/stof/StofDoctrineExtensionsBundle/blob/master/Resources/doc/index.rst#step-3-add-the-extensions-to-your-mapping).

For the other possible configurations, visit the [bundle documentation](https://github.com/stof/StofDoctrineExtensionsBundle/blob/master/Resources/doc/index.rst)

Doctrine Migrations
-------------------

[](#doctrine-migrations)

Capistrano will run the needed migrations when running a deployment. You just need to generate the correct files within the `app/migrations` folder. In order to do so, just run `php app/console doctrine:migrations:diff` and push the generated file to your SCM before runnning the deploy.

For other possible configurations, visit the [bundle documentation](http://symfony.com/doc/current/bundles/DoctrineMigrationsBundle/index.html)

Deployment
----------

[](#deployment)

To automatize the deployment process this project is using **Capistrano** with **capistrano-symfony** plugin. You can find the whole configuration within the `deploy` directory. Customize deploy tasks modifying the `deploy/deploy.rb` file.

You should update the *symfony-standard* application name for your awesome project name and the repo url with your Git project url.

Inside `deploy/stages` directory there are two files that can be considered as pre-production stage and production stage. There is no logic, these files only contain few parameters that you should customize for your proper deployment.

After all, and following the Capistrano [documentation](http://capistranorb.com/) to configure the server, you can deploy executing:

```
$ cap  deploy    #  can be dev1, prod or whatever file inside stages directory

```

> In the Capistrano shared directory you should create the `app/config/parameters.yml` file, `app/logs`, `app/sessions`and `web/uploads` folder should be created for you.

\###Clearing remote caches

When working with PHP7 &amp; Opcache, for example, you won't see all changes after deploying. Caches need to be flushed with the correct website domain. If you need this feature, just open the `deploy.rb` file and remove the commented line:

```
  #after :finishing, 'cache:clear'

```

This is done by [Smart-Core/AcceleratorCacheBundle](https://github.com/Smart-Core/AcceleratorCacheBundle). If you need different configurations for your deployment stages, feel free to create a variable and add the required parameters to the `stages/*.rb` files.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~16 days

Recently: every ~26 days

Total

22

Last Release

3553d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b54f0877b7c31df24820fc1c55bd1a4dcda487dbe8ae5b031e6bf8362fecdfe4?d=identicon)[gorkalaucirica](/maintainers/gorkalaucirica)

![](https://www.gravatar.com/avatar/06308bfc15d8774c16d36d727f852c2d29ed8d0d6153637384439747776dc658?d=identicon)[benatespina](/maintainers/benatespina)

---

Top Contributors

[![jontorrado](https://avatars.githubusercontent.com/u/6916591?v=4)](https://github.com/jontorrado "jontorrado (26 commits)")[![benatespina](https://avatars.githubusercontent.com/u/3951376?v=4)](https://github.com/benatespina "benatespina (13 commits)")[![gorkalaucirica](https://avatars.githubusercontent.com/u/1749891?v=4)](https://github.com/gorkalaucirica "gorkalaucirica (2 commits)")

---

Tags

symfonystandardlin3s

###  Code Quality

TestsBehat

### Embed Badge

![Health badge](/badges/lin3s-symfony-standard/health.svg)

```
[![Health](https://phpackages.com/badges/lin3s-symfony-standard/health.svg)](https://phpackages.com/packages/lin3s-symfony-standard)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[krzysiekpiasecki/gentelella

A Symfony skeleton application with user account functionality based on the Twitter Bootstrap and Gentelella template

991.8k](/packages/krzysiekpiasecki-gentelella)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
