PHPackages                             jguyomard/silex-eloquent-boilerplate - 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. jguyomard/silex-eloquent-boilerplate

ActiveLibrary

jguyomard/silex-eloquent-boilerplate
====================================

A Boilerplate for Silex 2 using Eloquent ORM

049PHP

Since Apr 17Pushed 10y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (2)Used By (0)

Silex 2 with Eloquent - Boilerplate
===================================

[](#silex-2-with-eloquent---boilerplate)

This boilerplate is a fully functional [Silex](http://silex.sensiolabs.org/) Application. You can use it for your new applications.

This boilerplate is configured with Eloquent ORM Service Provider (instead of Doctrine, for instance) and Twig. It also comes with Gulp to build js/sass files (but you can find a version without gulp on [`master/no-npm`](https://github.com/jguyomard/silex-eloquent-boilerplate/tree/master/no-npm) branch if you prefer).

**Note:** I only make this boilerplate for my quick and fun projects. It's configured with Silex 2.0@**dev**. Use it at your own risk.

Code Organization
-----------------

[](#code-organization)

I like organizing my app in terms of features. For instance, all Controllers/Repositories/Entities/Tests/Views and CSS/JS related to the "Blog" module can be found in `./src/Blog` directory tree.

Config is in `./config` directory.

Creating a new Silex Application
--------------------------------

[](#creating-a-new-silex-application)

```
composer create-project jguyomard/silex-eloquent-boilerplate ./myapp 2.0.x-dev
cd ./myapp

```

Running
-------

[](#running)

Create a sql database, import `boilerplate.sql` and update `./config/dev.config.php` width information required to connect to the database. With mysql:

```
mysql -u ... < boilerplate.sql
vi ./config/dev.config.php

```

To build js/sass files:

```
npm install
gulp build

```

To run this app with PHP built-in web server:

```
APP_ENV=dev php -S localhost:8080 -t web/ web/index.php

```

About this boilerplate
----------------------

[](#about-this-boilerplate)

This Silex Boilerplate is configured with:

### Service Providers

[](#service-providers)

- [CapsuleServiceProvider](http://github.com/jguyomard/silex-capsule-eloquent/) (~2.0@dev)
- [TwigServiceProvider](http://silex.sensiolabs.org/doc/providers/twig.html)
- [UrlGeneratorServiceProvider](http://silex.sensiolabs.org/doc/providers/url_generator.html)
- [ServiceControllerServiceProvider](http://silex.sensiolabs.org/doc/providers/service_controller.html)
- [HttpFragmentServiceProvider](http://silex.sensiolabs.org/doc/providers/http_fragment.html)
- [WebProfilerServiceProvider](https://github.com/silexphp/Silex-WebProfiler) (~2.0@dev)
- [DebugServiceProvider](https://github.com/jeromemacias/Silex-Debug) (~2.0@dev)
- [MonologServiceProvider](http://silex.sensiolabs.org/doc/providers/monolog.html)

### Front-End

[](#front-end)

This *Gulp version* is also configured with :

- [gulp](https://www.npmjs.com/package/gulp)
- [gulp-sass](https://www.npmjs.com/package/gulp-sass)
- [gulp-concat](https://www.npmjs.com/package/gulp-concat)
- [gulp-uglify](https://www.npmjs.com/package/gulp-uglify)
- [gulp-sourcemaps](https://www.npmjs.com/package/gulp-sourcemaps)
- [browser-sync](https://www.npmjs.com/package/browser-sync)

You can run :

```
gulp build                  // to build js/sass files with sourcemaps
gulp build --production     // to build js/sass files
gulp watch                  // to watch for files changes

```

Testing
-------

[](#testing)

To run the test suite, you need [PHPUnit](https://phpunit.de/):

```
phpunit

```

Issues
------

[](#issues)

If you have any problems with or questions about this boilerplate, please contact me through a [GitHub issue](https://github.com/jguyomard/silex-eloquent-boilerplate/issues). If the issue is related to Silex itself, or any configured packages, please leave an issue on their official repository.

Contributing
------------

[](#contributing)

You are invited to contribute new features, fixes or updates to this container, through a [Github Pull Request](https://github.com/jguyomard/silex-eloquent-boilerplate/pulls).

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7612837c40337d156f9db085938551c8f23d7151219887052a83cfcf13190677?d=identicon)[jguyomard](/maintainers/jguyomard)

---

Top Contributors

[![jguyomard](https://avatars.githubusercontent.com/u/1242207?v=4)](https://github.com/jguyomard "jguyomard (12 commits)")

### Embed Badge

![Health badge](/badges/jguyomard-silex-eloquent-boilerplate/health.svg)

```
[![Health](https://phpackages.com/badges/jguyomard-silex-eloquent-boilerplate/health.svg)](https://phpackages.com/packages/jguyomard-silex-eloquent-boilerplate)
```

PHPackages © 2026

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