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
- small/swoole-entity-manager-core: 3.0.*
- symfony/config: ^7.4 || ^8.0
- symfony/console: ^7.4 || ^8.0
- symfony/dependency-injection: ^7.4 || ^8.0
- symfony/http-kernel: ^7.4 || ^8.0
Requires (Dev)
- pestphp/pest: ^4.0
- phpstan/phpstan: ^2.2
- symfony/dotenv: ^7.4 || ^8.0
- symfony/framework-bundle: ^7.4 || ^8.0
- symfony/runtime: ^7.4 || ^8.0
- symfony/yaml: ^7.4 || ^8.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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.