PHPackages                             glavweb/silex-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. glavweb/silex-standard

ActiveProject[Framework](/categories/framework)

glavweb/silex-standard
======================

The "Silex Standard Edition".

v0.1.0(9y ago)020MITCSS

Since Feb 26Pushed 9y ago1 watchersCompare

[ Source](https://github.com/glavweb/silex-standard)[ Packagist](https://packagist.org/packages/glavweb/silex-standard)[ RSS](/packages/glavweb-silex-standard/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (9)Versions (2)Used By (0)

Silex Standard Edition
======================

[](#silex-standard-edition)

This is set of gulp tasks and watchers for converting PSD to HTML using Twig template engine (based on Silex Framework).

Goal:
-----

[](#goal)

The main goal of this build is creating the fastest HTML integration with Symfony. Decrease time for replacing and editing templates by means of using Symfony methodology, Twig template engine and gorgeous Gulp bundler.

Installation
------------

[](#installation)

1. Creating a Silex Application

You can use `Composer` to ease the creation of a new project:

```
$ composer create-project glavweb/silex-standard path/to/install "~0.1"
```

Composer will create a new Silex project under the `path/to/install` directory.

2. Configure the project

You need create `parameter.php` file. For this you can clone `parameter.php.dist` file to `parameter.php` and change parameter `host_url` to your site host:

```
$parameters['host_url'] = 'http://YOUR_SITE_HOST.com';
```

3. Install node modules:

```
npm install
```

4. Install bower

If bower not installed previously, run command:

```
npm install -g bower
```

Install dependent libraries:

```
bower install
```

5. Install Gulp

If Gulp not installed previously, run command:

```
npm install -g gulp
```

6. Run Gulp

run command:

```
gulp
```

Project structure:
------------------

[](#project-structure)

There are three main directories: `web`, `app` and `src`. Description of each one is below

Web:
----

[](#web)

Web folder contains all project static files and entrypoints for the project:

- `web\app.php` - production entrypoint for the project;
- `web\app_dev.php` - developer entrypoint for the project;
- `web\components` - bower components;
- `web\css` - css files;
- `web\js` - js files;
- `web\images|web\videos` - all video and images assets;
- `web\fonts` - all fonts;
- `web\plugins` - all custom vendors;
- `web\static\*.html` - html compiled files.

App:
----

[](#app)

Markup folder contains configuration and templates:

- `app\Application.php` - front controller for the project;
- `app\config\config.php` – main configuration for the project;
- `app\config\config_dev.php` – developer configuration for the project;
- `app\config\config_prod.php` – production configuration for the project;
- `app\config\parameter.php.dist` – dummy parameters (need only for copy);
- `app\config\parameter.php` – parameters for the project;
- `app\Resources\fixtures` – keeps fixture files;
- `app\Resources\less` - keeps less resources;
- `app\Resources\views` - keeps templates files;

Src:
----

[](#src)

The src folder contains scripts for extend logic the project.

- `src\Controller` - keep controller files (configurations for views).
- `src\Twig` - keep the Twig Extension file for extend template`s logic.

Is uses popular programming pattern - [Model-View-Controller](https://ru.wikipedia.org/wiki/Model-View-Controller).

---

Fixtures - contains dummy for project's instances.

For example: Menu instance looks like:

```
$fixture['menu'] = [
    'class' => [
        'fields' => [
            ['name' => 'name', 'type' => 'string'],
            ['name' => 'link', 'type' => 'string'],
        ]
    ],
    'instances' => [
        [
            'name' => 'Main',
            'link' =>  '#home'
        ],
        ...
    ]
];
```

---

Views - contains html templates.

Base of html templates is [Twig](http://paularmstrong.github.io/swig/) template engine uses at Symfony by default. Full documentation is here [Twig/doc](http://paularmstrong.github.io/swig/docs/)

We create base template per each page where are header and footer as usual. We call it base.html.twig (.html postfix isn't necessary but it needs for projects, which will be integrated with Symfony). Base template is at root directory of each templates and is bone for following pages

Per common blocks which are used on several pages we create at `app/Resources/views/common` folder. Inserting of such blocks by means of `include` tag. For example:

```
{% include 'common/navbar.html.twig' %}
```

Important: folders path is determined regarding root template folder `app/Resources/views`.

```
{% include 'common/test.html.twig' %}
```

All external files includes by asset function, which generates right paths to resources

```

```

---

Controllers - contains configuration for templates.

For example Person action in Default controller:

```
/**
 * Person show page
 */
$controllers->get('/person', function (Application $app) {
    return $app['twig']->render('pages/person.html.twig', [
        'name' => 'John Doe',
        'phone' => '+7 123 123 1234'
    ]);
})->bind('person_show');
```

`'/person'` - define URL for page. `'person_show'` - method "bind" allow get page url by action name. For example:

```
Person show page
```

`'pages/person.html.twig'` - here define path to twig template.

Also you can pass some variables for your twig template:

```
'name' => 'John Doe',
'phone' => '+7 123 123 1234'
```

Gulp:
-----

[](#gulp)

Gulp contains all bundlers tasks and watchers. All tasks are easy to understand:

- `css` - all task for compiling CSS;
- `html` - all task for compiling HTML templates;
- `generator` - all task for generating code;
- `images` - all task for compiling images;
- `js` - all task for compiling javascript ;
- `serve` - all task for compiling for developing mode.

Generate static HTML pages:
---------------------------

[](#generate-static-html-pages)

You can generate static HTML pages, for this you need run command:

```
php bin/console generate:static-pages
```

will be generated pages in folder `web/static`.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

3362d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/323641293a1149ed44abfdf39f33c2d931f6cf8fda5bf2f269a2c80c3afe9c69?d=identicon)[nilov](/maintainers/nilov)

---

Top Contributors

[![nilov](https://avatars.githubusercontent.com/u/1862113?v=4)](https://github.com/nilov "nilov (2 commits)")

### Embed Badge

![Health badge](/badges/glavweb-silex-standard/health.svg)

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

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

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

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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