Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
3b1ba69b
Commit
3b1ba69b
authored
Nov 04, 2013
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed conditions about the request stack as Symfony 2.4+ is required now
parent
cd044b6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
9 deletions
+1
-9
src/Silex/Application.php
src/Silex/Application.php
+1
-3
src/Silex/Provider/HttpFragmentServiceProvider.php
src/Silex/Provider/HttpFragmentServiceProvider.php
+0
-6
No files found.
src/Silex/Application.php
View file @
3b1ba69b
...
...
@@ -117,9 +117,7 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
});
$this
[
'request_stack'
]
=
$this
->
share
(
function
()
use
(
$app
)
{
if
(
class_exists
(
'Symfony\Component\HttpFoundation\RequestStack'
))
{
return
new
RequestStack
();
}
return
new
RequestStack
();
});
$this
[
'request_context'
]
=
$this
->
share
(
function
()
use
(
$app
)
{
...
...
src/Silex/Provider/HttpFragmentServiceProvider.php
View file @
3b1ba69b
...
...
@@ -23,18 +23,12 @@ use Symfony\Component\HttpKernel\UriSigner;
/**
* HttpKernel Fragment integration for Silex.
*
* This service provider requires Symfony 2.4+.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class
HttpFragmentServiceProvider
implements
ServiceProviderInterface
{
public
function
register
(
Application
$app
)
{
if
(
!
class_exists
(
'Symfony\Component\HttpFoundation\RequestStack'
))
{
throw
new
\LogicException
(
'The HTTP Fragment service provider only works with Symfony 2.4+.'
);
}
$app
[
'fragment.handler'
]
=
$app
->
share
(
function
(
$app
)
{
return
new
FragmentHandler
(
$app
[
'fragment.renderers'
],
$app
[
'debug'
],
$app
[
'request_stack'
]);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment