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
34524a52
Commit
34524a52
authored
Nov 04, 2013
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed debug to have a sensible default in all providers
parent
18b6050b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
src/Silex/Provider/HttpCacheServiceProvider.php
src/Silex/Provider/HttpCacheServiceProvider.php
+1
-1
src/Silex/Provider/HttpFragmentServiceProvider.php
src/Silex/Provider/HttpFragmentServiceProvider.php
+1
-1
src/Silex/Provider/MonologServiceProvider.php
src/Silex/Provider/MonologServiceProvider.php
+1
-1
src/Silex/Provider/TwigServiceProvider.php
src/Silex/Provider/TwigServiceProvider.php
+3
-3
No files found.
src/Silex/Provider/HttpCacheServiceProvider.php
View file @
34524a52
...
@@ -31,7 +31,7 @@ class HttpCacheServiceProvider implements ServiceProviderInterface, EventListene
...
@@ -31,7 +31,7 @@ class HttpCacheServiceProvider implements ServiceProviderInterface, EventListene
$app
[
'http_cache'
]
=
$app
->
share
(
function
(
$app
)
{
$app
[
'http_cache'
]
=
$app
->
share
(
function
(
$app
)
{
$app
[
'http_cache.options'
]
=
array_replace
(
$app
[
'http_cache.options'
]
=
array_replace
(
array
(
array
(
'debug'
=>
$app
[
'debug'
]
,
'debug'
=>
isset
(
$app
[
'debug'
])
?
$app
[
'debug'
]
:
false
,
),
$app
[
'http_cache.options'
]
),
$app
[
'http_cache.options'
]
);
);
...
...
src/Silex/Provider/HttpFragmentServiceProvider.php
View file @
34524a52
...
@@ -31,7 +31,7 @@ class HttpFragmentServiceProvider implements ServiceProviderInterface, EventList
...
@@ -31,7 +31,7 @@ class HttpFragmentServiceProvider implements ServiceProviderInterface, EventList
public
function
register
(
\Pimple
$app
)
public
function
register
(
\Pimple
$app
)
{
{
$app
[
'fragment.handler'
]
=
$app
->
share
(
function
(
$app
)
{
$app
[
'fragment.handler'
]
=
$app
->
share
(
function
(
$app
)
{
return
new
FragmentHandler
(
$app
[
'fragment.renderers'
],
$app
[
'debug'
]
,
$app
[
'request_stack'
]);
return
new
FragmentHandler
(
$app
[
'fragment.renderers'
],
isset
(
$app
[
'debug'
])
?
$app
[
'debug'
]
:
false
,
$app
[
'request_stack'
]);
});
});
$app
[
'fragment.renderer.inline'
]
=
$app
->
share
(
function
(
$app
)
{
$app
[
'fragment.renderer.inline'
]
=
$app
->
share
(
function
(
$app
)
{
...
...
src/Silex/Provider/MonologServiceProvider.php
View file @
34524a52
...
@@ -50,7 +50,7 @@ class MonologServiceProvider implements ServiceProviderInterface, BootableProvid
...
@@ -50,7 +50,7 @@ class MonologServiceProvider implements ServiceProviderInterface, BootableProvid
$log
->
pushHandler
(
$app
[
'monolog.handler'
]);
$log
->
pushHandler
(
$app
[
'monolog.handler'
]);
if
(
$app
[
'debug'
]
&&
isset
(
$app
[
'monolog.handler.debug'
]))
{
if
(
isset
(
$app
[
'debug'
])
&&
$app
[
'debug'
]
&&
isset
(
$app
[
'monolog.handler.debug'
]))
{
$log
->
pushHandler
(
$app
[
'monolog.handler.debug'
]);
$log
->
pushHandler
(
$app
[
'monolog.handler.debug'
]);
}
}
...
...
src/Silex/Provider/TwigServiceProvider.php
View file @
34524a52
...
@@ -38,15 +38,15 @@ class TwigServiceProvider implements ServiceProviderInterface
...
@@ -38,15 +38,15 @@ class TwigServiceProvider implements ServiceProviderInterface
$app
[
'twig.options'
]
=
array_replace
(
$app
[
'twig.options'
]
=
array_replace
(
array
(
array
(
'charset'
=>
$app
[
'charset'
],
'charset'
=>
$app
[
'charset'
],
'debug'
=>
$app
[
'debug'
]
,
'debug'
=>
isset
(
$app
[
'debug'
])
?
$app
[
'debug'
]
:
false
,
'strict_variables'
=>
$app
[
'debug'
]
,
'strict_variables'
=>
isset
(
$app
[
'debug'
])
?
$app
[
'debug'
]
:
false
,
),
$app
[
'twig.options'
]
),
$app
[
'twig.options'
]
);
);
$twig
=
new
\Twig_Environment
(
$app
[
'twig.loader'
],
$app
[
'twig.options'
]);
$twig
=
new
\Twig_Environment
(
$app
[
'twig.loader'
],
$app
[
'twig.options'
]);
$twig
->
addGlobal
(
'app'
,
$app
);
$twig
->
addGlobal
(
'app'
,
$app
);
if
(
$app
[
'debug'
])
{
if
(
isset
(
$app
[
'debug'
])
&&
$app
[
'debug'
])
{
$twig
->
addExtension
(
new
\Twig_Extension_Debug
());
$twig
->
addExtension
(
new
\Twig_Extension_Debug
());
}
}
...
...
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