Skip to content

Commit

Permalink
Merge branch '2.5'
Browse files Browse the repository at this point in the history
* 2.5:
  [Validator] Remove property and method targets from the optional and required constraints.
  fixed CHANGELOG for 2.5
  bumped Symfony version to 2.5.0
  updated VERSION for 2.5.0-RC1
  updated CHANGELOG for 2.5.0-RC1
  [DomCrawler] Fixed charset detection in html5 meta charset tag
  • Loading branch information
fabpot committed May 31, 2014
2 parents 76ccb28 + af10b10 commit 5c78260
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 3 deletions.
48 changes: 48 additions & 0 deletions CHANGELOG-2.5.md
Expand Up @@ -7,6 +7,54 @@ in 2.5 minor versions.
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.5.0...v2.5.1

* 2.5.0-RC1 (2014-05-28)

* bug #10979 Make rootPath part of regex greedy (artursvonda)
* bug #10995 [TwigBridge][Trans]set %count% only on transChoice from the current context. (aitboudad)
* bug #10989 [Debug] throw even in stacking mode to preserve code paths (nicolas-grekas)
* bug #10987 [DomCrawler] Fixed a forgotten case of complex XPath queries (stof)
* feature #10930 [Process] Deprecate using values that are not string for Process::setStdin and ProcessBuilder::setInput (romainneutron)
* bug #10971 [Process] Fix conflicts between latest 2.3 fix and 2.5 deprecation (romainneutron)
* feature #10932 [Process] Deprecate Process::setStdin in favor of Process::setInput (romainneutron)
* bug #10849 [WIP][Finder] Fix wrong implementation on sortable callback comparator (ProPheT777)
* bug #10929 [Process] Add validation on Process input (romainneutron)
* bug #10946 [PropertyAccess] Fixed getValue() when accessing non-existing indices of ArrayAccess implementations (webmozart)
* bug #10958 [DomCrawler] Fixed filterXPath() chaining loosing the parent DOM nodes (stof, robbertkl)
* bug #10953 [HttpKernel] fixed file uploads in functional tests without file selected (realmfoo)
* feature #10941 [Debug] cleanup interfaces before 2.5-final (nicolas-grekas)
* bug #10947 [PropertyAccess] Fixed getValue() when accessing non-existing indices of ArrayAccess implementations (webmozart)
* bug #10937 [HttpKernel] Fix "absolute path" when we look to the cache directory (BenoitLeveque)
* bug #10933 Changed the default value of checkbox and radio to match the HTML spec (stof)
* bug #10927 [DomCrawler] Changed typehints form DomNode to DomElement (stof)
* bug #10894 [HttpKernel] removed absolute paths from the generated container (fabpot)
* bug #10926 [DomCrawler] Fixed the initial state for options without value attribute (stof)
* bug #10925 [DomCrawler] Fixed the handling of boolean attributes in ChoiceFormField (stof)
* feature #10882 Fix issue #10867 (umpirsky)
* bug #10902 [Yaml] Fixed YAML Parser does not ignore duplicate keys, violating YAML spec. (sun)
* feature #10912 [Form] Added support for injecting HttpFoundation's Request in ServerParams for the Validator extension (csarrazi)
* bug #10777 [Form] Automatically add step attribute to HTML5 time widgets to display seconds if needed (tucksaun)
* bug #10909 [PropertyAccess] Fixed plurals for -ves words (csarrazi)
* bug #10904 [HttpKernel] Replace sha1 with sha256 in recently added tests (jakzal)
* bug #10899 Explicitly define the encoding. (jakzal)
* bug #10897 [Console] Fix a console test (jakzal)
* bug #10896 [HttpKernel] Fixed cache behavior when TTL has expired and a default "global" TTL is defined (alquerci, fabpot)
* bug #10841 [DomCrawler] Fixed image input case sensitive (geoffrey-brier)
* bug #10714 [Console]Improve formatter for double-width character (denkiryokuhatsuden)
* bug #10872 [Form] Fixed TrimListenerTest as of PHP 5.5 (webmozart)
* feature #10880 [DependencyInjection] GraphvizDumper now displays unresolved parameters (rosstuck)
* bug #10876 [Console] Make `Helper\Table::setStyle()` chainable again (stloyd)
* bug #10762 [BrowserKit] Allow URLs that don't contain a path when creating a cookie from a string (thewilkybarkid)
* bug #10861 [Debug] enhance perf of DebugClassLoader (nicolas-grekas)
* bug #10863 [Security] Add check for supported attributes in AclVoter (artursvonda)
* bug #10854 [Debug] fix handling deprecated warnings and stacked errors turned into exceptions (nicolas-grekas)
* feature #10843 [TwigBridge] Added compile-time issues checking in twig:lint command (maxromanovsky)
* feature #10829 Fix issue 9172 (umpirsky)
* bug #10833 [TwigBridge][Transchoice] set %count% from the current context. (aitboudad)
* bug #10820 [WebProfilerBundle] Fixed profiler seach/homepage with empty token (tucksaun)
* bug #10809 Fixed composer to include config component for mocks in phpunit (jpauli)
* bug #10815 Fixed issue #5427 (umpirsky)
* bug #10817 [Debug] fix #10313: FlattenException not found (nicolas-grekas)

* 2.5.0-BETA2 (2014-04-29)

* bug #10803 [Debug] fix ErrorHandlerTest when context is not an array (nicolas-grekas)
Expand Down
4 changes: 3 additions & 1 deletion src/Symfony/Component/DomCrawler/Crawler.php
Expand Up @@ -118,8 +118,10 @@ public function addContent($content, $type = null)
}
}

// http://www.w3.org/TR/encoding/#encodings
// http://www.w3.org/TR/REC-xml/#NT-EncName
if (null === $charset &&
preg_match('/\<meta[^\>]+charset *= *["\']?([a-zA-Z\-0-9]+)/i', $content, $matches)) {
preg_match('/\<meta[^\>]+charset *= *["\']?([a-zA-Z\-0-9_:.]+)/i', $content, $matches)) {
$charset = $matches[1];
}

Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php
Expand Up @@ -233,6 +233,10 @@ public function testAddContent()
$crawler = new Crawler();
$crawler->addContent('<html><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><span>中文</span></html>');
$this->assertEquals('中文', $crawler->filterXPath('//span')->text(), '->addContent() guess wrong charset');

$crawler = new Crawler();
$crawler->addContent(mb_convert_encoding('<html><head><meta charset="Shift_JIS"></head><body>日本語</body></html>', 'SJIS', 'UTF-8'));
$this->assertEquals('日本語', $crawler->filterXPath('//body')->text(), '->addContent() can recognize "Shift_JIS" in html5 meta charset tag');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Validator/Constraints/Optional.php
Expand Up @@ -13,7 +13,7 @@

/**
* @Annotation
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
* @Target({"ANNOTATION"})
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Validator/Constraints/Required.php
Expand Up @@ -13,7 +13,7 @@

/**
* @Annotation
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
* @Target({"ANNOTATION"})
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
Expand Down

0 comments on commit 5c78260

Please sign in to comment.