PHPackages                             gridonic/database-utils-service-provider - 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. [Database &amp; ORM](/categories/database)
4. /
5. gridonic/database-utils-service-provider

ActiveLibrary[Database &amp; ORM](/categories/database)

gridonic/database-utils-service-provider
========================================

Database utilities service provider for Silex. Includes some database commands and adds fixtures for your database.

1.0.9(11y ago)1145MITPHP

Since Aug 27Pushed 11y ago11 watchersCompare

[ Source](https://github.com/gridonic/DatabaseUtilsServiceProvider)[ Packagist](https://packagist.org/packages/gridonic/database-utils-service-provider)[ Docs](http://gridonic.ch)[ RSS](/packages/gridonic-database-utils-service-provider/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (13)Used By (0)

DatabaseUtilsServiceProvider
============================

[](#databaseutilsserviceprovider)

[![Build Status](https://camo.githubusercontent.com/444b0c6d0b86903551f70b9a00663acdc0480f8dc37b38e444366594d5dfdfe3/68747470733a2f2f7472617669732d63692e6f72672f677269646f6e69632f44617461626173655574696c735365727669636550726f76696465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/gridonic/DatabaseUtilsServiceProvider)

This is a simple collection of utilities for your database for Silex and Doctrine DBAL.

Install
-------

[](#install)

As usual, just include `gridonic/database-utils-service-provider` in your `composer.json` , and register the service.

```
$app->register(new \Gridonic\Provider\DatabaseUtilsServiceProvider(), array(
    'database_utils.fixtures'       => PATH_RESOURCES . '/fixtures/*.yml',
    'database_utils.password_keys'  => array('password'),
    'database_utils.security.salt'  => 'abcd',
));
```

### Parameters

[](#parameters)

An overview of the possible parameters

#### `database_utils.fixtures`

[](#database_utilsfixtures)

*required for fixtures*All your fixtures-files.

#### `database_utils.password_keys`

[](#database_utilspassword_keys)

*optional* An array of keys of table-columns, in which you are saving passwords. The values will be automatically encoded before insert.

#### `database_utils.security.salt`

[](#database_utilssecuritysalt)

*required for `database_utils.password_keys`* To encode the passwords, we use this salt.

Commands
--------

[](#commands)

When you have registered the [ConsoleServiceProvider](https://github.com/gridonic/ConsoleServiceProvider) correct, you can use the following commands in your console.

### `database:drop`

[](#databasedrop)

Clears your database

### `database:reset`

[](#databasereset)

Resets your database. Means:

- Drops your database
- Migrates the database (uses [MigrationServiceProvider](https://github.com/gridonic/MigrationServiceProvider))
- Loads example-data into your database

### `database:fixtures:load`

[](#databasefixturesload)

Loads example-data from your fixtures-files into the database.

when you set the password\_keys and the salt, all the values for the password\_keys (p.E. `1234` as `password`) will be encoded before insert. All the passwords will be encoded by the `Silex\Provider\SecurityProvider`. You have to register the SecurityProvider before you can use this function.

#### Example 01\_test.yml

[](#example-01_testyml)

```
test:
    -
        id: 1
        created: 1000000000
        username: abc
        email: abc@abc.com
        password: 1234
    -
        id: 2
        created: 1000000001
        username: def
        email: def@abc.com
        password: 1234

```

#### Example to register the SecurityProvider

[](#example-to-register-the-securityprovider)

```
$app->register(new Silex\Provider\SecurityServiceProvider(), array(
    'security.firewalls' => array(
        'private' => array(
            'pattern' => '^/admin',
            'http' => true,
            'users' => array(
                'admin' => array('ROLE_ADMIN', 'ASv5vPSea0zB3EIpIB/mLOFAxkMIfh1EkTozyenPTZa0mGAiTC3n+mCAEdcYiITruuPaFb6GWFDiyF5fvJtqOg=='),
            ),
        ),
    ),
));
```

Licence
-------

[](#licence)

The DatabaseUtilsServiceProvider is licensed under the [MIT license](LICENSE).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~17 days

Recently: every ~30 days

Total

11

Last Release

4105d ago

Major Versions

v0.1.0 → 1.0.02014-08-28

### Community

Maintainers

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

---

Top Contributors

[![dschenk](https://avatars.githubusercontent.com/u/706527?v=4)](https://github.com/dschenk "dschenk (2 commits)")[![btemperli](https://avatars.githubusercontent.com/u/3005632?v=4)](https://github.com/btemperli "btemperli (1 commits)")

---

Tags

databasedoctrineservicesilex

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gridonic-database-utils-service-provider/health.svg)

```
[![Health](https://phpackages.com/badges/gridonic-database-utils-service-provider/health.svg)](https://phpackages.com/packages/gridonic-database-utils-service-provider)
```

###  Alternatives

[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58523.9M36](/packages/scienta-doctrine-json-functions)

PHPackages © 2026

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