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
32bed6d4
Commit
32bed6d4
authored
Nov 04, 2015
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.3'
* 1.3: fixes some routing deprecation notices Fix comment about symfony version
parents
f59fa3e7
b51769c1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
src/Silex/Application/FormTrait.php
src/Silex/Application/FormTrait.php
+1
-1
tests/Silex/Tests/Application/UrlGeneratorTraitTest.php
tests/Silex/Tests/Application/UrlGeneratorTraitTest.php
+4
-2
tests/Silex/Tests/Provider/RoutingServiceProviderTest.php
tests/Silex/Tests/Provider/RoutingServiceProviderTest.php
+2
-1
No files found.
src/Silex/Application/FormTrait.php
View file @
32bed6d4
...
...
@@ -32,7 +32,7 @@ trait FormTrait
public
function
form
(
$data
=
null
,
array
$options
=
array
(),
$type
=
null
)
{
if
(
null
===
$type
)
{
//
for BC with Symfony pre 2.7
//
BC with Symfony < 2.8
$type
=
class_exists
(
'Symfony\Component\Form\Extension\Core\Type\RangeType'
)
?
'Symfony\Component\Form\Extension\Core\Type\FormType'
:
'form'
;
}
...
...
tests/Silex/Tests/Application/UrlGeneratorTraitTest.php
View file @
32bed6d4
...
...
@@ -11,6 +11,8 @@
namespace
Silex\Tests\Application
;
use
Symfony\Component\Routing\Generator\UrlGeneratorInterface
;
/**
* UrlGeneratorTrait test cases.
*
...
...
@@ -22,7 +24,7 @@ class UrlGeneratorTraitTest extends \PHPUnit_Framework_TestCase
{
$app
=
new
UrlGeneratorApplication
();
$app
[
'url_generator'
]
=
$this
->
getMockBuilder
(
'Symfony\Component\Routing\Generator\UrlGeneratorInterface'
)
->
disableOriginalConstructor
()
->
getMock
();
$app
[
'url_generator'
]
->
expects
(
$this
->
once
())
->
method
(
'generate'
)
->
with
(
'foo'
,
array
(),
true
);
$app
[
'url_generator'
]
->
expects
(
$this
->
once
())
->
method
(
'generate'
)
->
with
(
'foo'
,
array
(),
UrlGeneratorInterface
::
ABSOLUTE_URL
);
$app
->
url
(
'foo'
);
}
...
...
@@ -30,7 +32,7 @@ class UrlGeneratorTraitTest extends \PHPUnit_Framework_TestCase
{
$app
=
new
UrlGeneratorApplication
();
$app
[
'url_generator'
]
=
$this
->
getMockBuilder
(
'Symfony\Component\Routing\Generator\UrlGeneratorInterface'
)
->
disableOriginalConstructor
()
->
getMock
();
$app
[
'url_generator'
]
->
expects
(
$this
->
once
())
->
method
(
'generate'
)
->
with
(
'foo'
,
array
(),
false
);
$app
[
'url_generator'
]
->
expects
(
$this
->
once
())
->
method
(
'generate'
)
->
with
(
'foo'
,
array
(),
UrlGeneratorInterface
::
ABSOLUTE_PATH
);
$app
->
path
(
'foo'
);
}
}
tests/Silex/Tests/Provider/RoutingServiceProviderTest.php
View file @
32bed6d4
...
...
@@ -13,6 +13,7 @@ namespace Silex\Tests\Provider;
use
Silex\Application
;
use
Symfony\Component\HttpFoundation\Request
;
use
Symfony\Component\Routing\Generator\UrlGeneratorInterface
;
/**
* RoutingProvider test cases.
...
...
@@ -61,7 +62,7 @@ class RoutingServiceProviderTest extends \PHPUnit_Framework_TestCase
->
bind
(
'hello'
);
$app
->
get
(
'/'
,
function
()
use
(
$app
)
{
return
$app
[
'url_generator'
]
->
generate
(
'hello'
,
array
(
'name'
=>
'john'
),
true
);
return
$app
[
'url_generator'
]
->
generate
(
'hello'
,
array
(
'name'
=>
'john'
),
UrlGeneratorInterface
::
ABSOLUTE_URL
);
});
$request
=
Request
::
create
(
'https://localhost:81/'
);
...
...
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