shapecode / doctrine-session-handler-bundle
为 Symfony 项目添加 doctrine 会话处理器。
7.0.1
2024-06-09 12:24 UTC
Requires
- php: ^8.2
- ext-session: *
- doctrine/dbal: ^3.0 || ^4.0
- doctrine/doctrine-bundle: ^2.12
- doctrine/orm: ^2.7 || ^3.2
- doctrine/persistence: ^3.2
- nesbot/carbon: ^3.5
- psr/clock: ^1.0
- symfony/config: ^6.4 || ^7.0
- symfony/dependency-injection: ^6.4 || ^7.0
- symfony/http-kernel: ^6.4 || ^7.0
Requires (Dev)
- dg/bypass-finals: ^1.5
- doctrine/coding-standard: ^12.0
- icanhazstring/composer-unused: ^0.8
- maglnet/composer-require-checker: ^4.7
- phpstan/phpstan: ^1.10
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-phpunit: ^1.3
- phpstan/phpstan-strict-rules: ^1.5
- phpunit/phpunit: ^10.5
- roave/security-advisories: dev-master
- squizlabs/php_codesniffer: ^3.7
- symfony/var-dumper: ^7.0
README
此包提供 Doctrine 会话处理器,以便在数据库中保存会话。
安装说明
安装此包可以通过以下简单步骤完成
将包添加到您的项目作为 composer 依赖项
$ composer require shapecode/doctrine-session-handler-bundle
将包添加到 bundles.php
<?php return [ // ... Shapecode\Bundle\Doctrine\SessionHandlerBundle\ShapecodeDoctrineSessionHandlerBundle::class => ['all' => true], // ... ];
更新您的数据库。
$ php bin/console doctrine:schema:update --force
现在您需要更改您的应用程序配置(默认位置为 app/config/packages/framework.yaml)。
framework: session: handler_id: Shapecode\Bundle\Doctrine\SessionHandlerBundle\Session\Handler\DoctrineHandler
完成 ;)