small / swoole-entity-manager-bundle
Symfony bundle for Small Swoole Entity Manager, an ORM designed for Swoole and OpenSwoole
Package info
git.small-project.dev/lib/small-swoole-entity-manager-bundle
Type:symfony-bundle
pkg:composer/small/swoole-entity-manager-bundle
Requires
- php: >=8.3
- ext-iconv: *
- small/swoole-entity-manager-core: 2.*
- symfony/console: >=7.2
- symfony/dotenv: >=7.2
- symfony/flex: ^2
- symfony/framework-bundle: >=7.2
- symfony/runtime: >=7.2
- symfony/yaml: >=7.2
Requires (Dev)
- pestphp/pest: 2.34.*
- phpstan/phpstan: 1.11.*
README

Small Swoole Entity Manager Bundle
Small Swoole Entity Manager is an ORM designed for Swoole and OpenSwoole.
This bundle is a Symfony bridge for it.
Documentation: swoole-entity-manager.small-project.dev

Installation
composer require small/swoole-entity-manager-bundle
To configure a connection to database, create a "config/packages/small_swoole_entity_manager.yaml" :
small_swoole_entity_manager:
default_connection: test
connections:
test:
type: mysql
host: localhost
database: test_db
user: root
encoding: utf8
password: dev
Possibles values for type : "mysql" or "postgres"
Get manager
Now, you are able to get your managers via Symfony container :
$this->container
->get(\Small\SwooleEntityManagerBundle\Contract\EntityManagerFactoryInterface::class)
->get(\Small\SwooleEntityManagerBundle\Test\Fixture\EntityManager\UserManager::class)
;
See Small Swoole Entity Manager documentation for how to use manager.
Get connection
You can also retrieve Small Swoole Entity Manager connection to execute native statements :
$connection = $this->container
->get(\Small\SwooleEntityManagerBundle\Contract\ConnectionFactoryInterface::class)
->get('test')
;
See Small Swoole Entity Manager documentation for how to use connection.
Contributing
See CONTRIBUTE.md for the GitLab access request, project membership process, development workflow, and validation requirements.
Author
Sébastien Kus — sebastien.kus@gmail.com
License
Copyright © 2024 Sébastien Kus.
This project is released under the MIT License. See LICENSE.