<commit_before>PhlexibleElementFinderBundle
============================

The PhlexibleElementFinderBundle adds support for a finder field in phlexible.

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

Installation is a 5 step process:

1. Download PhlexibleElementFinderBundle using composer
2. Enable the Bundle
3. Import PhlexibleElementFinderBundle routing
4. Enable puli resources
5. Update your database schema
6. Clear the symfony cache

### Step 1: Download PhlexibleElementFinderBundle using composer

Add PhlexibleElementFinderBundle by running the command:

``` bash
$ php composer.phar require phlexible/element-finder-bundle "~1.0.0"
```

Composer will install the bundle to your project's `vendor/phlexible` directory.

### Step 2: Enable the bundle

Enable the bundle in the kernel:

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

public function registerBundles()
{
    $bundles = array(
        // ...
        new Phlexible\Bundle\PhlexibleElementFinderBundle(),
    );
}
```

### Step 3: Import PhlexibleElementFinderBundle routing

Import the PhlexibleElementFinderBundle routing.

For frontend:

``` yaml
# app/config/routing.yml
phlexible_element_finder_render:
    resource: "@PhlexibleElementFinderBundle/Controller/RenderController.php"
    type:     annotation
```

For administration backend:

``` yaml
# app/config/admin_routing.yml
phlexible_element_finder_catch:
    resource: "@PhlexibleElementFinderBundle/Controller/CatchController.php"
    type:     annotation
```

### Step 4: Enable puli resources

The PhlexibleElementFinderBundle provides puli bindings for phlexible scripts, styles and icons. These need to be activated.

``` bash
$ bin/puli bind --enable d80e5f # enable binding for phlexible/scripts
$ bin/puli bind --enable 0ccc61 # enable binding for phlexible/styles
$ bin/puli bind --enable 6ce2d4 # enable binding for phlexible/icons
```

### Step 5: Update your database schema

Now that the bundle is set up, the last thing you need to do is update your database schema because the element finder includes entities that need to be installed in your database.

For ORM run the following command.

``` bash
$ php app/console doctrine:schema:update --force
```

### Step 6: Clear the symfony cache

``` bash
$ php app/console cache:clear --env=prod
```<commit_msg>add clear cache to readme<commit_after>PhlexibleElementFinderBundle
============================

The PhlexibleElementFinderBundle adds support for a finder field in phlexible.

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

Installation is a 5 step process:

1. Download PhlexibleElementFinderBundle using composer
2. Enable the Bundle
3. Import PhlexibleElementFinderBundle routing
4. Enable puli resources
5. Update your database schema
6. Clear the symfony cache

### Step 1: Download PhlexibleElementFinderBundle using composer

Add PhlexibleElementFinderBundle by running the command:

``` bash
$ php composer.phar require phlexible/element-finder-bundle "~1.0.0"
```

Composer will install the bundle to your project's `vendor/phlexible` directory.

### Step 2: Enable the bundle

Enable the bundle in the kernel:

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

public function registerBundles()
{
    $bundles = array(
        // ...
        new Phlexible\Bundle\PhlexibleElementFinderBundle(),
    );
}
```

### Step 3: Import PhlexibleElementFinderBundle routing

Import the PhlexibleElementFinderBundle routing.

For frontend:

``` yaml
# app/config/routing.yml
phlexible_element_finder_render:
    resource: "@PhlexibleElementFinderBundle/Controller/RenderController.php"
    type:     annotation
```

For administration backend:

``` yaml
# app/config/admin_routing.yml
phlexible_element_finder_catch:
    resource: "@PhlexibleElementFinderBundle/Controller/CatchController.php"
    type:     annotation
```

### Step 4: Enable puli resources

The PhlexibleElementFinderBundle provides puli bindings for phlexible scripts, styles and icons. These need to be activated.

``` bash
$ bin/puli bind --enable d80e5f # enable binding for phlexible/scripts
$ bin/puli bind --enable 0ccc61 # enable binding for phlexible/styles
$ bin/puli bind --enable 6ce2d4 # enable binding for phlexible/icons
```

### Step 5: Update your database schema

Now that the bundle is set up, the last thing you need to do is update your database schema because the element finder includes entities that need to be installed in your database.

For ORM run the following command.

``` bash
$ php app/console doctrine:schema:update --force
```

### Step 6: Clear the symfony cache

If you access your phlexible application with environment prod, clear the cache:

``` bash
$ php app/console cache:clear --env=prod
```
{'fraction_non_alphanumeric': 0.09685751183814034, 'fraction_numerical': 0.01076194575979337, 'mean_word_length': 4.4670588235294115, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4371626', 'n_tokens_mistral': 1374, 'n_tokens_neox': 1301, 'n_words': 474}