{"id":21599182,"url":"https://github.com/gridonic/databaseutilsserviceprovider","last_synced_at":"2025-10-28T05:11:15.312Z","repository":{"id":20118220,"uuid":"23388047","full_name":"gridonic/DatabaseUtilsServiceProvider","owner":"gridonic","description":"ServiceProvider for Silex/Symfony","archived":false,"fork":false,"pushed_at":"2015-02-20T10:19:19.000Z","size":292,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-25T11:49:45.459Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gridonic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-27T12:01:35.000Z","updated_at":"2015-02-20T10:19:19.000Z","dependencies_parsed_at":"2022-08-31T06:10:50.770Z","dependency_job_id":null,"html_url":"https://github.com/gridonic/DatabaseUtilsServiceProvider","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/gridonic/DatabaseUtilsServiceProvider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gridonic%2FDatabaseUtilsServiceProvider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gridonic%2FDatabaseUtilsServiceProvider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gridonic%2FDatabaseUtilsServiceProvider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gridonic%2FDatabaseUtilsServiceProvider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gridonic","download_url":"https://codeload.github.com/gridonic/DatabaseUtilsServiceProvider/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gridonic%2FDatabaseUtilsServiceProvider/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281386746,"owners_count":26492056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T18:14:38.232Z","updated_at":"2025-10-28T05:11:15.289Z","avatar_url":"https://github.com/gridonic.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DatabaseUtilsServiceProvider\n\n[![Build Status](https://travis-ci.org/gridonic/DatabaseUtilsServiceProvider.svg?branch=master)](https://travis-ci.org/gridonic/DatabaseUtilsServiceProvider)\n\nThis is a simple collection of utilities for your database for Silex and Doctrine DBAL.\n\n\n## Install\n\nAs usual, just include `gridonic/database-utils-service-provider` in your `composer.json` , and register the service.\n\n```php\n$app-\u003eregister(new \\Gridonic\\Provider\\DatabaseUtilsServiceProvider(), array(\n    'database_utils.fixtures'       =\u003e PATH_RESOURCES . '/fixtures/*.yml',\n    'database_utils.password_keys'  =\u003e array('password'),\n    'database_utils.security.salt'  =\u003e 'abcd',\n));\n```\n\n### Parameters\n\nAn overview of the possible parameters\n\n#### `database_utils.fixtures`\n*required for fixtures*\nAll your fixtures-files.\n\n#### `database_utils.password_keys`\n*optional* An array of keys of table-columns, in which you are saving passwords. The values will be automatically encoded before insert.\n\n#### `database_utils.security.salt`\n*required for `database_utils.password_keys`* To encode the passwords, we use this salt.\n\n## Commands\nWhen you have registered the [ConsoleServiceProvider](https://github.com/gridonic/ConsoleServiceProvider) correct, you can use the following commands in your console.\n\n### `database:drop`\nClears your database\n\n### `database:reset`\nResets your database. Means:\n* Drops your database\n* Migrates the database (uses [MigrationServiceProvider](https://github.com/gridonic/MigrationServiceProvider))\n* Loads example-data into your database\n\n### `database:fixtures:load`\nLoads example-data from your fixtures-files into the database.\n\nwhen 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.\nAll the passwords will be encoded by the `Silex\\Provider\\SecurityProvider`. You have to register the SecurityProvider before you can use this function.\n\n#### Example 01_test.yml\n```\ntest:\n    -\n        id: 1\n        created: 1000000000\n        username: abc\n        email: abc@abc.com\n        password: 1234\n    -\n        id: 2\n        created: 1000000001\n        username: def\n        email: def@abc.com\n        password: 1234\n```\n#### Example to register the SecurityProvider\n```php\n$app-\u003eregister(new Silex\\Provider\\SecurityServiceProvider(), array(\n    'security.firewalls' =\u003e array(\n        'private' =\u003e array(\n            'pattern' =\u003e '^/admin',\n            'http' =\u003e true,\n            'users' =\u003e array(\n                'admin' =\u003e array('ROLE_ADMIN', 'ASv5vPSea0zB3EIpIB/mLOFAxkMIfh1EkTozyenPTZa0mGAiTC3n+mCAEdcYiITruuPaFb6GWFDiyF5fvJtqOg=='),\n            ),\n        ),\n    ),\n));\n```\n\n\n## Licence\nThe DatabaseUtilsServiceProvider is licensed under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgridonic%2Fdatabaseutilsserviceprovider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgridonic%2Fdatabaseutilsserviceprovider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgridonic%2Fdatabaseutilsserviceprovider/lists"}