Changed mentions of 'symfony2' to 'symfony'
- Changed surrogate capability name to symfony - Changed user agent of the BrowserKit Client to 'Symfony BrowserKit' - Changed 'symfony2' to 'symfony' in timing templates - Updated changelog and upgrade files
This commit is contained in:
parent
f065095db7
commit
6ebd03de9c
@ -1,6 +1,11 @@
|
|||||||
UPGRADE FROM 3.1 to 3.2
|
UPGRADE FROM 3.1 to 3.2
|
||||||
=======================
|
=======================
|
||||||
|
|
||||||
|
BrowserKit
|
||||||
|
----------
|
||||||
|
|
||||||
|
* Client HTTP user agent has been changed to 'Symfony BrowserKit' (was 'Symfony2 BrowserKit' before).
|
||||||
|
|
||||||
FrameworkBundle
|
FrameworkBundle
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
@ -71,6 +76,18 @@ HttpKernel
|
|||||||
* `DataCollector::varToString()` is deprecated and will be removed in Symfony
|
* `DataCollector::varToString()` is deprecated and will be removed in Symfony
|
||||||
4.0. Use the `cloneVar()` method instead.
|
4.0. Use the `cloneVar()` method instead.
|
||||||
|
|
||||||
|
* Surrogate name in a `Surrogate-Capability` HTTP request header has been changed to 'symfony'.
|
||||||
|
|
||||||
|
Before:
|
||||||
|
```
|
||||||
|
Surrogate-Capability: symfony2="ESI/1.0"
|
||||||
|
```
|
||||||
|
|
||||||
|
After:
|
||||||
|
```
|
||||||
|
Surrogate-Capability: symfony="ESI/1.0"
|
||||||
|
```
|
||||||
|
|
||||||
HttpFoundation
|
HttpFoundation
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ class StopwatchExtensionTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
array('{% stopwatch "foo" %}something{% endstopwatch %}', 'foo'),
|
array('{% stopwatch "foo" %}something{% endstopwatch %}', 'foo'),
|
||||||
array('{% stopwatch "foo" %}symfony2 is fun{% endstopwatch %}{% stopwatch "bar" %}something{% endstopwatch %}', array('foo', 'bar')),
|
array('{% stopwatch "foo" %}symfony is fun{% endstopwatch %}{% stopwatch "bar" %}something{% endstopwatch %}', array('foo', 'bar')),
|
||||||
array('{% set foo = "foo" %}{% stopwatch foo %}something{% endstopwatch %}', 'foo'),
|
array('{% set foo = "foo" %}{% stopwatch foo %}something{% endstopwatch %}', 'foo'),
|
||||||
array('{% set foo = "foo" %}{% stopwatch foo %}something {% set foo = "bar" %}{% endstopwatch %}', 'foo'),
|
array('{% set foo = "foo" %}{% stopwatch foo %}something {% set foo = "bar" %}{% endstopwatch %}', 'foo'),
|
||||||
array('{% stopwatch "foo.bar" %}something{% endstopwatch %}', 'foo.bar'),
|
array('{% stopwatch "foo.bar" %}something{% endstopwatch %}', 'foo.bar'),
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
CHANGELOG
|
CHANGELOG
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
3.2.0
|
||||||
|
-----
|
||||||
|
|
||||||
|
* Client HTTP user agent has been changed to 'Symfony BrowserKit'
|
||||||
|
|
||||||
2.3.0
|
2.3.0
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ abstract class Client
|
|||||||
public function setServerParameters(array $server)
|
public function setServerParameters(array $server)
|
||||||
{
|
{
|
||||||
$this->server = array_merge(array(
|
$this->server = array_merge(array(
|
||||||
'HTTP_USER_AGENT' => 'Symfony2 BrowserKit',
|
'HTTP_USER_AGENT' => 'Symfony BrowserKit',
|
||||||
), $server);
|
), $server);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -432,7 +432,7 @@ class ClientTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$headers = array(
|
$headers = array(
|
||||||
'HTTP_HOST' => 'www.example.com',
|
'HTTP_HOST' => 'www.example.com',
|
||||||
'HTTP_USER_AGENT' => 'Symfony2 BrowserKit',
|
'HTTP_USER_AGENT' => 'Symfony BrowserKit',
|
||||||
'CONTENT_TYPE' => 'application/vnd.custom+xml',
|
'CONTENT_TYPE' => 'application/vnd.custom+xml',
|
||||||
'HTTPS' => false,
|
'HTTPS' => false,
|
||||||
);
|
);
|
||||||
@ -459,7 +459,7 @@ class ClientTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$headers = array(
|
$headers = array(
|
||||||
'HTTP_HOST' => 'www.example.com:8080',
|
'HTTP_HOST' => 'www.example.com:8080',
|
||||||
'HTTP_USER_AGENT' => 'Symfony2 BrowserKit',
|
'HTTP_USER_AGENT' => 'Symfony BrowserKit',
|
||||||
'HTTPS' => false,
|
'HTTPS' => false,
|
||||||
'HTTP_REFERER' => 'http://www.example.com:8080/',
|
'HTTP_REFERER' => 'http://www.example.com:8080/',
|
||||||
);
|
);
|
||||||
@ -602,7 +602,7 @@ class ClientTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$client = new TestClient();
|
$client = new TestClient();
|
||||||
$this->assertEquals('', $client->getServerParameter('HTTP_HOST'));
|
$this->assertEquals('', $client->getServerParameter('HTTP_HOST'));
|
||||||
$this->assertEquals('Symfony2 BrowserKit', $client->getServerParameter('HTTP_USER_AGENT'));
|
$this->assertEquals('Symfony BrowserKit', $client->getServerParameter('HTTP_USER_AGENT'));
|
||||||
$this->assertEquals('testvalue', $client->getServerParameter('testkey', 'testvalue'));
|
$this->assertEquals('testvalue', $client->getServerParameter('testkey', 'testvalue'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -611,7 +611,7 @@ class ClientTest extends \PHPUnit_Framework_TestCase
|
|||||||
$client = new TestClient();
|
$client = new TestClient();
|
||||||
|
|
||||||
$this->assertEquals('', $client->getServerParameter('HTTP_HOST'));
|
$this->assertEquals('', $client->getServerParameter('HTTP_HOST'));
|
||||||
$this->assertEquals('Symfony2 BrowserKit', $client->getServerParameter('HTTP_USER_AGENT'));
|
$this->assertEquals('Symfony BrowserKit', $client->getServerParameter('HTTP_USER_AGENT'));
|
||||||
|
|
||||||
$client->setServerParameter('HTTP_HOST', 'testhost');
|
$client->setServerParameter('HTTP_HOST', 'testhost');
|
||||||
$this->assertEquals('testhost', $client->getServerParameter('HTTP_HOST'));
|
$this->assertEquals('testhost', $client->getServerParameter('HTTP_HOST'));
|
||||||
@ -625,7 +625,7 @@ class ClientTest extends \PHPUnit_Framework_TestCase
|
|||||||
$client = new TestClient();
|
$client = new TestClient();
|
||||||
|
|
||||||
$this->assertEquals('', $client->getServerParameter('HTTP_HOST'));
|
$this->assertEquals('', $client->getServerParameter('HTTP_HOST'));
|
||||||
$this->assertEquals('Symfony2 BrowserKit', $client->getServerParameter('HTTP_USER_AGENT'));
|
$this->assertEquals('Symfony BrowserKit', $client->getServerParameter('HTTP_USER_AGENT'));
|
||||||
|
|
||||||
$client->request('GET', 'https://www.example.com/https/www.example.com', array(), array(), array(
|
$client->request('GET', 'https://www.example.com/https/www.example.com', array(), array(), array(
|
||||||
'HTTP_HOST' => 'testhost',
|
'HTTP_HOST' => 'testhost',
|
||||||
@ -635,7 +635,7 @@ class ClientTest extends \PHPUnit_Framework_TestCase
|
|||||||
));
|
));
|
||||||
|
|
||||||
$this->assertEquals('', $client->getServerParameter('HTTP_HOST'));
|
$this->assertEquals('', $client->getServerParameter('HTTP_HOST'));
|
||||||
$this->assertEquals('Symfony2 BrowserKit', $client->getServerParameter('HTTP_USER_AGENT'));
|
$this->assertEquals('Symfony BrowserKit', $client->getServerParameter('HTTP_USER_AGENT'));
|
||||||
|
|
||||||
$this->assertEquals('http://www.example.com/https/www.example.com', $client->getRequest()->getUri());
|
$this->assertEquals('http://www.example.com/https/www.example.com', $client->getRequest()->getUri());
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ CHANGELOG
|
|||||||
-----
|
-----
|
||||||
|
|
||||||
* deprecated `DataCollector::varToString()`, use `cloneVar()` instead
|
* deprecated `DataCollector::varToString()`, use `cloneVar()` instead
|
||||||
|
* changed surrogate capability name in `AbstractSurrogate::addSurrogateCapability` to 'symfony'
|
||||||
|
|
||||||
3.1.0
|
3.1.0
|
||||||
-----
|
-----
|
||||||
|
@ -68,7 +68,7 @@ abstract class AbstractSurrogate implements SurrogateInterface
|
|||||||
public function addSurrogateCapability(Request $request)
|
public function addSurrogateCapability(Request $request)
|
||||||
{
|
{
|
||||||
$current = $request->headers->get('Surrogate-Capability');
|
$current = $request->headers->get('Surrogate-Capability');
|
||||||
$new = sprintf('symfony2="%s/1.0"', strtoupper($this->getName()));
|
$new = sprintf('symfony="%s/1.0"', strtoupper($this->getName()));
|
||||||
|
|
||||||
$request->headers->set('Surrogate-Capability', $current ? $current.', '.$new : $new);
|
$request->headers->set('Surrogate-Capability', $current ? $current.', '.$new : $new);
|
||||||
}
|
}
|
||||||
|
@ -39,10 +39,10 @@ class EsiTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
$request = Request::create('/');
|
$request = Request::create('/');
|
||||||
$esi->addSurrogateCapability($request);
|
$esi->addSurrogateCapability($request);
|
||||||
$this->assertEquals('symfony2="ESI/1.0"', $request->headers->get('Surrogate-Capability'));
|
$this->assertEquals('symfony="ESI/1.0"', $request->headers->get('Surrogate-Capability'));
|
||||||
|
|
||||||
$esi->addSurrogateCapability($request);
|
$esi->addSurrogateCapability($request);
|
||||||
$this->assertEquals('symfony2="ESI/1.0", symfony2="ESI/1.0"', $request->headers->get('Surrogate-Capability'));
|
$this->assertEquals('symfony="ESI/1.0", symfony="ESI/1.0"', $request->headers->get('Surrogate-Capability'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testAddSurrogateControl()
|
public function testAddSurrogateControl()
|
||||||
|
@ -39,10 +39,10 @@ class SsiTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
$request = Request::create('/');
|
$request = Request::create('/');
|
||||||
$ssi->addSurrogateCapability($request);
|
$ssi->addSurrogateCapability($request);
|
||||||
$this->assertEquals('symfony2="SSI/1.0"', $request->headers->get('Surrogate-Capability'));
|
$this->assertEquals('symfony="SSI/1.0"', $request->headers->get('Surrogate-Capability'));
|
||||||
|
|
||||||
$ssi->addSurrogateCapability($request);
|
$ssi->addSurrogateCapability($request);
|
||||||
$this->assertEquals('symfony2="SSI/1.0", symfony2="SSI/1.0"', $request->headers->get('Surrogate-Capability'));
|
$this->assertEquals('symfony="SSI/1.0", symfony="SSI/1.0"', $request->headers->get('Surrogate-Capability'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testAddSurrogateControl()
|
public function testAddSurrogateControl()
|
||||||
|
Reference in New Issue
Block a user