Commit c3135948 authored by catch's avatar catch

Issue #2609268 by andypost, hussainweb: Upgrade to Symfony 2.7.6

parent 0c12b72e
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -25,8 +25,6 @@
* you need to also implement the getScript() method.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
abstract class Client
{
......@@ -52,8 +50,6 @@ abstract class Client
* @param array $server The server parameters (equivalent of $_SERVER)
* @param History $history A History instance to store the browser history
* @param CookieJar $cookieJar A CookieJar instance to store the cookies
*
* @api
*/
public function __construct(array $server = array(), History $history = null, CookieJar $cookieJar = null)
{
......@@ -66,8 +62,6 @@ public function __construct(array $server = array(), History $history = null, Co
* Sets whether to automatically follow redirects or not.
*
* @param bool $followRedirect Whether to follow redirects
*
* @api
*/
public function followRedirects($followRedirect = true)
{
......@@ -91,8 +85,6 @@ public function setMaxRedirects($maxRedirects)
* @param bool $insulated Whether to insulate the requests or not
*
* @throws \RuntimeException When Symfony Process Component is not installed
*
* @api
*/
public function insulate($insulated = true)
{
......@@ -107,8 +99,6 @@ public function insulate($insulated = true)
* Sets server parameters.
*
* @param array $server An array of server parameters
*
* @api
*/
public function setServerParameters(array $server)
{
......@@ -146,8 +136,6 @@ public function getServerParameter($key, $default = '')
* Returns the History instance.
*
* @return History A History instance
*
* @api
*/
public function getHistory()
{
......@@ -158,8 +146,6 @@ public function getHistory()
* Returns the CookieJar instance.
*
* @return CookieJar A CookieJar instance
*
* @api
*/
public function getCookieJar()
{
......@@ -170,8 +156,6 @@ public function getCookieJar()
* Returns the current Crawler instance.
*
* @return Crawler|null A Crawler instance
*
* @api
*/
public function getCrawler()
{
......@@ -182,8 +166,6 @@ public function getCrawler()
* Returns the current BrowserKit Response instance.
*
* @return Response|null A BrowserKit Response instance
*
* @api
*/
public function getInternalResponse()
{
......@@ -199,8 +181,6 @@ public function getInternalResponse()
* @return object|null A response instance
*
* @see doRequest()
*
* @api
*/
public function getResponse()
{
......@@ -211,8 +191,6 @@ public function getResponse()
* Returns the current BrowserKit Request instance.
*
* @return Request|null A BrowserKit Request instance
*
* @api
*/
public function getInternalRequest()
{
......@@ -228,8 +206,6 @@ public function getInternalRequest()
* @return object|null A Request instance
*
* @see doRequest()
*
* @api
*/
public function getRequest()
{
......@@ -242,8 +218,6 @@ public function getRequest()
* @param Link $link A Link instance
*
* @return Crawler
*
* @api
*/
public function click(Link $link)
{
......@@ -261,8 +235,6 @@ public function click(Link $link)
* @param array $values An array of form field values
*
* @return Crawler
*
* @api
*/
public function submit(Form $form, array $values = array())
{
......@@ -283,8 +255,6 @@ public function submit(Form $form, array $values = array())
* @param bool $changeHistory Whether to update the history or not (only used internally for back(), forward(), and reload())
*
* @return Crawler
*
* @api
*/
public function request($method, $uri, array $parameters = array(), array $files = array(), array $server = array(), $content = null, $changeHistory = true)
{
......@@ -357,8 +327,7 @@ public function request($method, $uri, array $parameters = array(), array $files
*/
protected function doRequestInProcess($request)
{
// We set the TMPDIR (for Macs) and TEMP (for Windows), because on these platforms the temp directory changes based on the user.
$process = new PhpProcess($this->getScript($request), null, array('TMPDIR' => sys_get_temp_dir(), 'TEMP' => sys_get_temp_dir()));
$process = new PhpProcess($this->getScript($request), null, null);
$process->run();
if (!$process->isSuccessful() || !preg_match('/^O\:\d+\:/', $process->getOutput())) {
......@@ -440,8 +409,6 @@ protected function createCrawlerFromContent($uri, $content, $type)
* Goes back in the browser history.
*
* @return Crawler
*
* @api
*/
public function back()
{
......@@ -452,8 +419,6 @@ public function back()
* Goes forward in the browser history.
*
* @return Crawler
*
* @api
*/
public function forward()
{
......@@ -464,8 +429,6 @@ public function forward()
* Reloads the current browser.
*
* @return Crawler
*
* @api
*/
public function reload()
{
......@@ -478,8 +441,6 @@ public function reload()
* @return Crawler
*
* @throws \LogicException If request was not a redirect
*
* @api
*/
public function followRedirect()
{
......@@ -528,8 +489,6 @@ public function followRedirect()
* Restarts the client.
*
* It flushes history and all cookies.
*
* @api
*/
public function restart()
{
......
......@@ -15,8 +15,6 @@
* Cookie represents an HTTP cookie.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
class Cookie
{
......@@ -56,8 +54,6 @@ class Cookie
* @param bool $secure Indicates that the cookie should only be transmitted over a secure HTTPS connection from the client
* @param bool $httponly The cookie httponly flag
* @param bool $encodedValue Whether the value is encoded or not
*
* @api
*/
public function __construct($name, $value, $expires = null, $path = null, $domain = '', $secure = false, $httponly = true, $encodedValue = false)
{
......@@ -90,8 +86,6 @@ public function __construct($name, $value, $expires = null, $path = null, $domai
* @return string The HTTP representation of the Cookie
*
* @throws \UnexpectedValueException
*
* @api
*/
public function __toString()
{
......@@ -130,8 +124,6 @@ public function __toString()
* @return Cookie A Cookie instance
*
* @throws \InvalidArgumentException
*
* @api
*/
public static function fromString($cookie, $url = null)
{
......@@ -229,8 +221,6 @@ private static function parseDate($dateValue)
* Gets the name of the cookie.
*
* @return string The cookie name
*
* @api
*/
public function getName()
{
......@@ -241,8 +231,6 @@ public function getName()
* Gets the value of the cookie.
*
* @return string The cookie value
*
* @api
*/
public function getValue()
{
......@@ -253,8 +241,6 @@ public function getValue()
* Gets the raw value of the cookie.
*
* @return string The cookie value
*
* @api
*/
public function getRawValue()
{
......@@ -265,8 +251,6 @@ public function getRawValue()
* Gets the expires time of the cookie.
*
* @return string The cookie expires time
*
* @api
*/
public function getExpiresTime()
{
......@@ -277,8 +261,6 @@ public function getExpiresTime()
* Gets the path of the cookie.
*
* @return string The cookie path
*
* @api
*/
public function getPath()
{
......@@ -289,8 +271,6 @@ public function getPath()
* Gets the domain of the cookie.
*
* @return string The cookie domain
*
* @api
*/
public function getDomain()
{
......@@ -301,8 +281,6 @@ public function getDomain()
* Returns the secure flag of the cookie.
*
* @return bool The cookie secure flag
*
* @api
*/
public function isSecure()
{
......@@ -313,8 +291,6 @@ public function isSecure()
* Returns the httponly flag of the cookie.
*
* @return bool The cookie httponly flag
*
* @api
*/
public function isHttpOnly()
{
......@@ -325,8 +301,6 @@ public function isHttpOnly()
* Returns true if the cookie has expired.
*
* @return bool true if the cookie has expired, false otherwise
*
* @api
*/
public function isExpired()
{
......
......@@ -15,8 +15,6 @@
* CookieJar.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
class CookieJar
{
......@@ -26,8 +24,6 @@ class CookieJar
* Sets a cookie.
*
* @param Cookie $cookie A Cookie instance
*
* @api
*/
public function set(Cookie $cookie)
{
......@@ -47,8 +43,6 @@ public function set(Cookie $cookie)
* @param string $domain The cookie domain
*
* @return Cookie|null A Cookie instance or null if the cookie does not exist
*
* @api
*/
public function get($name, $path = '/', $domain = null)
{
......@@ -94,8 +88,6 @@ public function get($name, $path = '/', $domain = null)
* @param string $name The cookie name
* @param string $path The cookie path
* @param string $domain The cookie domain
*
* @api
*/
public function expire($name, $path = '/', $domain = null)
{
......@@ -126,8 +118,6 @@ public function expire($name, $path = '/', $domain = null)
/**
* Removes all the cookies from the jar.
*
* @api
*/
public function clear()
{
......
......@@ -3,7 +3,7 @@ BrowserKit Component
BrowserKit simulates the behavior of a web browser.
The component only provide an abstract client and does not provide any
The component only provides an abstract client and does not provide any
"default" backend for the HTTP layer.
Resources
......
......@@ -15,8 +15,6 @@
* Request object.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
class Request
{
......@@ -38,8 +36,6 @@ class Request
* @param array $cookies An array of cookies
* @param array $server An array of server parameters
* @param string $content The raw body data
*
* @api
*/
public function __construct($uri, $method, array $parameters = array(), array $files = array(), array $cookies = array(), array $server = array(), $content = null)
{
......@@ -56,8 +52,6 @@ public function __construct($uri, $method, array $parameters = array(), array $f
* Gets the request URI.
*
* @return string The request URI
*
* @api
*/
public function getUri()
{
......@@ -68,8 +62,6 @@ public function getUri()
* Gets the request HTTP method.
*
* @return string The request HTTP method
*
* @api
*/
public function getMethod()
{
......@@ -80,8 +72,6 @@ public function getMethod()
* Gets the request parameters.
*
* @return array The request parameters
*
* @api
*/
public function getParameters()
{
......@@ -92,8 +82,6 @@ public function getParameters()
* Gets the request server files.
*
* @return array The request files
*
* @api
*/
public function getFiles()
{
......@@ -104,8 +92,6 @@ public function getFiles()
* Gets the request cookies.
*
* @return array The request cookies
*
* @api
*/
public function getCookies()
{
......@@ -116,8 +102,6 @@ public function getCookies()
* Gets the request server parameters.
*
* @return array The request server parameters
*
* @api
*/
public function getServer()
{
......@@ -128,8 +112,6 @@ public function getServer()
* Gets the request raw body data.
*
* @return string The request raw body data.
*
* @api
*/
public function getContent()
{
......
......@@ -15,8 +15,6 @@
* Response object.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
class Response
{
......@@ -33,8 +31,6 @@ class Response
* @param string $content The content of the response
* @param int $status The response status code
* @param array $headers An array of headers
*
* @api
*/
public function __construct($content = '', $status = 200, array $headers = array())
{
......@@ -81,8 +77,6 @@ protected function buildHeader($name, $value)
* Gets the response content.
*
* @return string The response content
*
* @api
*/
public function getContent()
{
......@@ -93,8 +87,6 @@ public function getContent()
* Gets the response status code.
*
* @return int The response status code
*
* @api
*/
public function getStatus()
{
......@@ -105,8 +97,6 @@ public function getStatus()
* Gets the response headers.
*
* @return array The response headers
*
* @api
*/
public function getHeaders()
{
......
......@@ -20,8 +20,7 @@
"symfony/dom-crawler": "~2.0,>=2.0.5"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"symfony/process": "~2.0,>=2.0.5",
"symfony/process": "~2.3.34|~2.7,>=2.7.6",
"symfony/css-selector": "~2.0,>=2.0.5"
},
"suggest": {
......
......@@ -44,8 +44,6 @@
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Kris Wallsmith <kris@symfony.com>
*
* @api
*/
class ApcClassLoader
{
......@@ -66,8 +64,6 @@ class ApcClassLoader
*
* @throws \RuntimeException
* @throws \InvalidArgumentException
*
* @api
*/
public function __construct($prefix, $decorated)
{
......
......@@ -60,8 +60,6 @@
* @author Fabien Potencier <fabien@symfony.com>
* @author Kris Wallsmith <kris@symfony.com>
*
* @api
*
* @deprecated since version 2.4, to be removed in 3.0.
* Use the {@link ClassLoader} class instead.
*/
......@@ -75,8 +73,6 @@ class ApcUniversalClassLoader extends UniversalClassLoader
* @param string $prefix A prefix to create a namespace in APC
*
* @throws \RuntimeException
*
* @api
*/
public function __construct($prefix)
{
......
......@@ -283,7 +283,7 @@ private static function getClassHierarchy(\ReflectionClass $class)
$traits = array();
if (function_exists('get_declared_traits')) {
if (method_exists('ReflectionClass', 'getTraits')) {
foreach ($classes as $c) {
foreach (self::resolveDependencies(self::computeTraitDeps($c), $c) as $trait) {
if ($trait !== $c) {
......
......@@ -91,12 +91,16 @@ public function addPrefix($prefix, $paths)
return;
}
if (isset($this->prefixes[$prefix])) {
$this->prefixes[$prefix] = array_merge(
$this->prefixes[$prefix],
(array) $paths
);
if (is_array($paths)) {
$this->prefixes[$prefix] = array_unique(array_merge(
$this->prefixes[$prefix],
$paths
));
} elseif (!in_array($paths, $this->prefixes[$prefix])) {
$this->prefixes[$prefix][] = $paths;
}
} else {
$this->prefixes[$prefix] = (array) $paths;
$this->prefixes[$prefix] = array_unique((array) $paths);
}
}
......
......@@ -23,8 +23,6 @@
* @author Fabien Potencier <fabien@symfony.com>
* @author Christophe Coevoet <stof@notk.org>
*
* @api
*
* @deprecated since version 2.4, to be removed in 3.0.
* Use {@link \Symfony\Component\Debug\DebugClassLoader} instead.
*/
......@@ -36,8 +34,6 @@ class DebugClassLoader
* Constructor.
*
* @param object $classFinder
*
* @api
*/
public function __construct($classFinder)
{
......
......@@ -58,8 +58,6 @@
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*
* @deprecated since version 2.4, to be removed in 3.0.
* Use the {@link ClassLoader} class instead.
*/
......@@ -137,8 +135,6 @@ public function getPrefixFallbacks()
* Registers the directory to use as a fallback for namespaces.
*
* @param array $dirs An array of directories
*
* @api
*/
public function registerNamespaceFallbacks(array $dirs)
{
......@@ -159,8 +155,6 @@ public function registerNamespaceFallback($dir)
* Registers directories to use as a fallback for class prefixes.
*
* @param array $dirs An array of directories
*
* @api
*/
public function registerPrefixFallbacks(array $dirs)
{
......@@ -181,8 +175,6 @@ public function registerPrefixFallback($dir)
* Registers an array of namespaces.
*
* @param array $namespaces An array of namespaces (namespaces as keys and locations as values)
*
* @api
*/
public function registerNamespaces(array $namespaces)
{
......@@ -196,8 +188,6 @@ public function registerNamespaces(array $namespaces)
*
* @param string $namespace The namespace
* @param array|string $paths The location(s) of the namespace
*
* @api
*/
public function registerNamespace($namespace, $paths)
{
......@@ -208,8 +198,6 @@ public function registerNamespace($namespace, $paths)
* Registers an array of classes using the PEAR naming convention.
*
* @param array $classes An array of classes (prefixes as keys and locations as values)
*
* @api
*/
public function registerPrefixes(array $classes)
{
......@@ -223,8 +211,6 @@ public function registerPrefixes(array $classes)
*
* @param string $prefix The classes prefix
* @param array|string $paths The location(s) of the classes
*
* @api