Skip to content

Commit

Permalink
Remove deprecated Vision\Session\Handler\HandlerInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
Trainmaster committed Apr 3, 2016
1 parent d1f2b7f commit 1afa285
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 41 deletions.
22 changes: 5 additions & 17 deletions src/Vision/Session/Extension/NativeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,21 @@
namespace Vision\Session\Extension;

use Vision\Session\SessionInterface;
use Vision\Session\Handler\HandlerInterface;

use SessionHandlerInterface;

class NativeExtension implements ExtensionInterface
{
/** @var bool $started */
protected $started = false;

/**
* @param null|HandlerInterface $handler
* @param SessionHandlerInterface|null $handler
*/
public function __construct(HandlerInterface $handler = null)
public function __construct(SessionHandlerInterface $handler = null)
{
if (isset($handler)) {
if (version_compare(PHP_VERSION, '5.4.0') >= 0) {
session_set_save_handler($handler, true);
} else {
session_set_save_handler(
[$handler, 'close'],
[$handler, 'destroy'],
[$handler, 'gc'],
[$handler, 'open'],
[$handler, 'read'],
[$handler, 'write']
);

register_shutdown_function('session_write_close');
}
session_set_save_handler($handler, true);
}
}

Expand Down
24 changes: 0 additions & 24 deletions src/Vision/Session/Handler/HandlerInterface.php

This file was deleted.

0 comments on commit 1afa285

Please sign in to comment.