8000 merged 2.0 · symfony/symfony@76ef8da · GitHub
[go: up one dir, main page]

Skip to content

Commit 76ef8da

Browse files
committed
merged 2.0
2 parents 66090ff + bd11281 commit 76ef8da

File tree

14 files changed

+54
-23
lines changed

14 files changed

+54
-23
lines changed

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
],
1818
"require": {
1919
"php": ">=5.3.2",
20-
"doctrine/common": "2.2.*",
2120
"twig/twig": ">=1.1,<2.0-dev"
2221
},
2322
"replace": {

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Symfony\Component\DependencyInjection\Reference;
1818
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
1919
use Symfony\Component\Config\Resource\FileResource;
20+
use Symfony\Component\Config\Resource\DirectoryResource;
2021
use Symfony\Component\Finder\Finder;
2122
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
2223
use Symfony\Component\Config\FileLocator;
@@ -544,13 +545,17 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
544545

545546
// Register translation resources
546547
if ($dirs) {
548+
foreach ($dirs as $dir) {
549+
$container->addResource(new DirectoryResource($dir));
550+
}
547551
$finder = Finder::create()
548552
->files()
549553
->filter(function (\SplFileInfo $file) {
550554
return 2 === substr_count($file->getBasename(), '.') && preg_match('/\.\w+$/', $file->getBasename());
551555
})
552556
->in($dirs)
553557
;
558+
554559
foreach ($finder as $file) {
555560
// filename is domain.locale.format
556561
list($domain, $locale, $format) = explode('.', $file->getBasename(), 3);

src/Symfony/Bundle/FrameworkBundle/HttpKernel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,14 @@ public function generateInternalUri($controller, array $attributes = array(), ar
208208
return $controller;
209209
}
210210

211-
$path = http_build_query($attributes);
211+
$path = http_build_query($attributes, '', '&');
212212
$uri = $this->container->get('router')->generate($secure ? '_internal' : '_internal_public', array(
213213
'controller' => $controller,
214214
'path' => $path ?: 'none',
215215
'_format' => $this->container->get('request')->getRequestFormat(),
216216
));
217217

218-
if ($queryString = http_build_query($query)) {
218+
if ($queryString = http_build_query($query, '', '&')) {
219219
$uri .= '?'.$queryString;
220220
}
221221

src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ public function __construct($prefix)
8484
* Finds a file by class name while caching lookups to APC.
8585
*
8686
* @param string $class A class name to resolve to file
87+
*
88+
* @return string|null The path, if found
8789
*/
8890
public function findFile($class)
8991
{

src/Symfony/Component/ClassLoader/ClassCollectionLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ static public function fixNamespaceDeclarations($source)
172172
/**
173173
* Writes a cache file.
174174
*
175-
* @param string $file Filename
175+
* @param string $file Filename
176176
* @param string $content Temporary file content
177177
*
178178
* @throws \RuntimeException when a cache file cannot be written

src/Symfony/Component/ClassLoader/UniversalClassLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ public function registerPrefixes(array $classes)
216216
/**
217217
* Registers a set of classes using the PEAR naming convention.
218218
*
219-
* @param string $prefix The classes prefix
220-
* @param array|string $paths The location(s) of the classes
219+
* @param string $prefix The classes prefix
220+
* @param array|string $paths The location(s) of the classes
221221
*
222222
* @api
223223
*/

src/Symfony/Component/DomCrawler/Crawler.php

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ public function filter($selector)
543543
/**
544544
* Selects links by name or alt value for clickable images.
545545
*
546-
* @param string $value The link text
546+
* @param string $value The link text
547547
*
548548
* @return Crawler A new instance of Crawler with the filtered list of nodes
549549
*
@@ -560,7 +560,7 @@ public function selectLink($value)
560560
/**
561561
* Selects a button by name or alt value for images.
562562
*
563-
* @param string $value The button text
563+
* @param string $value The button text
564564
*
565565
* @return Crawler A new instance of Crawler with the filtered list of nodes
566566
*
@@ -578,7 +578,7 @@ public function selectButton($value)
578578
/**
579579
* Returns a Link object for the first node in the list.
580580
*
581-
* @param string $method The method for the link (get by default)
581+
* @param string $method The method for the link (get by default)
582582
*
583583
* @return Link A Link instance
584584
*
@@ -617,8 +617,8 @@ public function links()
617617
/**
618618
* Returns a Form object for the first node in the list.
619619
*
620-
* @param array $values An array of values for the form fields
621-
* @param string $method The method for the form
620+
* @param array $values An array of values for the form fields
621+
* @param string $method The method for the form
622622
*
623623
* @return Form A Form instance
624624
*
@@ -641,6 +641,28 @@ public function form(array $values = null, $method = null)
641641
return $form;
642642
}
643643

644+
/**
645+
* Converts string for XPath expressions.
646+
*
647+
* Escaped characters are: quotes (") and apostrophe (').
648+
*
649+
* Examples:
650+
* <code>
651+
* echo Crawler::xpathLiteral('foo " bar');
652+
* //prints 'foo " bar'
653+
*
654+
* echo Crawler::xpathLiteral("foo ' bar");
655+
* //prints "foo ' bar"
656+
*
657+
* echo Crawler::xpathLiteral('a\'b"c');
658+
* //prints concat('a', "'", 'b"c')
659+
* </code>
660+
*
661+
* @param string $s String to be escaped
662+
*
663+
* @return string Converted string
664+
*
665+
*/
644666
static public function xpathLiteral($s)
645667
{
646668
if (false === strpos($s, "'")) {

src/Symfony/Component/DomCrawler/Form.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public function getFiles()
142142
*/
143143
public function getPhpValues()
144144
{
145-
$qs = http_build_query($this->getValues());
145+
$qs = http_build_query($this->getValues(), '', '&');
146146
parse_str($qs, $values);
147147

148148
return $values;
@@ -160,7 +160,7 @@ public function getPhpValues()
160160
*/
161161
public function getPhpFiles()
162162
{
163-
$qs = http_build_query($this->getFiles());
163+
$qs = http_build_query($this->getFiles(), '', '&');
164164
parse_str($qs, $values);
165165

166166
return $values;

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,9 +659,9 @@ public function getPort()
659659
{
660660
if (self::$trustProxy && $this->headers->has('X-Forwarded-Port')) {
661661
return $this->headers->get('X-Forwarded-Port');
662-
} else {
663-
return $this->server->get('SERVER_PORT');
664662
}
663+
664+
return $this->server->get('SERVER_PORT');
665665
}
666666

667667
/**

src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class ErrorHandler
2626
E_USER_NOTICE => 'User Notice',
2727
E_STRICT => 'Runtime Notice',
2828
E_RECOVERABLE_ERROR => 'Catchable Fatal Error',
29+
E_DEPRECATED => 'Deprecated',
30+
E_USER_DEPRECATED => 'User Deprecated',
2931
);
3032

3133
private $level;

0 commit comments

Comments
 (0)
0