Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symfony\Component\HttpFoundation\Session\SessionInterface #15

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/framework/Eccube/Controller/AbstractController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Eccube\HttpFoundation\Session\Session;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Symfony\Component\Routing\Exception\RouteNotFoundException;
use Eccube\Routing\Generator\UrlGeneratorInterface;
Expand Down Expand Up @@ -88,10 +87,10 @@ public function setTranslator(TranslatorInterface $translator)
}

/**
* @param SessionInterface $session
* @param Session $session
* @required
*/
public function setSession(SessionInterface $session)
public function setSession(Session $session)
{
$this->session = $session;
}
Expand Down
21 changes: 21 additions & 0 deletions src/framework/Eccube/HttpFoundation/Session/Session.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace Eccube\HttpFoundation\Session;

use Symfony\Component\HttpFoundation\Session\SessionInterface as BaseSessionInterface;

class Session
{
private BaseSessionInterface $session;

public function __construct(BaseSessionInterface $session)
{
$this->session = $session;
}

// todo
public function __call($name, $arguments)
{
return $this->session->$name(...$arguments);
}
}