Skip to content

Commit

Permalink
Revert "afup#1415 Session in DB"
Browse files Browse the repository at this point in the history
This reverts commit 201b453.
  • Loading branch information
stakovicz committed Feb 11, 2024
1 parent 4a7e151 commit 62ffbc8
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 28 deletions.
5 changes: 3 additions & 2 deletions app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,9 @@ framework:
default_locale: "%locale%"
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
# http://symfony.com/doc/current/reference/configuration/framework.html#handler-id
storage_id: session.storage.php_bridge
handler_id: ~
fragments: ~
http_method_override: true
assets: ~
Expand Down
6 changes: 0 additions & 6 deletions app/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ services:
_defaults:
public: true

Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler:
public: false
arguments:
- 'mysql:host=%database_host%;port=%database_port%;dbname=%database_name%'
- { db_username: '%database_user%', db_password: '%database_password%' }

AppBundle\Controller\Event\:
resource: '../../sources/AppBundle/Controller/Event/*'
autowire: true
Expand Down
20 changes: 0 additions & 20 deletions db/migrations/20240106213200_sessions.php

This file was deleted.

4 changes: 4 additions & 0 deletions htdocs/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
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 @@ -32,6 +34,8 @@
/** @var \Composer\Autoload\ClassLoader $loader */
$loader = require __DIR__.'/../vendor/autoload.php';

session_start();

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

Expand Down
2 changes: 2 additions & 0 deletions htdocs/include/prepend.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// Initialisation
ob_start();

session_start();

// Inclusion de l'autoload de composer
require_once dirname(__FILE__) . '/../../vendor/autoload.php';

Expand Down
4 changes: 4 additions & 0 deletions htdocs/pages/planete/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
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 @@ -41,6 +43,8 @@
/** @var ClassLoader $loader */
$loader = require __DIR__.'/../../../vendor/autoload.php';

session_start();

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

Expand Down

0 comments on commit 62ffbc8

Please sign in to comment.