shapecode/doctrine-session-handler-bundle

为 Symfony 项目添加 doctrine 会话处理器。

7.0.1 2024-06-09 12:24 UTC

README

paypal

PHP Version Latest Stable Version Latest Unstable Version Total Downloads Monthly Downloads Daily Downloads License

此包提供 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

完成 ;)