<commit_before># TicketparkDynamicRoleBundle

This Symfony2 bundle ads functionalities to dynamically create Symfony Security roles and persist them using Doctrine DBAL.
We use it to generate roles that can be given permissions to particular model instances. For example, an operator role for a blog post might be
```php
ROLE_POST_<public_identifier>_OPERATOR
```
it can then be given an operator ACE for that blog post instance and be given to a Group or User instance.

## Todos
* Add unit tests
* Improve documentation

## Functionalities
* RoleProvider (Service)
    * Manages dynamic Symfony Security roles
* RoleHierarchy (Service)
    * Extends Symfony\Component\Security\Core\Role\RoleHierarchy
    * Fetches role descriptions from a configurable Doctrine DBAL table and merges them with the roles defined in the Symfony config

## Installation

Add TicketparkDynamicRoleBundle in your composer.json:

```js
{
    "require": {
        "ticketpark/dynamic-role-bundle": "dev-master"
    }
}
```

Now tell composer to download the bundle by running the command:

``` bash
$ php composer.phar update ticketpark/dynamic-role-bundle
```

Enable the bundle in the kernel:

``` php
<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Ticketpark\DynamicRoleBundle\TicketparkDynamicRoleBundle(),
    );
}
```

## Caching
To enable HierarchyRole map caching override `ticketpark.dynamic_role_cache` service.

For example:

```
    ticketpark.dynamic_role_cache:
        class: Doctrine\Common\Cache\FilesystemCache
        public: false
        arguments:
            - "%kernel.cache_dir%/dynamic_role"
```

## License


This bundle is under the MIT license. See the complete license in the bundle:

    Resources/meta/LICENSE<commit_msg>Update README to abandon bundle<commit_after># TicketparkDynamicRoleBundle

This bundle is now abandoned and will longer receive updates.
{'fraction_non_alphanumeric': 0.07493540051679587, 'fraction_numerical': 0.0005167958656330749, 'mean_word_length': 4.002583979328166, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1705404', 'n_tokens_mistral': 543, 'n_tokens_neox': 519, 'n_words': 198}