Skip to content

Commit

Permalink
afup#1415 Session in DB
Browse files Browse the repository at this point in the history
  • Loading branch information
stakovicz committed Feb 13, 2024
1 parent 9948b3a commit c739dc7
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 17 deletions.
4 changes: 1 addition & 3 deletions app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,7 @@ framework:
trusted_hosts: ~
session:
# https://symfony.com/doc/4.x/session/database.html#store-sessions-in-a-relational-database-mariadb-mysql-postgresql
#handler_id: Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler
storage_id: session.storage.php_bridge
handler_id: ~
handler_id: Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler
fragments: ~
http_method_override: true
assets: ~
Expand Down
2 changes: 0 additions & 2 deletions app/config/config_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ imports:

framework:
test: ~
session:
storage_id: session.storage.mock_file
profiler:
collect: false

Expand Down
2 changes: 1 addition & 1 deletion app/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
- 'mysql:host=%database_host%;port=%database_port%;dbname=%database_name%'
- db_username: '%database_user%'
db_password: '%database_password%'
lock_mode: !php/const:Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler::LOCK_NONE
lock_mode: !php/const Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler::LOCK_NONE


AppBundle\Controller\Event\:
Expand Down
4 changes: 0 additions & 4 deletions htdocs/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}

session_start();

/** @var \Composer\Autoload\ClassLoader $loader */
$loader = require __DIR__.'/../vendor/autoload.php';
Debug::enable();
Expand All @@ -34,8 +32,6 @@
/** @var \Composer\Autoload\ClassLoader $loader */
$loader = require __DIR__.'/../vendor/autoload.php';

session_start();

$kernel = new AppKernel('prod', false);
}

Expand Down
4 changes: 0 additions & 4 deletions htdocs/pages/planete/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}

session_start();

/** @var ClassLoader $loader */
$loader = require __DIR__.'/../../../vendor/autoload.php';
Debug::enable();
Expand All @@ -43,8 +41,6 @@
/** @var ClassLoader $loader */
$loader = require __DIR__.'/../../../vendor/autoload.php';

session_start();

$kernel = new PlaneteAppKernel('prod', false);
}

Expand Down
3 changes: 0 additions & 3 deletions sources/Afup/Bootstrap/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
if (ob_get_level() === 0) {
ob_start();
}
if (session_status() === PHP_SESSION_NONE) {
session_start();
}

// mise à jour des paramétrages PHP en fonction de la configuration

Expand Down

0 comments on commit c739dc7

Please sign in to comment.