PHPackages                             ccmbenchmark/ting\_bundle - 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. ccmbenchmark/ting\_bundle

ActiveSymfony-bundle

ccmbenchmark/ting\_bundle
=========================

Symfony bundle for ccmbenchmark/ting. Provides an interface to use a lightweight datamapper in symfony.

3.10.1(1y ago)0118.6k↓13.8%3[2 PRs](https://github.com/ccmbenchmark/ting_bundle/pulls)Apache-2.0PHPPHP &gt;=8.1CI passing

Since Dec 3Pushed 5mo ago4 watchersCompare

[ Source](https://github.com/ccmbenchmark/ting_bundle)[ Packagist](https://packagist.org/packages/ccmbenchmark/ting_bundle)[ RSS](/packages/ccmbenchmark-ting-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (15)Versions (53)Used By (0)

Installation
============

[](#installation)

1. Require Ting Bundle with `composer require ccmbenchmark/ting_bundle`
2. Load Bundles in AppKernel.php

```
    new CCMBenchmark\TingBundle\TingBundle(),
```

Table of contents
-----------------

[](#table-of-contents)

- [Configuration](#configuration)
    - [Main configuration](#main-configuration)
    - [About public properties](#about-public-properties)
    - [Declare metadata with attributes](#declare-metadata-with-attributes)
- [Using Ting as a User Provider](#using-ting-a-user-provider)
- [Declare a unique constraint](#declare-a-unique-constraint-in-a-table)
- [Using Ting as a Value Resolver](#using-ting-as-a-value-resolver)

Configuration
=============

[](#configuration)

Main configuration
------------------

[](#main-configuration)

```
#!yaml

    ting:
        repositories: # Unnecessary if entities registered with attributes
            Acme:
                namespace: Acme\DemoBundle\Entity
                directory: "@DemoBundle/Entity"
                options:
                    #pass options to your repository
                    Acme\DemoBundle\BazRepository:
                        extra:
                            bar: hello
                            foo: world
                    Acme\DemoBundle\FooRepository:
                        extra:
                            bar: hello
                            foo: world
                    default:
                        connection: main
                        database: baz

        connections:
            main:
                namespace: CCMBenchmark\Ting\Driver\Mysqli
                master:
                    host:     localhost
                    user:     world_sample
                    password: world_sample
                    port:     3306
                slaves:
                    slave1:
                        host:     127.0.0.1
                        user:     world_sample_ro
                        password: world_sample_ro
                        port:     3306
                    slave2:
                        host:     127.0.1.1
                        user:     world_sample_ro
                        password: world_sample_ro
                        port:     3306

        databases_options:
            baz:
                timezone: 'Europe/Paris'

```

About public properties
-----------------------

[](#about-public-properties)

Public properties can be used in your entities, however for PHP &lt; 8.4, you should declare a setter to notify the property change.

PHP &lt; 8.4:

```
