Browse Source

uppgrade 2.0.12 to 2.0.13

Sevajol Bastien 11 years ago
parent
commit
43ed0c3c0e
100 changed files with 1552 additions and 611 deletions
  1. 1 1
      app/bootstrap.php.cache
  2. 3 3
      deps
  3. 6 6
      deps.lock
  4. 4 0
      vendor/bundles/Sensio/Bundle/FrameworkExtraBundle/Request/ParamConverter/DoctrineParamConverter.php
  5. 10 0
      vendor/swiftmailer/CHANGES
  6. 1 1
      vendor/swiftmailer/VERSION
  7. 1 1
      vendor/swiftmailer/composer.json
  8. 11 15
      vendor/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php
  9. 11 11
      vendor/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php
  10. 43 43
      vendor/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php
  11. 36 21
      vendor/swiftmailer/lib/classes/Swift/CharacterReaderFactory/SimpleCharacterReaderFactory.php
  12. 42 4
      vendor/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php
  13. 1 7
      vendor/swiftmailer/lib/classes/Swift/Events/SendEvent.php
  14. 20 2
      vendor/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php
  15. 74 59
      vendor/swiftmailer/lib/classes/Swift/Mime/Grammar.php
  16. 4 2
      vendor/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php
  17. 3 3
      vendor/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php
  18. 1 1
      vendor/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php
  19. 10 11
      vendor/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php
  20. 1 2
      vendor/swiftmailer/lib/classes/Swift/Plugins/DecoratorPlugin.php
  21. 1 1
      vendor/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php
  22. 1 1
      vendor/swiftmailer/lib/classes/Swift/Transport/LoadBalancedTransport.php
  23. 3 3
      vendor/swiftmailer/lib/preferences.php
  24. 41 0
      vendor/symfony/CHANGELOG-2.0.md
  25. 172 134
      vendor/symfony/CONTRIBUTORS.md
  26. 1 1
      vendor/symfony/composer.json
  27. 12 2
      vendor/symfony/src/Symfony/Bridge/Monolog/Processor/WebProcessor.php
  28. 1 1
      vendor/symfony/src/Symfony/Bridge/Twig/Extension/YamlExtension.php
  29. 3 1
      vendor/symfony/src/Symfony/Bundle/DoctrineBundle/Registry.php
  30. 8 1
      vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php
  31. 1 1
      vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventDispatcher.php
  32. 4 0
      vendor/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
  33. 3 2
      vendor/symfony/src/Symfony/Bundle/FrameworkBundle/HttpKernel.php
  34. 171 0
      vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.hr.xliff
  35. 1 1
      vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.nl.xliff
  36. 11 4
      vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php
  37. 22 0
      vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Debug/TraceableEventDispatcherTest.php
  38. 1 1
      vendor/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php
  39. 1 1
      vendor/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpDigestFactory.php
  40. 1 1
      vendor/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/container1.php
  41. 1 1
      vendor/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/container1.xml
  42. 2 1
      vendor/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml
  43. 7 5
      vendor/symfony/src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php
  44. 1 0
      vendor/symfony/src/Symfony/Bundle/TwigBundle/Resources/config/schema/twig-1.0.xsd
  45. 1 1
      vendor/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php
  46. 2 0
      vendor/symfony/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php
  47. 1 1
      vendor/symfony/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php
  48. 2 2
      vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php
  49. 39 4
      vendor/symfony/src/Symfony/Component/Console/Application.php
  50. 21 1
      vendor/symfony/src/Symfony/Component/Console/Output/ConsoleOutput.php
  51. 11 3
      vendor/symfony/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php
  52. 35 8
      vendor/symfony/src/Symfony/Component/DomCrawler/Crawler.php
  53. 13 6
      vendor/symfony/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php
  54. 23 0
      vendor/symfony/src/Symfony/Component/DomCrawler/Field/FormField.php
  55. 10 4
      vendor/symfony/src/Symfony/Component/DomCrawler/Form.php
  56. 23 2
      vendor/symfony/src/Symfony/Component/DomCrawler/Link.php
  57. 1 1
      vendor/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php
  58. 4 1
      vendor/symfony/src/Symfony/Component/Finder/Comparator/DateComparator.php
  59. 2 2
      vendor/symfony/src/Symfony/Component/HttpFoundation/ParameterBag.php
  60. 2 2
      vendor/symfony/src/Symfony/Component/HttpFoundation/Request.php
  61. 1 1
      vendor/symfony/src/Symfony/Component/HttpFoundation/ServerBag.php
  62. 2 0
      vendor/symfony/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php
  63. 1 0
      vendor/symfony/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php
  64. 38 15
      vendor/symfony/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php
  65. 2 2
      vendor/symfony/src/Symfony/Component/HttpKernel/HttpCache/Store.php
  66. 1 1
      vendor/symfony/src/Symfony/Component/HttpKernel/Kernel.php
  67. 1 1
      vendor/symfony/src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php
  68. 19 3
      vendor/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php
  69. 2 2
      vendor/symfony/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php
  70. 1 1
      vendor/symfony/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php
  71. 2 12
      vendor/symfony/src/Symfony/Component/Locale/Stub/StubCollator.php
  72. 30 18
      vendor/symfony/src/Symfony/Component/Locale/Stub/StubIntl.php
  73. 50 17
      vendor/symfony/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php
  74. 1 1
      vendor/symfony/src/Symfony/Component/Locale/Stub/StubLocale.php
  75. 48 41
      vendor/symfony/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php
  76. 1 1
      vendor/symfony/src/Symfony/Component/Routing/Generator/UrlGenerator.php
  77. 44 3
      vendor/symfony/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php
  78. 2 2
      vendor/symfony/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php
  79. 1 1
      vendor/symfony/src/Symfony/Component/Routing/RouteCollection.php
  80. 43 24
      vendor/symfony/src/Symfony/Component/Routing/RouteCompiler.php
  81. 2 2
      vendor/symfony/src/Symfony/Component/Security/Http/Firewall/ContextListener.php
  82. 3 3
      vendor/symfony/src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php
  83. 2 2
      vendor/symfony/src/Symfony/Component/Translation/README.md
  84. 5 4
      vendor/symfony/src/Symfony/Component/Validator/README.md
  85. 13 1
      vendor/symfony/tests/Symfony/Tests/Bridge/Monolog/Processor/WebProcessorTest.php
  86. 17 2
      vendor/symfony/tests/Symfony/Tests/Component/Console/ApplicationTest.php
  87. 9 0
      vendor/symfony/tests/Symfony/Tests/Component/Console/Fixtures/application_renderexception4.txt
  88. 6 0
      vendor/symfony/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/badtag3.yml
  89. 1 0
      vendor/symfony/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/services6.yml
  90. 15 3
      vendor/symfony/tests/Symfony/Tests/Component/DependencyInjection/Loader/YamlFileLoaderTest.php
  91. 4 1
      vendor/symfony/tests/Symfony/Tests/Component/EventDispatcher/EventDispatcherTest.php
  92. 3 2
      vendor/symfony/tests/Symfony/Tests/Component/Locale/Stub/StubCollatorTest.php
  93. 109 32
      vendor/symfony/tests/Symfony/Tests/Component/Locale/Stub/StubIntlDateFormatterTest.php
  94. 49 0
      vendor/symfony/tests/Symfony/Tests/Component/Locale/Stub/StubIntlTest.php
  95. 46 5
      vendor/symfony/tests/Symfony/Tests/Component/Locale/Stub/StubNumberFormatterTest.php
  96. 5 0
      vendor/symfony/tests/Symfony/Tests/Component/Locale/TestCase.php
  97. 4 0
      vendor/symfony/tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher1.apache
  98. 19 14
      vendor/symfony/tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher1.php
  99. 7 0
      vendor/symfony/tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher2.apache
  100. 0 0
      vendor/symfony/tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher2.php

+ 1 - 1
app/bootstrap.php.cache View File

@@ -456,7 +456,7 @@ abstract class Kernel implements KernelInterface
456 456
     protected $startTime;
457 457
     protected $classes;
458 458
 
459
-    const VERSION = '2.0.12';
459
+    const VERSION = '2.0.13';
460 460
 
461 461
     
462 462
     public function __construct($environment, $debug)

+ 3 - 3
deps View File

@@ -1,10 +1,10 @@
1 1
 [symfony]
2 2
     git=http://github.com/symfony/symfony.git
3
-    version=v2.0.12
3
+    version=v2.0.13
4 4
 
5 5
 [twig]
6 6
     git=http://github.com/fabpot/Twig.git
7
-    version=v1.6.2
7
+    version=v1.7.0
8 8
 
9 9
 [monolog]
10 10
     git=http://github.com/Seldaek/monolog.git
@@ -24,7 +24,7 @@
24 24
 
25 25
 [swiftmailer]
26 26
     git=http://github.com/swiftmailer/swiftmailer.git
27
-    version=v4.1.5
27
+    version=v4.1.7
28 28
 
29 29
 [assetic]
30 30
     git=http://github.com/kriswallsmith/assetic.git

+ 6 - 6
deps.lock View File

@@ -1,15 +1,15 @@
1
-symfony v2.0.12
2
-twig v1.6.2
1
+symfony v2.0.13
2
+twig v1.7.0
3 3
 monolog 1.0.2
4 4
 doctrine-common 2.1.4
5 5
 doctrine-dbal 2.1.6
6 6
 doctrine 2.1.6
7
-swiftmailer v4.1.5
7
+swiftmailer v4.1.7
8 8
 assetic v1.0.3
9
-twig-extensions 1dfff8e793f50f651c4f74f796c2c68a4aee3147
9
+twig-extensions 446d870272cd87a720e95242eade38a2acf56eaa
10 10
 metadata 1.0.0
11
-SensioFrameworkExtraBundle 638f545b7020b9e9d5944a7e3167f60ed848250d
12
-JMSSecurityExtraBundle 541a4c242328dc04b99540c75346cc74a7c0cfb5
11
+SensioFrameworkExtraBundle cb61b92ed55241d93ed9726bc3f5f47c7d2ce8fe
12
+JMSSecurityExtraBundle e752f888c51425f71382c056961f10f2be642102
13 13
 SensioDistributionBundle 20b66a408084ad8752f98e50f10533f5245310bf
14 14
 SensioGeneratorBundle b1ccb78c1743f30817b0fce9bb5c6baff6ed7bf8
15 15
 AsseticBundle v1.0.1

+ 4 - 0
vendor/bundles/Sensio/Bundle/FrameworkExtraBundle/Request/ParamConverter/DoctrineParamConverter.php View File

@@ -91,6 +91,10 @@ class DoctrineParamConverter implements ParamConverterInterface
91 91
 
92 92
         $options = $this->getOptions($configuration);
93 93
 
94
+        if (false === isset($options['entity_manager'])) { 
95
+            return false; 
96
+        }
97
+
94 98
         // Doctrine Entity?
95 99
         try {
96 100
             $this->registry->getEntityManager($options['entity_manager'])->getClassMetadata($configuration->getClass());

+ 10 - 0
vendor/swiftmailer/CHANGES View File

@@ -1,6 +1,16 @@
1 1
 Changelog since Version 4.1.x
2 2
 =============================
3 3
 
4
+4.1.7 (2012-04-26)
5
+------------------
6
+
7
+ * fixed QpEncoder safeMapShareId property
8
+
9
+4.1.6 (2012-03-23)
10
+------------------
11
+
12
+ * reduced the size of serialized Messages
13
+
4 14
 4.1.5 (2012-01-04)
5 15
 ------------------
6 16
 

+ 1 - 1
vendor/swiftmailer/VERSION View File

@@ -1 +1 @@
1
-Swift-4.1.5
1
+Swift-4.1.7

+ 1 - 1
vendor/swiftmailer/composer.json View File

@@ -4,7 +4,7 @@
4 4
     "description": "Swiftmailer, free feature-rich PHP mailer",
5 5
     "keywords": ["mail","mailer"],
6 6
     "homepage": "http://swiftmailer.org",
7
-    "version": "4.1.5",
7
+    "version": "4.1.7",
8 8
     "license": "LGPL",
9 9
     "authors": [
10 10
         {

+ 11 - 15
vendor/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php View File

@@ -19,14 +19,13 @@
19 19
 class Swift_CharacterReader_GenericFixedWidthReader
20 20
   implements Swift_CharacterReader
21 21
 {
22
-   
23 22
   /**
24 23
    * The number of bytes in a single character.
25 24
    * @var int
26 25
    * @access private
27 26
    */
28 27
   private $_width;
29
-	
28
+
30 29
   /**
31 30
    * Creates a new GenericFixedWidthReader using $width bytes per character.
32 31
    * @param int $width
@@ -47,13 +46,13 @@ class Swift_CharacterReader_GenericFixedWidthReader
47 46
    */
48 47
   public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars)
49 48
   {
50
-  	$strlen = strlen($string);
51
-  	// % and / are CPU intensive, so, maybe find a better way
52
-  	$ignored = $strlen%$this->_width;
53
-  	$ignoredChars = substr($string, - $ignored);
54
-  	$currentMap = $this->_width;
55
-  	return ($strlen - $ignored)/$this->_width;
56
-  	
49
+    $strlen = strlen($string);
50
+    // % and / are CPU intensive, so, maybe find a better way
51
+    $ignored = $strlen%$this->_width;
52
+    $ignoredChars = substr($string, - $ignored);
53
+    $currentMap = $this->_width;
54
+
55
+    return ($strlen - $ignored)/$this->_width;
57 56
   }
58 57
   
59 58
   /**
@@ -62,7 +61,7 @@ class Swift_CharacterReader_GenericFixedWidthReader
62 61
    */
63 62
   public function getMapType()
64 63
   {
65
-  	return self::MAP_TYPE_FIXED_LEN;
64
+    return self::MAP_TYPE_FIXED_LEN;
66 65
   }
67 66
 
68 67
   /**
@@ -77,10 +76,8 @@ class Swift_CharacterReader_GenericFixedWidthReader
77 76
   public function validateByteSequence($bytes, $size)
78 77
   {
79 78
     $needed = $this->_width - $size;
80
-    return ($needed > -1)
81
-      ? $needed
82
-      : -1
83
-      ;
79
+
80
+    return ($needed > -1) ? $needed : -1;
84 81
   }
85 82
 
86 83
   /**
@@ -91,5 +88,4 @@ class Swift_CharacterReader_GenericFixedWidthReader
91 88
   {
92 89
     return $this->_width;
93 90
   }
94
-
95 91
 }

+ 11 - 11
vendor/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php View File

@@ -27,16 +27,16 @@ class Swift_CharacterReader_UsAsciiReader
27 27
    */
28 28
   public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars)
29 29
   {
30
-  	$strlen=strlen($string);
31
-  	$ignoredChars='';
32
-  	for( $i = 0; $i < $strlen; ++$i)
33
-  	{
34
-  	  if ($string[$i]>"\x07F")
35
-  	  { // Invalid char
36
-  	  	$currentMap[$i+$startOffset]=$string[$i];
37
-  	  }
38
-  	}
39
-  	return $strlen;
30
+    $strlen=strlen($string);
31
+    $ignoredChars='';
32
+    for( $i = 0; $i < $strlen; ++$i)
33
+    {
34
+      if ($string[$i]>"\x07F")
35
+      { // Invalid char
36
+        $currentMap[$i+$startOffset]=$string[$i];
37
+      }
38
+    }
39
+    return $strlen;
40 40
   }
41 41
   
42 42
   /**
@@ -45,7 +45,7 @@ class Swift_CharacterReader_UsAsciiReader
45 45
    */
46 46
   public function getMapType()
47 47
   {
48
-  	return self::MAP_TYPE_INVALID;
48
+    return self::MAP_TYPE_INVALID;
49 49
   }
50 50
  
51 51
   /**

+ 43 - 43
vendor/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php View File

@@ -85,40 +85,40 @@ class Swift_CharacterReader_Utf8Reader
85 85
    */
86 86
   public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars)
87 87
   {
88
-  	if (!isset($currentMap['i']) || !isset($currentMap['p']))
89
-  	{
90
-  	  $currentMap['p'] = $currentMap['i'] = array();
91
-   	}
92
-  	$strlen=strlen($string);
93
-  	$charPos=count($currentMap['p']);
94
-  	$foundChars=0;
95
-  	$invalid=false;
96
-  	for ($i=0; $i<$strlen; ++$i)
97
-  	{
98
-  	  $char=$string[$i];
99
-  	  $size=self::$s_length_map[$char];
100
-  	  if ($size==0)
101
-  	  {
102
-  	    /* char is invalid, we must wait for a resync */
103
-  	  	$invalid=true;
104
-  	  	continue;
105
-   	  }
106
-   	  else
107
-   	  {
108
-   	  	if ($invalid==true)
109
-   	  	{
110
-   	  	  /* We mark the chars as invalid and start a new char */
111
-   	  	  $currentMap['p'][$charPos+$foundChars]=$startOffset+$i;
112
-   	      $currentMap['i'][$charPos+$foundChars]=true;
113
-   	      ++$foundChars;
114
-   	      $invalid=false;
115
-   	  	}
116
-   	  	if (($i+$size) > $strlen){
117
-   	  		$ignoredChars=substr($string, $i);
118
-   	  		break;
119
-   	  	}
120
-   	  	for ($j=1; $j<$size; ++$j)
121
-   	  	{
88
+    if (!isset($currentMap['i']) || !isset($currentMap['p']))
89
+    {
90
+      $currentMap['p'] = $currentMap['i'] = array();
91
+     }
92
+    $strlen=strlen($string);
93
+    $charPos=count($currentMap['p']);
94
+    $foundChars=0;
95
+    $invalid=false;
96
+    for ($i=0; $i<$strlen; ++$i)
97
+    {
98
+      $char=$string[$i];
99
+      $size=self::$s_length_map[$char];
100
+      if ($size==0)
101
+      {
102
+        /* char is invalid, we must wait for a resync */
103
+        $invalid=true;
104
+        continue;
105
+       }
106
+       else
107
+       {
108
+         if ($invalid==true)
109
+         {
110
+           /* We mark the chars as invalid and start a new char */
111
+           $currentMap['p'][$charPos+$foundChars]=$startOffset+$i;
112
+           $currentMap['i'][$charPos+$foundChars]=true;
113
+           ++$foundChars;
114
+           $invalid=false;
115
+         }
116
+         if (($i+$size) > $strlen){
117
+           $ignoredChars=substr($string, $i);
118
+           break;
119
+         }
120
+         for ($j=1; $j<$size; ++$j)
121
+         {
122 122
           $char=$string[$i+$j];
123 123
           if ($char>"\x7F" && $char<"\xC0")
124 124
           {
@@ -130,14 +130,14 @@ class Swift_CharacterReader_Utf8Reader
130 130
             $invalid=true;
131 131
             continue 2;
132 132
           }
133
-   	  	}
134
-   	  	/* Ok we got a complete char here */
135
-   	  	$lastChar=$currentMap['p'][$charPos+$foundChars]=$startOffset+$i+$size;
136
-   	  	$i+=$j-1;
137
-   	    ++$foundChars;
138
-   	  }
139
-  	}
140
-  	return $foundChars;
133
+         }
134
+         /* Ok we got a complete char here */
135
+         $currentMap['p'][$charPos+$foundChars]=$startOffset+$i+$size;
136
+         $i+=$j-1;
137
+         ++$foundChars;
138
+       }
139
+    }
140
+    return $foundChars;
141 141
   }
142 142
   
143 143
   /**
@@ -146,7 +146,7 @@ class Swift_CharacterReader_Utf8Reader
146 146
    */
147 147
   public function getMapType()
148 148
   {
149
-  	return self::MAP_TYPE_POSITIONS;
149
+    return self::MAP_TYPE_POSITIONS;
150 150
   }
151 151
  
152 152
   /**

+ 36 - 21
vendor/swiftmailer/lib/classes/Swift/CharacterReaderFactory/SimpleCharacterReaderFactory.php View File

@@ -24,20 +24,35 @@ class Swift_CharacterReaderFactory_SimpleCharacterReaderFactory
24 24
    * @var array
25 25
    * @access private
26 26
    */
27
-  private $_map = array();
27
+  private static $_map = array();
28 28
   
29 29
   /**
30 30
    * Factories which have already been loaded.
31 31
    * @var Swift_CharacterReaderFactory[]
32 32
    * @access private
33 33
    */
34
-  private $_loaded = array();
34
+  private static $_loaded = array();
35 35
   
36 36
   /**
37 37
    * Creates a new CharacterReaderFactory.
38 38
    */
39 39
   public function __construct()
40 40
   {
41
+    $this->init();
42
+  }
43
+
44
+  public function __wakeup()
45
+  {
46
+    $this->init();
47
+  }
48
+
49
+  public function init()
50
+  {
51
+    if(count(self::$_map) > 0)
52
+    {
53
+      return;
54
+    }
55
+    
41 56
     $prefix = 'Swift_CharacterReader_';
42 57
     
43 58
     $singleByte = array(
@@ -56,32 +71,32 @@ class Swift_CharacterReaderFactory_SimpleCharacterReaderFactory
56 71
       );
57 72
     
58 73
     //Utf-8
59
-    $this->_map['utf-?8'] = array(
74
+    self::$_map['utf-?8'] = array(
60 75
       'class' => $prefix . 'Utf8Reader',
61 76
       'constructor' => array()
62 77
       );
63 78
     
64 79
     //7-8 bit charsets
65
-    $this->_map['(us-)?ascii'] = $singleByte;
66
-    $this->_map['(iso|iec)-?8859-?[0-9]+'] = $singleByte;
67
-    $this->_map['windows-?125[0-9]'] = $singleByte;
68
-    $this->_map['cp-?[0-9]+'] = $singleByte;
69
-    $this->_map['ansi'] = $singleByte;
70
-    $this->_map['macintosh'] = $singleByte;
71
-    $this->_map['koi-?7'] = $singleByte;
72
-    $this->_map['koi-?8-?.+'] = $singleByte;
73
-    $this->_map['mik'] = $singleByte;
74
-    $this->_map['(cork|t1)'] = $singleByte;
75
-    $this->_map['v?iscii'] = $singleByte;
80
+    self::$_map['(us-)?ascii'] = $singleByte;
81
+    self::$_map['(iso|iec)-?8859-?[0-9]+'] = $singleByte;
82
+    self::$_map['windows-?125[0-9]'] = $singleByte;
83
+    self::$_map['cp-?[0-9]+'] = $singleByte;
84
+    self::$_map['ansi'] = $singleByte;
85
+    self::$_map['macintosh'] = $singleByte;
86
+    self::$_map['koi-?7'] = $singleByte;
87
+    self::$_map['koi-?8-?.+'] = $singleByte;
88
+    self::$_map['mik'] = $singleByte;
89
+    self::$_map['(cork|t1)'] = $singleByte;
90
+    self::$_map['v?iscii'] = $singleByte;
76 91
     
77 92
     //16 bits
78
-    $this->_map['(ucs-?2|utf-?16)'] = $doubleByte;
93
+    self::$_map['(ucs-?2|utf-?16)'] = $doubleByte;
79 94
     
80 95
     //32 bits
81
-    $this->_map['(ucs-?4|utf-?32)'] = $fourBytes;
96
+    self::$_map['(ucs-?4|utf-?32)'] = $fourBytes;
82 97
     
83 98
     //Fallback
84
-    $this->_map['.*'] = $singleByte;
99
+    self::$_map['.*'] = $singleByte;
85 100
   }
86 101
   
87 102
   /**
@@ -92,12 +107,12 @@ class Swift_CharacterReaderFactory_SimpleCharacterReaderFactory
92 107
   public function getReaderFor($charset)
93 108
   {
94 109
     $charset = trim(strtolower($charset));
95
-    foreach ($this->_map as $pattern => $spec)
110
+    foreach (self::$_map as $pattern => $spec)
96 111
     {
97 112
       $re = '/^' . $pattern . '$/D';
98 113
       if (preg_match($re, $charset))
99 114
       {
100
-        if (!array_key_exists($pattern, $this->_loaded))
115
+        if (!array_key_exists($pattern, self::$_loaded))
101 116
         {
102 117
           $reflector = new ReflectionClass($spec['class']);
103 118
           if ($reflector->getConstructor())
@@ -108,9 +123,9 @@ class Swift_CharacterReaderFactory_SimpleCharacterReaderFactory
108 123
           {
109 124
             $reader = $reflector->newInstance();
110 125
           }
111
-          $this->_loaded[$pattern] = $reader;
126
+          self::$_loaded[$pattern] = $reader;
112 127
         }
113
-        return $this->_loaded[$pattern];
128
+        return self::$_loaded[$pattern];
114 129
       }
115 130
     }
116 131
   }

+ 42 - 4
vendor/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php View File

@@ -38,7 +38,7 @@ class Swift_Encoder_QpEncoder implements Swift_Encoder
38 38
    * @var string[]
39 39
    * @access protected
40 40
    */
41
-  protected $_qpMap = array(
41
+  protected static $_qpMap = array(
42 42
     0   => '=00', 1   => '=01', 2   => '=02', 3   => '=03', 4   => '=04',
43 43
     5   => '=05', 6   => '=06', 7   => '=07', 8   => '=08', 9   => '=09',
44 44
     10  => '=0A', 11  => '=0B', 12  => '=0C', 13  => '=0D', 14  => '=0E',
@@ -93,6 +93,8 @@ class Swift_Encoder_QpEncoder implements Swift_Encoder
93 93
     255 => '=FF'
94 94
     );
95 95
 
96
+  protected static $_safeMapShare = array();
97
+
96 98
   /**
97 99
    * A map of non-encoded ascii characters.
98 100
    * @var string[]
@@ -109,12 +111,48 @@ class Swift_Encoder_QpEncoder implements Swift_Encoder
109 111
     Swift_StreamFilter $filter = null)
110 112
   {
111 113
     $this->_charStream = $charStream;
114
+    if(!isset(self::$_safeMapShare[$this->getSafeMapShareId()]))
115
+    {
116
+      $this->initSafeMap();
117
+      self::$_safeMapShare[$this->getSafeMapShareId()] = $this->_safeMap;
118
+    }
119
+    else
120
+    {
121
+      $this->_safeMap = self::$_safeMapShare[$this->getSafeMapShareId()];
122
+    }
123
+    $this->_filter = $filter;
124
+  }
125
+
126
+  public function __sleep()
127
+  {
128
+    return array('_charStream', '_filter');
129
+  }
130
+
131
+  public function __wakeup()
132
+  {
133
+    if(!isset(self::$_safeMapShare[$this->getSafeMapShareId()]))
134
+    {
135
+      $this->initSafeMap();
136
+      self::$_safeMapShare[$this->getSafeMapShareId()] = $this->_safeMap;
137
+    }
138
+    else
139
+    {
140
+      $this->_safeMap = self::$_safeMapShare[$this->getSafeMapShareId()];
141
+    }
142
+  }
143
+
144
+  protected function getSafeMapShareId()
145
+  {
146
+    return get_class($this);
147
+  }
148
+
149
+  protected function initSafeMap()
150
+  {
112 151
     foreach (array_merge(
113 152
       array(0x09, 0x20), range(0x21, 0x3C), range(0x3E, 0x7E)) as $byte)
114 153
     {
115 154
       $this->_safeMap[$byte] = chr($byte);
116 155
     }
117
-    $this->_filter = $filter;
118 156
   }
119 157
 
120 158
   /**
@@ -217,7 +255,7 @@ class Swift_Encoder_QpEncoder implements Swift_Encoder
217 255
       }
218 256
       else
219 257
       {
220
-        $ret .= $this->_qpMap[$b];
258
+        $ret .= self::$_qpMap[$b];
221 259
         $size+=3;
222 260
       }
223 261
     }
@@ -250,7 +288,7 @@ class Swift_Encoder_QpEncoder implements Swift_Encoder
250 288
     {
251 289
       case 0x09:
252 290
       case 0x20:
253
-        $string = substr_replace($string, $this->_qpMap[$end], -1);
291
+        $string = substr_replace($string, self::$_qpMap[$end], -1);
254 292
     }
255 293
     return $string;
256 294
   }

+ 1 - 7
vendor/swiftmailer/lib/classes/Swift/Events/SendEvent.php View File

@@ -37,12 +37,6 @@ class Swift_Events_SendEvent extends Swift_Events_EventObject
37 37
   private $_message;
38 38
   
39 39
   /**
40
-   * The Transport used in sending.
41
-   * @var Swift_Transport
42
-   */
43
-  private $_transport;
44
-  
45
-  /**
46 40
    * Any recipients which failed after sending.
47 41
    * @var string[]
48 42
    */
@@ -52,7 +46,7 @@ class Swift_Events_SendEvent extends Swift_Events_EventObject
52 46
    * The overall result as a bitmask from the class constants.
53 47
    * @var int
54 48
    */
55
-  private $result;
49
+  private $_result;
56 50
   
57 51
   /**
58 52
    * Create a new SendEvent for $source and $message.

+ 20 - 2
vendor/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php View File

@@ -19,6 +19,8 @@ class Swift_Mime_ContentEncoder_QpContentEncoder extends Swift_Encoder_QpEncoder
19 19
   implements Swift_Mime_ContentEncoder
20 20
 {
21 21
 
22
+  protected $_dotEscape;
23
+
22 24
   /**
23 25
    * Creates a new QpContentEncoder for the given CharacterStream.
24 26
    * @param Swift_CharacterStream $charStream to use for reading characters
@@ -28,11 +30,27 @@ class Swift_Mime_ContentEncoder_QpContentEncoder extends Swift_Encoder_QpEncoder
28 30
   public function __construct(Swift_CharacterStream $charStream,
29 31
     Swift_StreamFilter $filter = null, $dotEscape=false)
30 32
   {
33
+    $this->_dotEscape = $dotEscape;
31 34
     parent::__construct($charStream, $filter);
32
-    if ($dotEscape) {
35
+  }
36
+
37
+  public function __sleep()
38
+  {
39
+    return array('_charStream', '_filter', '_dotEscape');
40
+  }
41
+
42
+  protected function getSafeMapShareId()
43
+  {
44
+    return get_class($this).($this->_dotEscape ? '.dotEscape' : '');
45
+  }
46
+
47
+  protected function initSafeMap()
48
+  {
49
+    parent::initSafeMap();
50
+    if ($this->_dotEscape) {
33 51
       /* Encode . as =2e for buggy remote servers */
34 52
       unset($this->_safeMap[0x2e]);
35
-    }
53
+    }    
36 54
   }
37 55
 
38 56
   /**

+ 74 - 59
vendor/swiftmailer/lib/classes/Swift/Mime/Grammar.php View File

@@ -22,14 +22,14 @@ class Swift_Mime_Grammar
22 22
    * @var string[]
23 23
    * @access private
24 24
    */
25
-  private $_specials = array();
25
+  private static $_specials = array();
26 26
 
27 27
   /**
28 28
    * Tokens defined in RFC 2822 (and some related RFCs).
29 29
    * @var string[]
30 30
    * @access private
31 31
    */
32
-  private $_grammar = array();
32
+  private static $_grammar = array();
33 33
   
34 34
   /**
35 35
    * Initialize some RFC 2822 (and friends) ABNF grammar definitions.
@@ -37,7 +37,22 @@ class Swift_Mime_Grammar
37 37
    */
38 38
   public function __construct()
39 39
   {
40
-    $this->_specials = array(
40
+    $this->init();
41
+  }
42
+
43
+  public function __wakeup()
44
+  {
45
+    $this->init();
46
+  }
47
+
48
+  protected function init()
49
+  {
50
+    if(count(self::$_specials) > 0)
51
+    {
52
+      return;
53
+    }
54
+
55
+    self::$_specials = array(
41 56
       '(', ')', '<', '>', '[', ']',
42 57
       ':', ';', '@', ',', '.', '"'
43 58
       );
@@ -45,65 +60,65 @@ class Swift_Mime_Grammar
45 60
     /*** Refer to RFC 2822 for ABNF grammar ***/
46 61
     
47 62
     //All basic building blocks
48
-    $this->_grammar['NO-WS-CTL'] = '[\x01-\x08\x0B\x0C\x0E-\x19\x7F]';
49
-    $this->_grammar['WSP'] = '[ \t]';
50
-    $this->_grammar['CRLF'] = '(?:\r\n)';
51
-    $this->_grammar['FWS'] = '(?:(?:' . $this->_grammar['WSP'] . '*' .
52
-        $this->_grammar['CRLF'] . ')?' . $this->_grammar['WSP'] . ')';
53
-    $this->_grammar['text'] = '[\x00-\x08\x0B\x0C\x0E-\x7F]';
54
-    $this->_grammar['quoted-pair'] = '(?:\\\\' . $this->_grammar['text'] . ')';
55
-    $this->_grammar['ctext'] = '(?:' . $this->_grammar['NO-WS-CTL'] .
63
+    self::$_grammar['NO-WS-CTL'] = '[\x01-\x08\x0B\x0C\x0E-\x19\x7F]';
64
+    self::$_grammar['WSP'] = '[ \t]';
65
+    self::$_grammar['CRLF'] = '(?:\r\n)';
66
+    self::$_grammar['FWS'] = '(?:(?:' . self::$_grammar['WSP'] . '*' .
67
+        self::$_grammar['CRLF'] . ')?' . self::$_grammar['WSP'] . ')';
68
+    self::$_grammar['text'] = '[\x00-\x08\x0B\x0C\x0E-\x7F]';
69
+    self::$_grammar['quoted-pair'] = '(?:\\\\' . self::$_grammar['text'] . ')';
70
+    self::$_grammar['ctext'] = '(?:' . self::$_grammar['NO-WS-CTL'] .
56 71
         '|[\x21-\x27\x2A-\x5B\x5D-\x7E])';
57 72
     //Uses recursive PCRE (?1) -- could be a weak point??
58
-    $this->_grammar['ccontent'] = '(?:' . $this->_grammar['ctext'] . '|' .
59
-        $this->_grammar['quoted-pair'] . '|(?1))';
60
-    $this->_grammar['comment'] = '(\((?:' . $this->_grammar['FWS'] . '|' .
61
-        $this->_grammar['ccontent']. ')*' . $this->_grammar['FWS'] . '?\))';
62
-    $this->_grammar['CFWS'] = '(?:(?:' . $this->_grammar['FWS'] . '?' .
63
-        $this->_grammar['comment'] . ')*(?:(?:' . $this->_grammar['FWS'] . '?' .
64
-        $this->_grammar['comment'] . ')|' . $this->_grammar['FWS'] . '))';
65
-    $this->_grammar['qtext'] = '(?:' . $this->_grammar['NO-WS-CTL'] .
73
+    self::$_grammar['ccontent'] = '(?:' . self::$_grammar['ctext'] . '|' .
74
+        self::$_grammar['quoted-pair'] . '|(?1))';
75
+    self::$_grammar['comment'] = '(\((?:' . self::$_grammar['FWS'] . '|' .
76
+        self::$_grammar['ccontent']. ')*' . self::$_grammar['FWS'] . '?\))';
77
+    self::$_grammar['CFWS'] = '(?:(?:' . self::$_grammar['FWS'] . '?' .
78
+        self::$_grammar['comment'] . ')*(?:(?:' . self::$_grammar['FWS'] . '?' .
79
+        self::$_grammar['comment'] . ')|' . self::$_grammar['FWS'] . '))';
80
+    self::$_grammar['qtext'] = '(?:' . self::$_grammar['NO-WS-CTL'] .
66 81
         '|[\x21\x23-\x5B\x5D-\x7E])';
67
-    $this->_grammar['qcontent'] = '(?:' . $this->_grammar['qtext'] . '|' .
68
-        $this->_grammar['quoted-pair'] . ')';
69
-    $this->_grammar['quoted-string'] = '(?:' . $this->_grammar['CFWS'] . '?"' .
70
-        '(' . $this->_grammar['FWS'] . '?' . $this->_grammar['qcontent'] . ')*' .
71
-        $this->_grammar['FWS'] . '?"' . $this->_grammar['CFWS'] . '?)';
72
-    $this->_grammar['atext'] = '[a-zA-Z0-9!#\$%&\'\*\+\-\/=\?\^_`\{\}\|~]';
73
-    $this->_grammar['atom'] = '(?:' . $this->_grammar['CFWS'] . '?' .
74
-        $this->_grammar['atext'] . '+' . $this->_grammar['CFWS'] . '?)';
75
-    $this->_grammar['dot-atom-text'] = '(?:' . $this->_grammar['atext'] . '+' .
76
-        '(\.' . $this->_grammar['atext'] . '+)*)';
77
-    $this->_grammar['dot-atom'] = '(?:' . $this->_grammar['CFWS'] . '?' .
78
-        $this->_grammar['dot-atom-text'] . '+' . $this->_grammar['CFWS'] . '?)';
79
-    $this->_grammar['word'] = '(?:' . $this->_grammar['atom'] . '|' .
80
-        $this->_grammar['quoted-string'] . ')';
81
-    $this->_grammar['phrase'] = '(?:' . $this->_grammar['word'] . '+?)';
82
-    $this->_grammar['no-fold-quote'] = '(?:"(?:' . $this->_grammar['qtext'] .
83
-        '|' . $this->_grammar['quoted-pair'] . ')*")';
84
-    $this->_grammar['dtext'] = '(?:' . $this->_grammar['NO-WS-CTL'] .
82
+    self::$_grammar['qcontent'] = '(?:' . self::$_grammar['qtext'] . '|' .
83
+        self::$_grammar['quoted-pair'] . ')';
84
+    self::$_grammar['quoted-string'] = '(?:' . self::$_grammar['CFWS'] . '?"' .
85
+        '(' . self::$_grammar['FWS'] . '?' . self::$_grammar['qcontent'] . ')*' .
86
+        self::$_grammar['FWS'] . '?"' . self::$_grammar['CFWS'] . '?)';
87
+    self::$_grammar['atext'] = '[a-zA-Z0-9!#\$%&\'\*\+\-\/=\?\^_`\{\}\|~]';
88
+    self::$_grammar['atom'] = '(?:' . self::$_grammar['CFWS'] . '?' .
89
+        self::$_grammar['atext'] . '+' . self::$_grammar['CFWS'] . '?)';
90
+    self::$_grammar['dot-atom-text'] = '(?:' . self::$_grammar['atext'] . '+' .
91
+        '(\.' . self::$_grammar['atext'] . '+)*)';
92
+    self::$_grammar['dot-atom'] = '(?:' . self::$_grammar['CFWS'] . '?' .
93
+        self::$_grammar['dot-atom-text'] . '+' . self::$_grammar['CFWS'] . '?)';
94
+    self::$_grammar['word'] = '(?:' . self::$_grammar['atom'] . '|' .
95
+        self::$_grammar['quoted-string'] . ')';
96
+    self::$_grammar['phrase'] = '(?:' . self::$_grammar['word'] . '+?)';
97
+    self::$_grammar['no-fold-quote'] = '(?:"(?:' . self::$_grammar['qtext'] .
98
+        '|' . self::$_grammar['quoted-pair'] . ')*")';
99
+    self::$_grammar['dtext'] = '(?:' . self::$_grammar['NO-WS-CTL'] .
85 100
         '|[\x21-\x5A\x5E-\x7E])';
86
-    $this->_grammar['no-fold-literal'] = '(?:\[(?:' . $this->_grammar['dtext'] .
87
-        '|' . $this->_grammar['quoted-pair'] . ')*\])';
101
+    self::$_grammar['no-fold-literal'] = '(?:\[(?:' . self::$_grammar['dtext'] .
102
+        '|' . self::$_grammar['quoted-pair'] . ')*\])';
88 103
     
89 104
     //Message IDs
90
-    $this->_grammar['id-left'] = '(?:' . $this->_grammar['dot-atom-text'] . '|' .
91
-        $this->_grammar['no-fold-quote'] . ')';
92
-    $this->_grammar['id-right'] = '(?:' . $this->_grammar['dot-atom-text'] . '|' .
93
-        $this->_grammar['no-fold-literal'] . ')';
105
+    self::$_grammar['id-left'] = '(?:' . self::$_grammar['dot-atom-text'] . '|' .
106
+        self::$_grammar['no-fold-quote'] . ')';
107
+    self::$_grammar['id-right'] = '(?:' . self::$_grammar['dot-atom-text'] . '|' .
108
+        self::$_grammar['no-fold-literal'] . ')';
94 109
     
95 110
     //Addresses, mailboxes and paths
96
-    $this->_grammar['local-part'] = '(?:' . $this->_grammar['dot-atom'] . '|' .
97
-        $this->_grammar['quoted-string'] . ')';
98
-    $this->_grammar['dcontent'] = '(?:' . $this->_grammar['dtext'] . '|' .
99
-        $this->_grammar['quoted-pair'] . ')';
100
-    $this->_grammar['domain-literal'] = '(?:' . $this->_grammar['CFWS'] . '?\[(' .
101
-        $this->_grammar['FWS'] . '?' . $this->_grammar['dcontent'] . ')*?' .
102
-        $this->_grammar['FWS'] . '?\]' . $this->_grammar['CFWS'] . '?)';
103
-    $this->_grammar['domain'] = '(?:' . $this->_grammar['dot-atom'] . '|' .
104
-        $this->_grammar['domain-literal'] . ')';
105
-    $this->_grammar['addr-spec'] = '(?:' . $this->_grammar['local-part'] . '@' .
106
-        $this->_grammar['domain'] . ')';
111
+    self::$_grammar['local-part'] = '(?:' . self::$_grammar['dot-atom'] . '|' .
112
+        self::$_grammar['quoted-string'] . ')';
113
+    self::$_grammar['dcontent'] = '(?:' . self::$_grammar['dtext'] . '|' .
114
+        self::$_grammar['quoted-pair'] . ')';
115
+    self::$_grammar['domain-literal'] = '(?:' . self::$_grammar['CFWS'] . '?\[(' .
116
+        self::$_grammar['FWS'] . '?' . self::$_grammar['dcontent'] . ')*?' .
117
+        self::$_grammar['FWS'] . '?\]' . self::$_grammar['CFWS'] . '?)';
118
+    self::$_grammar['domain'] = '(?:' . self::$_grammar['dot-atom'] . '|' .
119
+        self::$_grammar['domain-literal'] . ')';
120
+    self::$_grammar['addr-spec'] = '(?:' . self::$_grammar['local-part'] . '@' .
121
+        self::$_grammar['domain'] . ')';
107 122
   }
108 123
   
109 124
   /**
@@ -113,9 +128,9 @@ class Swift_Mime_Grammar
113 128
    */
114 129
   public function getDefinition($name)
115 130
   {
116
-    if (array_key_exists($name, $this->_grammar))
131
+    if (array_key_exists($name, self::$_grammar))
117 132
     {
118
-      return $this->_grammar[$name];
133
+      return self::$_grammar[$name];
119 134
     }
120 135
     else
121 136
     {
@@ -131,7 +146,7 @@ class Swift_Mime_Grammar
131 146
    */
132 147
   public function getGrammarDefinitions()
133 148
   {
134
-    return $this->_grammar;
149
+    return self::$_grammar;
135 150
   }
136 151
   
137 152
   /**
@@ -140,7 +155,7 @@ class Swift_Mime_Grammar
140 155
    */
141 156
   public function getSpecials()
142 157
   {
143
-    return $this->_specials;
158
+    return self::$_specials;
144 159
   }
145 160
   
146 161
   /**
@@ -154,7 +169,7 @@ class Swift_Mime_Grammar
154 169
     $exclude = array())
155 170
   {
156 171
     foreach (
157
-      array_merge(array('\\'), array_diff($this->_specials, $exclude), $include) as $char)
172
+      array_merge(array('\\'), array_diff(self::$_specials, $exclude), $include) as $char)
158 173
     {
159 174
       $token = str_replace($char, '\\' . $char, $token);
160 175
     }

+ 4 - 2
vendor/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php View File

@@ -29,8 +29,10 @@ class Swift_Mime_HeaderEncoder_QpHeaderEncoder extends Swift_Encoder_QpEncoder
29 29
   public function __construct(Swift_CharacterStream $charStream)
30 30
   {
31 31
     parent::__construct($charStream);
32
-    // Reset the safeMap
33
-    $this->_safeMap=array();
32
+  }
33
+  
34
+  protected function initSafeMap()
35
+  {
34 36
     foreach (array_merge(
35 37
       range(0x61, 0x7A), range(0x41, 0x5A),
36 38
       range(0x30, 0x39), array(0x20, 0x21, 0x2A, 0x2B, 0x2D, 0x2F)

+ 3 - 3
vendor/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php View File

@@ -439,9 +439,9 @@ abstract class Swift_Mime_Headers_AbstractHeader implements Swift_Mime_Header
439 439
   
440 440
   /**
441 441
    * Generate a list of all tokens in the final header.
442
-   * @param string $string input, optional
443
-   * @return string[]
444
-   * @access private
442
+   * @param string $string The string to tokenize
443
+   * @return array An array of tokens as strings
444
+   * @access protected
445 445
    */
446 446
   protected function toTokens($string = null)
447 447
   {

+ 1 - 1
vendor/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php View File

@@ -102,7 +102,7 @@ class Swift_Mime_Headers_IdentificationHeader
102 102
   {
103 103
     $actualIds = array();
104 104
     
105
-    foreach ($ids as $k => $id)
105
+    foreach ($ids as $id)
106 106
     {
107 107
       $this->_assertValidId($id);
108 108
       $actualIds[] = $id;

+ 10 - 11
vendor/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php View File

@@ -21,6 +21,12 @@ class Swift_Mime_Headers_ParameterizedHeader
21 21
 {
22 22
   
23 23
   /**
24
+   * RFC 2231's definition of a token.
25
+   * @var string
26
+   */
27
+  const TOKEN_REGEX = '(?:[\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7E]+)';
28
+
29
+  /**
24 30
    * The Encoder used to encode the parameters.
25 31
    * @var Swift_Encoder
26 32
    * @access private
@@ -35,13 +41,6 @@ class Swift_Mime_Headers_ParameterizedHeader
35 41
   private $_params = array();
36 42
   
37 43
   /**
38
-   * RFC 2231's definition of a token.
39
-   * @var string
40
-   * @access private
41
-   */
42
-  private $_tokenRe;
43
-  
44
-  /**
45 44
    * Creates a new ParameterizedHeader with $name.
46 45
    * @param string $name
47 46
    * @param Swift_Mime_HeaderEncoder $encoder
@@ -53,7 +52,6 @@ class Swift_Mime_Headers_ParameterizedHeader
53 52
   {
54 53
     parent::__construct($name, $encoder, $grammar);
55 54
     $this->_paramEncoder = $paramEncoder;
56
-    $this->_tokenRe = '(?:[\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7E]+)';
57 55
   }
58 56
   
59 57
   /**
@@ -145,7 +143,8 @@ class Swift_Mime_Headers_ParameterizedHeader
145 143
    * Generate a list of all tokens in the final header.
146 144
    * This doesn't need to be overridden in theory, but it is for implementation
147 145
    * reasons to prevent potential breakage of attributes.
148
-   * @return string[]
146
+   * @param string $string The string to tokenize
147
+   * @return array An array of tokens as strings
149 148
    * @access protected
150 149
    */
151 150
   protected function toTokens($string = null)
@@ -187,7 +186,7 @@ class Swift_Mime_Headers_ParameterizedHeader
187 186
     $firstLineOffset = 0;
188 187
     
189 188
     //If it's not already a valid parameter value...
190
-    if (!preg_match('/^' . $this->_tokenRe . '$/D', $value))
189
+    if (!preg_match('/^' . self::TOKEN_REGEX . '$/D', $value))
191 190
     {
192 191
       //TODO: text, or something else??
193 192
       //... and it's not ascii
@@ -249,7 +248,7 @@ class Swift_Mime_Headers_ParameterizedHeader
249 248
    */
250 249
   private function _getEndOfParameterValue($value, $encoded = false, $firstLine = false)
251 250
   {
252
-    if (!preg_match('/^' . $this->_tokenRe . '$/D', $value))
251
+    if (!preg_match('/^' . self::TOKEN_REGEX . '$/D', $value))
253 252
     {
254 253
       $value = '"' . $value . '"';
255 254
     }

+ 1 - 2
vendor/swiftmailer/lib/classes/Swift/Plugins/DecoratorPlugin.php View File

@@ -26,7 +26,7 @@ class Swift_Plugins_DecoratorPlugin
26 26
   private $_replacements;
27 27
   
28 28
   /** The body as it was before replacements */
29
-  private $_orginalBody;
29
+  private $_originalBody;
30 30
 
31 31
   /** The original headers of the message, before replacements */
32 32
   private $_originalHeaders = array();
@@ -203,7 +203,6 @@ class Swift_Plugins_DecoratorPlugin
203 203
       {
204 204
         foreach ($message->getHeaders()->getAll() as $header)
205 205
         {
206
-          $body = $header->getFieldBodyModel();
207 206
           if (array_key_exists($header->getFieldName(), $this->_originalHeaders))
208 207
           {
209 208
             $header->setFieldBodyModel($this->_originalHeaders[$header->getFieldName()]);

+ 1 - 1
vendor/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php View File

@@ -407,7 +407,7 @@ abstract class Swift_Transport_AbstractSmtpTransport
407 407
   /** Throws an Exception if a response code is incorrect */
408 408
   protected function _assertResponseCode($response, $wanted)
409 409
   {
410
-    list($code, $separator, $text) = sscanf($response, '%3d%[ -]%s');
410
+    list($code) = sscanf($response, '%3d');
411 411
     $valid = (empty($wanted) || in_array($code, $wanted));
412 412
     
413 413
     if ($evt = $this->_eventDispatcher->createResponseEvent($this, $response,

+ 1 - 1
vendor/swiftmailer/lib/classes/Swift/Transport/LoadBalancedTransport.php View File

@@ -53,7 +53,7 @@ class Swift_Transport_LoadBalancedTransport implements Swift_Transport
53 53
    * 
54 54
    * @return array Swift_Transport
55 55
    */
56
-  public function getTransports(array $transports)
56
+  public function getTransports()
57 57
   {
58 58
     return array_merge($this->_transports, $this->_deadTransports);
59 59
   }

+ 3 - 3
vendor/swiftmailer/lib/preferences.php View File

@@ -9,9 +9,9 @@
9 9
 // Sets the default charset so that setCharset() is not needed elsewhere
10 10
 Swift_Preferences::getInstance()->setCharset('utf-8');
11 11
 
12
-// Without these lines the default caching mechanism is "array" but this uses
13
-// a lot of memory.
14
-// If possible, use a disk cache to enable attaching large attachments etc
12
+// Without these lines the default caching mechanism is "array" but this uses a lot of memory.
13
+// If possible, use a disk cache to enable attaching large attachments etc.
14
+// You can override the default temporary directory by setting the TMPDIR environment variable.
15 15
 if (function_exists('sys_get_temp_dir') && is_writable(sys_get_temp_dir()))
16 16
 {
17 17
   Swift_Preferences::getInstance()

+ 41 - 0
vendor/symfony/CHANGELOG-2.0.md View File

@@ -7,6 +7,47 @@ in 2.0 minor versions.
7 7
 To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
8 8
 To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.0.0...v2.0.1
9 9
 
10
+* 2.0.13 (2012-04-30)
11
+
12
+ * 5b92b9e: [Console] Selectively output to STDOUT or OUTPUT stream
13
+ * c89f3d3: [HttpKernel] Added DEPRECATED errors
14
+ * 689a40d: [MonologBridge] Fixed the WebProcessor
15
+ * 2e7d3b1: http_build_query fix
16
+ * de73de0: http_build_query fix
17
+ * 3b7ee9a: http_build_query fix
18
+ * 14b3b05: [TwigBundle] added missing entry in the XSD schema
19
+ * 7ddc8cb: [FrameworkBundle] Monitor added/removed translations files in dev (fix #3653)
20
+ * 686653a: [HttpKernel] Fixed wache vary write (fixes #3896).
21
+ * 45ada32: Add Support for boolean as to string into yaml extension
22
+ * cd783fb: [HttpKernel] Fixed cache vary lookup (fixes #3896).
23
+ * 3939c90: [FrameworkBundle] Fix TraceableEventDispatcher unable to trace static class callables
24
+ * e4cbbf3: [Locale] fixed StubNumberFormatter::format() to behave like the NumberFormatter::parse() regarding to error flagging
25
+ * f16ff89: [Locale] fixed StubNumberFormatter::parse() to behave like the NumberFormatter::parse() regarding to error flagging
26
+ * 0a60664: [Locale] updated StubIntlDateFormatter::format() exception message when timestamp argument is an array for PHP >= 5.3.4
27
+ * 6f9c05d: [Locale] Complete Stub with intl_error_name
28
+ * 312a5a4: [Locale] fixed StubIntlDateFormatter::format() to set the right error for PHP >= 5.3.4 and to behave like the intl when formatting successfully
29
+ * bb61e09: [Locale] use the correct way for Intl error
30
+ * 01fcb08: [HttpKernel] Fix the ProfilerListener (fix #3620)
31
+ * 3ae826a: Fix issue #3251: Check attribute type of service tags
32
+ * 57dd914: [EventDispatcher] Fixed E_NOTICES with multiple eventnames per subscriber with mixed priorities
33
+ * 77185e0: [Routing] Allow spaces in the script name for the apache dumper
34
+ * 6465a69: [Routing] Fixes to handle spaces in route pattern
35
+ * 31dde14: [Locale] updated StubIntlDateFormatter::format() behavior for PHP >= 5.3.4
36
+ * 8a2b115: [Console] Mock terminal size to prevent formatting errors on small terminals
37
+ * 595cc11: [Console] Wrap exception messages to the terminal width to avoid ugly output
38
+ * 97f7b29: [Console] Avoid outputing \r's in exception messages
39
+ * 04ae7cc: [Routing] fixed exception message.
40
+ * f7647f9: [Routing] improved exception message when giving an invalid route name.
41
+ * 0024ddc: Fix for using route name as check_path.
42
+ * fc41d4f: [Security] [HttpDigest] Fixes a configuration error caused by an invalid 'key' child node configuration
43
+ * 24a0d0a: [DependencyInjection] Support Yaml calls without arguments
44
+ * 15dd17e: Simplified CONTENT_ headers retrieval
45
+ * 86a3512: [FrameworkBundle] Add support for full URLs to redirect controller
46
+ * 068e859: [TwigBundle] Changed getAndCleanOutputBuffering() handling of systems where ob_get_level() never returns 0
47
+ * efa807a: [HttpKernel] fixed sub-request which should be always a GET (refs #3657)
48
+ * c1206c3: [FrameworkBundle] Subrequests should always use GET method
49
+ * 0c9b2d4: use SecurityContextInterface instead of SecurityContext
50
+
10 51
 * 2.0.12 (2012-03-19)
11 52
 
12 53
  * 54b2413: Webprofiler ipv6 search fix

+ 172 - 134
vendor/symfony/CONTRIBUTORS.md View File

@@ -6,258 +6,313 @@ Symfony2 is the result of the work of many people who made the code better
6 6
 
7 7
  - Fabien Potencier (fabpot)
8 8
  - Bernhard Schussek (bschussek)
9
- - Johannes (schmittjoh)
10 9
  - Victor Berchet (vicb)
11
- - Kris Wallsmith (kriswallsmith)
12 10
  - Jordi Boggiano (Seldaek)
11
+ - Johannes (schmittjoh)
12
+ - Kris Wallsmith (kriswallsmith)
13 13
  - Christophe Coevoet (stof)
14
+ - Drak (drak)
15
+ - Lukas Kahwe Smith (lsmith77)
14 16
  - Ryan Weaver (weaverryan)
17
+ - Jeremy Mikola (jmikola)
15 18
  - Pascal Borreli (pborreli)
16
- - Lukas Kahwe Smith (lsmith77)
17 19
  - Benjamin Eberlei (beberlei)
18
- - Jeremy Mikola (jmikola)
19
- - Igor Wiedler (igorw)
20 20
  - Joseph Bielawski (stloyd)
21
- - Drak (drak)
21
+ - Igor Wiedler (igorw)
22 22
  - Hugo Hamon (hhamon)
23
- - Jonathan H. Wage (jwage)
24
- - Thibault Duplessis (ornicar)
25
- - Alexandre Salomé (alexandresalome)
26 23
  - Eriksen Costa (eriksencosta)
27
- - Bulat Shakirzyanov (avalanche123)
24
+ - William DURAND (willdurand)
25
+ - Alexandre Salomé (alexandresalome)
28 26
  - stealth35 (stealth35)
29
- - Francis Besset (francisbesset)
30
- - Miha Vrhovnik (mvrhov)
31
- - Henrik Bjørnskov (henrikbjorn)
32
- - Martin Hasoň (hason)
33
- - Henrik Westphal (snc)
27
+ - Jonathan H. Wage (jwage)
28
+ - Thibault Duplessis (ornicar)
29
+ - Jakub Zalas (jakzal)
34 30
  - Eric Clemmons (ericclemmons)
35
- - Konstantin Kudryashov (everzet)
31
+ - Henrik Westphal (snc)
36 32
  - Dariusz Górecki (canni)
37
- - Arnout Boks (aboks)
38
- - William DURAND (willdurand)
33
+ - Miha Vrhovnik (mvrhov)
34
+ - Bulat Shakirzyanov (avalanche123)
35
+ - Martin Hasoň (hason)
36
+ - Henrik Bjørnskov (henrikbjorn)
37
+ - Francis Besset (francisbesset)
38
+ - Tobias Schultze (Tobion)
39
+ - Andrej Hudec (pulzarraider)
40
+ - Kevin Bond (kbond)
39 41
  - Deni (yethee)
42
+ - Arnout Boks (aboks)
43
+ - Jordan Alliot (jalliot)
44
+ - Marc Weistroff (marcw)
45
+ - Konstantin Kudryashov (everzet)
46
+ - Toni Uebernickel (havvg)
47
+ - Sebastian Hörl (blogsh)
48
+ - Excel Web Zone (excelwebzone)
40 49
  - Brandon Turner (blt04)
41 50
  - Hidenori Goto (hidenorigoto)
42
- - John Wards (johnwards)
43
- - Lenar Lõhmus (lenar)
44
- - Marc Weistroff (marcw)
45 51
  - Brikou CARRE (brikou)
52
+ - Lenar Lõhmus (lenar)
53
+ - John Wards (johnwards)
54
+ - Jean-François Simon (jfsimon)
46 55
  - Daniel Holmes (danielholmes)
56
+ - Tigran Azatyan (tigranazatyan)
47 57
  - Antoine Hérault (Herzult)
48
- - Fabien Pennequin (FabienPennequin)
49
- - Andrej Hudec (pulzarraider)
50
- - Sebastian Hörl (blogsh)
58
+ - Helmer Aaviksoo (helmer)
51 59
  - Jacob Dreesen (jdreesen)
60
+ - umpirsky (umpirsky)
61
+ - Pierre Minnieur (pminnieur)
62
+ - Michał Pipa (michal-pipa)
63
+ - Fabien Pennequin (FabienPennequin)
52 64
  - Richard Shank (IamPersistent)
53
- - Kevin Bond (kbond)
54
- - Jordan Alliot (jalliot)
55
- - Excel Web Zone (excelwebzone)
65
+ - Benjamin Dulau (benjamindulau)
66
+ - Christian Raue (craue)
67
+ - Grégoire Pineau (lyrixx)
56 68
  - Katsuhiro OGAWA (fivestar)
69
+ - Richard Miller (richardmiller)
57 70
  - Jeremy Mikola
58
- - Tobias Schultze (Tobion)
71
+ - Bart van den Burg (Burgov)
59 72
  - blue-eyes (blue-eyes)
73
+ - Juti Noppornpitak (shiroyuki)
60 74
  - Robert Schönthal (digitalkaoz)
75
+ - Florin Patan (dlsniper)
76
+ - Rafael Dohms (rdohms)
61 77
  - Tim Nagel (merk)
62 78
  - Michel Weimerskirch (mweimerskirch)
63
- - Tigran Azatyan (tigranazatyan)
64
- - Pierre Minnieur (pminnieur)
65
- - Christian Raue (craue)
66
- - umpirsky (umpirsky)
67
- - Helmer Aaviksoo (helmer)
68
- - Jakub Zalas (jakzal)
69 79
  - Javier Eguiluz (javiereguiluz)
80
+ - Joseph Rouff (rouffj)
81
+ - Marcel Beerta (mazen)
82
+ - Daniel Gomes
83
+ - Wotre (Wotre)
70 84
  - Matthieu Vachon (maoueh)
71 85
  - Amal Raghav (kertz)
72 86
  - Artur Kotyrba (udat)
73
- - Daniel Gomes (danielcsgomes)
87
+ - Gustavo Piltcher
88
+ - Rui Marinho
74 89
  - Clément JOBEILI (dator)
75
- - Bart van den Burg (Burgov)
76
- - Benjamin Dulau (benjamindulau)
90
+ - dbu
91
+ - Julien Brochet (aerialls)
92
+ - Thomas (rande)
93
+ - Alexander (asm89)
94
+ - Gordon Franke (gimler)
95
+ - Włodzimierz Gajda (gajdaw)
77 96
  - Noel GUILBERT (noelg)
97
+ - Alif Rachmawadi (subosito)
98
+ - Lars Strojny (lstrojny)
78 99
  - Martin Schuhfuss (usefulthink)
79
- - Thomas (rande)
80 100
  - Dennis Benkert (denderello)
81 101
  - Matthieu Bontemps (mbontemps)
102
+ - Jonathan Ingram (jonathaningram)
103
+ - Alessandro Desantis (alessandro1997)
104
+ - Oscar Cubo Medina (ocubom)
82 105
  - Dustin Whittle (dustinwhittle)
83 106
  - Jean-François PHILIPPE (jfphilippe)
107
+ - Arnaud Le Blanc (arnaud-lb)
84 108
  - Justin Hileman (bobthecow)
109
+ - Danny Berger (dpb587)
85 110
  - Sven Paulus (subsven)
86 111
  - Xavier Perez (DuoSRX)
87 112
  - Joel Wurtz (Brouznouf)
88
- - Alexander (asm89)
89
- - Jonathan Ingram (jonathaningram)
113
+ - Douglas Greenshields (shieldo)
114
+ - Joe Lencioni (lencioni)
115
+ - brki (brki)
90 116
  - Pablo Godel (pgodel)
91 117
  - Francois Zaninotto
92 118
  - Leszek Prabucki (l3l0)
93 119
  - Francois Zaninotto (fzaninotto)
120
+ - Gyula Sallai (thesalla)
94 121
  - Xavier Montaña Carreras (xmontana)
122
+ - Andreas Hucks (meandmymonkey)
95 123
  - Arjen Brouwer (arjenjb)
96
- - Alif Rachmawadi (subosito)
97
- - Florin Patan (dlsniper)
124
+ - Michael Holm (hollodk)
98 125
  - Boussekeyt Jules (gordonslondon)
99 126
  - Jan Sorgalla (jsor)
100
- - Marcel Beerta (mazen)
101 127
  - Lee McDermott (lmcd)
102
- - Toni Uebernickel (havvg)
103
- - Richard Miller (richardmiller)
128
+ - Manuel Reinhard (sprain)
104 129
  - Jeroen Hoek (jdhoek)
105
- - Rafael Dohms (rdohms)
130
+ - Ryan Rogers (timewasted)
131
+ - flevour (flevour)
132
+ - Michel Salib (michelsalib)
106 133
  - geoffrey
107
- - Wotre (Wotre)
108
- - Gyula Sallai (thesalla)
109
- - Grégoire Pineau (lyrixx)
110
- - Danny Berger (dpb587)
134
+ - Kim Hemsø Rasmussen (kimhemsoe)
135
+ - Gábor Egyed (1ed)
111 136
  - Jérémie Augustin (jaugustin)
112
- - Joseph Rouff (rouffj)
113 137
  - Manuel Kiessling (ManuelKiessling)
114
- - dbu
115
- - Julien Brochet (aerialls)
116
- - Douglas Greenshields (shieldo)
138
+ - Tobias Naumann (tna)
139
+ - Shein Alexey (conf)
117 140
  - Aurelijus Valeiša (aurelijus)
118
- - Gustavo Piltcher
119 141
  - Ray (rrehbeindoi)
120
- - Gordon Franke (gimler)
121 142
  - Adrian Rudnik (kreischweide)
122
- - Gábor Egyed (1ed)
143
+ - Marcin Chylek (SongoQ)
144
+ - Pavel Campr (pcampr)
145
+ - Josip Kruslin (aubx)
146
+ - drak3 (drak3)
147
+ - Chris Boden (cboden)
148
+ - Dustin Dobervich (dustin10)
149
+ - Michele Orselli (micheleorselli)
123 150
  - Andréia Bohner (andreia)
124
- - Andreas Hucks (meandmymonkey)
125
- - Drak
151
+ - Sebastian Bergmann (sebastianbergmann)
152
+ - Miquel Rodríguez Telep (mrtorrent)
153
+ - Peter Kokot (maastermedia)
126 154
  - Jérémy Romey (jeremyFreeAgent)
127 155
  - Yuen-Chi Lian (yclian)
156
+ - John Bohn (jjbohn)
128 157
  - Greg Thornton (xdissent)
129
- - Lars Strojny (lstrojny)
130
- - Arnaud Le Blanc (arnaud-lb)
158
+ - andrewtch (andrewtch)
131 159
  - Costin Bereveanu (schniper)
160
+ - Markus Lanthaler (lanthaler)
132 161
  - Konstantin Leboev (realmfoo)
133
- - Tobias Naumann (tna)
162
+ - Thomas Adam (tecbot)
163
+ - superjavason (superjavason)
134 164
  - Donald Tyler (Chekote)
135 165
  - Matthew Lewinski
136 166
  - Kai
137 167
  - Sergey Linnik (Partugal)
168
+ - Albert Jessurum (ajessu)
169
+ - Johnny Peck (johnnypeck)
138 170
  - Laszlo Korte (laszlokorte)
139 171
  - Hubert LECORCHE (hlecorche)
172
+ - Sergey Skopin (grizlik)
173
+ - drmonty (drmonty)
140 174
  - Michael Ridgway (mridgway)
141 175
  - Stepan Tanasiychuk (stfalcon)
142
- - Pavel Campr (pcampr)
143 176
  - Bertrand Zuchuat (Garfield-fr)
144
- - brki (brki)
145
- - Michel Salib (michelsalib)
177
+ - Bilal Amarni (bamarni)
146 178
  - Jan Schumann (janschumann)
147
- - Michele Orselli (micheleorselli)
179
+ - Olivier Dolbeau (odolbeau)
180
+ - Sebastian Marek (proofek)
148 181
  - Asier Illarramendi (doup)
149 182
  - Shigenobu Nishikawa (shishi)
150
- - Sebastian Bergmann (sebastianbergmann)
151 183
  - Marcin Sikoń (marphi)
152
- - Miquel Rodríguez Telep (mrtorrent)
153
- - Peter Kokot (maastermedia)
184
+ - cedric lombardot (cedriclombardot)
154 185
  - Laurent Bachelier (laurentb)
155 186
  - Fabian Lange (CodingFabian)
156 187
  - Yoshio HANAWA
157 188
  - Pablo Díez (pablodip)
158
- - ondrowan (ondrowan)
189
+ - Fran Moreno (franmomu)
190
+ - Manuel de Ruiter (ManuelAC)
191
+ - Ondrej Slinták (ondrowan)
192
+ - Crell (Crell)
159 193
  - Benoit Tirmarche (mcbennn)
160 194
  - Grégoire Passault
195
+ - Tom Klingenberg (ktomk)
196
+ - Daniel Gomes (danielcsgomes)
161 197
  - De Cock Xavier (xdecock)
162 198
  - Cristian González Sánchez (cristiangsp)
163
- - Manuel Reinhard (sprain)
164
- - Thomas Adam (tecbot)
165 199
  - Nils Adermann (naderman)
166
- - Shein Alexey (conf)
167
- - Steven Surowiec (steves)
168
- - Marcin Chylek (SongoQ)
200
+ - Steve Kondik (cyanogen)
201
+ - Benjamin Lévêque (benji07)
202
+ - Matt Robinson (inanimatt)
169 203
  - Ivan Rey (ivanrey)
170
- - Ryan Rogers (timewasted)
171 204
  - Ned Schwartz (theinterned)
205
+ - Ziumin (Ziumin)
172 206
  - Aurélien Fredouelle (AurelC2G)
173
- - flevour (flevour)
174
- - stealth35
175
- - Oscar Cubo Medina (ocubom)
176
- - IP_FIX (eversonfix)
207
+ - Marek Kalnik (marekkalnik)
208
+ - Tiago Ribeiro (fixe)
177 209
  - Geoffrey Tran (geoffreytran)
178 210
  - Christian Schaefer (caefer)
211
+ - Robert Gruendler (pulse00)
179 212
  - Elliot Anderson (elliot)
180
- - Olivier Dolbeau (odolbeau)
213
+ - xaav
214
+ - Anton Babenko (antonbabenko)
215
+ - Martin Hasoň
181 216
  - José Nahuel Cuesta Luengo (ncuesta)
182
- - Dustin Dobervich (dustin10)
183 217
  - Erkhembayar Gantulga (erheme318)
184
- - Michael Holm (hollodk)
185 218
  - Rostyslav Kinash
186 219
  - yktd26 (yktd26)
220
+ - Tom Van Looy (tvlooy)
187 221
  - umpirski (umpirski)
222
+ - Neil Katin
223
+ - Peter Kokot (peterkokot)
188 224
  - Hossein Bukhamsin (husinluck)
189 225
  - Fabrice Bernhard (fabriceb)
190 226
  - develop
191 227
  - Hiromi Hishida (77web)
228
+ - Klein Florian (docteurklein)
192 229
  - Joshua Nye (zerosanity)
193
- - andrewtch (andrewtch)
194 230
  - markchalloner (markchalloner)
231
+ - Mike Lively (mlively)
195 232
  - Michael Williams (mtotheikle)
233
+ - Thomas Chmielowiec (chmielot)
196 234
  - Casper Valdemar Poulsen (cvaldemar)
197
- - Fran Moreno (franmomu)
198 235
  - Degory Valentine
199 236
  - Krzysiek Łabuś (Crozin)
200
- - superjavason (superjavason)
237
+ - Ismael Ambrosi (iambrosi)
238
+ - Thomas Bibb (thomasbibb)
239
+ - Ivan Kurnosov
240
+ - stloyd
201 241
  - Jan Prieser (jaypea)
202
- - Tom Klingenberg (ktomk)
242
+ - Thomas Chmielowiec (chmielot)
243
+ - Grégoire Paris (greg0ire)
203 244
  - paulkamer (paulkamer)
204 245
  - Peter Kruithof (pkruithof)
205
- - Albert Jessurum (ajessu)
246
+ - alefranz (alefranz)
206 247
  - frost-nzcr4 (frost-nzcr4)
207 248
  - Petit Yoann (Abhoryo)
208 249
  - Fabian Vogler (fabian)
209 250
  - Maksim Kotlyar
251
+ - Artyom Protaskin (gatsu)
210 252
  - Grégoire Passault (Gregwar)
211
- - Manuel de Ruiter (ManuelAC)
253
+ - Alexander Miehe (Engerim)
212 254
  - Cyril Quintin (cyqui)
213 255
  - Gerard van Helden (drm)
214
- - Johnny Peck (johnnypeck)
215 256
  - kazusuke sasezaki (sasezaki)
216
- - Benjamin Lévêque (benji07)
217
- - Matt Robinson (inanimatt)
218 257
  - root
258
+ - Kirill chEbba Chebunin (chEbba)
259
+ - Julien DIDIER (juliendidier)
219 260
  - Chris Smith (cs278)
220 261
  - Derek ROTH (DerekRoth)
221 262
  - mwsaz
222
- - Sergey Skopin (grizlik)
263
+ - Giulio De Donato (liuggio)
264
+ - Matthias (mpdude)
223 265
  - Emil Einarsson (Einarsson)
224 266
  - Yanick Witschi (Toflar)
225 267
  - Don Pinkster
268
+ - Piotr Błasiak (blahy)
226 269
  - Saem Ghani (saem)
227 270
  - Michael Roterman (wtfzdotnet)
228 271
  - Arno Geurts
229
- - Marek Kalnik (marekkalnik)
272
+ - Jörg Rühl (LennyLinux)
273
+ - jeanfrancois.simon
274
+ - Bernd Matzner (bmatzner)
230 275
  - Daniel Cestari (dcestari)
231
- - Jérémy CROMBEZ (jcrombez)
276
+ - Jesse Cooke (jc00ke)
277
+ - jdewit (jdewit)
278
+ - Javier López (loalf)
232 279
  - Magnus Nordlander (magnusnordlander)
233 280
  - Adam Monsen (meonkeys)
234
- - Michał Pipa (michal-pipa)
235
- - Robert Gruendler (pulse00)
281
+ - nervo (nervo)
282
+ - Oleg Stepura (olegstepura)
283
+ - patrick-mcdougle (patrick-mcdougle)
236 284
  - Sebastian Busch (sbusch)
237 285
  - Benoît Merlet (trompette)
286
+ - xanido (xanido)
287
+ - Xavier HAUSHERR (xkobal)
288
+ - Craig Marvelley (craigmarvelley)
238 289
  - Jan Behrens (deegital)
290
+ - Hans (drublic)
291
+ - m0ppers (m0ppers)
292
+ - Michael Shtukin (mshtukin)
293
+ - Anthon Pang (robocoder)
294
+ - Teo (teo-sk)
295
+ - Tony Piper (tonypiper)
239 296
  - sensio
240 297
  - Théophile Helleboid - chtitux (chtitux)
241 298
  - Matthew Lewinski (lewinski)
242
- - xaav
243
- - Anton Babenko (antonbabenko)
299
+ - Markus Bachmann (Baachi)
244 300
  - irmantas (irmantas)
245 301
  - tero (tero)
246
- - Martin Hasoň
247 302
  - Vadim Tyukov (vatson)
248 303
  - Stainslav Turza (S0RIEN)
249 304
  - chispita
250 305
  - Tobias Sjösten (tobiassjosten)
251 306
  - Wojciech Sznapka (wowo)
252
- - Sebastian Marek (proofek)
253
- - cedric lombardot (cedriclombardot)
307
+ - julien.galenski
254 308
  - John Kary (johnkary)
255 309
  - Martijn Evers (martijn4evers)
256 310
  - Jeremy Bush (zombor)
311
+ - Evan Villemez (evillemez)
257 312
  - Davide Borsatto (davideborsatto)
258 313
  - kaiwa
259
- - Neil Katin
260 314
  - Gustavo Adrian
315
+ - Roger Webb
261 316
  - Nicolas Fabre (nfabre)
262 317
  - Clément Herreman (clemherreman)
263 318
  - heccjj (heccjj)
@@ -266,34 +321,29 @@ Symfony2 is the result of the work of many people who made the code better
266 321
  - George Giannoulopoulos (dotoree)
267 322
  - Alberto Pirovano (geezmo)
268 323
  - Xavier Briand (xavierbriand)
269
- - Markus Lanthaler (lanthaler)
270
- - Klein Florian (docteurklein)
324
+ - Carsten Nielsen (phreaknerd)
271 325
  - JerikVenture (JerikVenture)
272 326
  - Evan Kaufman (EvanK)
273 327
  - meckhardt (meckhardt)
274
- - Mike Lively (mlively)
275 328
  - Sebastian Ionescu
276 329
  - Dirk Pahl (dirkaholic)
330
+ - Konrad Mohrfeldt (kmohrf)
277 331
  - Nicolas Badey (Nico-B)
278 332
  - Philipp Scheit (pscheit)
279 333
  - Bouke Haarsma (Bouke)
280 334
  - Lars Strojny
281 335
  - Yrwein (Yrwein)
282 336
  - pborreli
283
- - Thomas Bibb (thomasbibb)
284
- - Ivan Kurnosov
285
- - stloyd
286 337
  - Martin Parsiegla
287 338
  - Christoph Nißle (DerStoffel)
288 339
  - Luis Muñoz
289
- - Thomas Chmielowiec (chmielot)
290 340
  - Oleg Zinchenko (cystbear)
291
- - Grégoire Paris (greg0ire)
292 341
  - Guilherme Blanco (guilhermeblanco)
293 342
  - Stefano Sala (stewe)
343
+ - Sebastian Hörl
294 344
  - Romain Dorgueil
295 345
  - Benjamin Zikarsky (bzikarsky)
296
- - alefranz (alefranz)
346
+ - pierre
297 347
  - Andy Stanberry (cranberyxl)
298 348
  - Alessio (ioalessio)
299 349
  - Jérôme Macias (jeromemacias)
@@ -301,19 +351,17 @@ Symfony2 is the result of the work of many people who made the code better
301 351
  - Gustavo Falco
302 352
  - gnat42 (gnat42)
303 353
  - Alexey Popkov (patashnik)
304
- - Alexander Miehe (Engerim)
305 354
  - devel
306
- - HIROKI (hirocaster)
355
+ - Hiroki HIROCASTER OHTSUKA (hirocaster)
307 356
  - jpauli (jpauli)
308 357
  - Kevin McBride (krmcbride)
309 358
  - Dan Patrick (mdpatrick)
359
+ - Drew Butler (nodrew)
310 360
  - Pierre-Yves LEBECQ (pylebecq)
311 361
  - Jan Eichhorn (Exeu)
312 362
  - Alexander Zogheb
313
- - Kirill chEbba Chebunin (chEbba)
314 363
  - cim-dch (cim-dch)
315 364
  - Dan Ordille (dordille)
316
- - Julien DIDIER (juliendidier)
317 365
  - Martin Mayer (martinmayer)
318 366
  - Baptiste Clavié (Taluu)
319 367
  - Tuxosaurus (Tuxosaurus)
@@ -324,30 +372,28 @@ Symfony2 is the result of the work of many people who made the code better
324 372
  - agilemedialab (agilemedialab)
325 373
  - Alan Chen (alan0101c)
326 374
  - Masao Maeda (brtriver)
375
+ - clemens-tolboom (clemens-tolboom)
327 376
  - Gustavo Falco (comfortablynumb)
328 377
  - Denis Klementjev (dklementjev)
329 378
  - Kévin Dunglas (dunglas)
330 379
  - Gabriel Birke (gbirke)
331
- - Ismael Ambrosi (iambrosi)
332 380
  - Osman Üngür (import)
333 381
  - Robert Campbell (jayrulez)
334
- - John Bohn (jjbohn)
335 382
  - Gábor Fási (maerlyn)
336 383
  - Matthew Davis (mdavis1982)
337 384
  - Matt Lehner (mlehner)
338
- - Matthias (mpdude)
339 385
  - Jimmy Leger (redpanda)
340 386
  - Nicolas A. Bérard-Nault
341 387
  - Alexey Popkov
342 388
  - Adán Lobato (adanlobato)
389
+ - Arnaud Buathier (arnapou)
343 390
  - chesteroni (chesteroni)
344 391
  - Elnur Abdurrakhimov (elnur)
345 392
  - Beau Simensen (simensen)
346
- - Tom Van Looy (tvlooy)
393
+ - Till Klampaeckel (till)
347 394
  - Juan Ases García (Ases)
348 395
  - Eugene Babushkin (EugeneBabushkin)
349 396
  - Fabien D. (FabienD)
350
- - Jörg Rühl (LennyLinux)
351 397
  - Matt Drollette (MDrollette)
352 398
  - Kornienko Alexander (Skorney)
353 399
  - Vincent (Vincent-P)
@@ -356,7 +402,6 @@ Symfony2 is the result of the work of many people who made the code better
356 402
  - Sébastien HOUZE
357 403
  - Sergiy Sokolenko
358 404
  - Adrien Brault (adrienbrault)
359
- - Bernd Matzner (bmatzner)
360 405
  - Vladimir Sazhin (cannie)
361 406
  - Chris Sedlmayr (catchamonkey)
362 407
  - Christian Stocker (chregu)
@@ -367,42 +412,35 @@ Symfony2 is the result of the work of many people who made the code better
367 412
  - ds (dantleech)
368 413
  - Djama Suemenich (djama)
369 414
  - Daniel Londero (dlondero)
370
- - Kyle W (dorkitude)
415
+ - Kyle Wild (dorkitude)
371 416
  - David Soria Parra (dsp)
372 417
  - Kousuke Ebihara (ebihara)
373 418
  - ideea (ideea)
374
- - John Carr (Jc2k)
375
- - jdewit (jdewit)
419
+ - Jérémy CROMBEZ (jcrombez)
420
+ - Johannes (johannes85)
376 421
  - Justin Rainbow (justinrainbow)
377 422
  - Abdulkadir N. A. (kadeer)
378 423
  - Krzysztof Menżyk (krymen)
379 424
  - kwiateusz (kwiateusz)
380 425
  - Samuel Laulhau (lalop)
381
- - Javier López (loalf)
382 426
  - Matt Fitzgerald (matthewfitz)
383 427
  - Penny Leach (mjollnir)
428
+ - Marc Abramowitz (msabramo)
384 429
  - Michael Schneider (mschneid)
385 430
  - Oncle Tom (oncletom)
386 431
  - ouardisoft (ouardisoft)
387
- - patrick-mcdougle (patrick-mcdougle)
388 432
  - Petr Jaroš (petajaros)
389 433
  - pzwosta (pzwosta)
434
+ - Julien &#039;ruian&#039; Galenski (ruian)
390 435
  - Ruud Kamphuis (ruudk)
391 436
  - Markus Tacker (tacker)
392 437
  - Tyler Stroud (tystr)
393 438
  - Vyacheslav Slinko (vslinko)
394 439
  - Josiah (web-dev)
395
- - xanido (xanido)
396
- - Xavier HAUSHERR (xkobal)
397
- - drublic
398 440
  - Gustavo Adrian
399 441
  - max
400
- - Craig Marvelley (craigmarvelley)
401
- - m0ppers (m0ppers)
402 442
  - Muharrem Demirci (mdemirci)
403 443
  - meze (meze)
404
- - Michael Shtukin (mshtukin)
405 444
  - Nicolas de Marqué Fromentin (nicodmf)
406 445
  - Florent Cailhol (ooflorent)
407 446
  - Pierre (ptheg)
408
- - Teo (teo-sk)

+ 1 - 1
vendor/symfony/composer.json View File

@@ -18,7 +18,7 @@
18 18
     "require": {
19 19
         "php": ">=5.3.2",
20 20
         "doctrine/common": "2.1.*",
21
-        "monolog/monolog": "1.0.*",
21
+        "monolog/monolog": ">=1.0,<1.2-dev",
22 22
         "swiftmailer/swiftmailer": ">=4.1.2,<4.2-dev",
23 23
         "twig/twig": ">=1.1,<2.0-dev"
24 24
     },

+ 12 - 2
vendor/symfony/src/Symfony/Bridge/Monolog/Processor/WebProcessor.php View File

@@ -13,6 +13,8 @@ namespace Symfony\Bridge\Monolog\Processor;
13 13
 
14 14
 use Monolog\Processor\WebProcessor as BaseWebProcessor;
15 15
 use Symfony\Component\HttpFoundation\Request;
16
+use Symfony\Component\HttpKernel\Event\GetResponseEvent;
17
+use Symfony\Component\HttpKernel\HttpKernelInterface;
16 18
 
17 19
 /**
18 20
  * WebProcessor override to read from the HttpFoundation's Request
@@ -21,8 +23,16 @@ use Symfony\Component\HttpFoundation\Request;
21 23
  */
22 24
 class WebProcessor extends BaseWebProcessor
23 25
 {
24
-    public function __construct(Request $request)
26
+    public function __construct()
25 27
     {
26
-        parent::__construct($request->server->all());
28
+        // Pass an empty array as the default null value would access $_SERVER
29
+        parent::__construct(array());
30
+    }
31
+
32
+    public function onKernelRequest(GetResponseEvent $event)
33
+    {
34
+        if (HttpKernelInterface::MASTER_REQUEST === $event->getRequestType()) {
35
+            $this->serverData = $event->getRequest()->server->all();
36
+        }
27 37
     }
28 38
 }

+ 1 - 1
vendor/symfony/src/Symfony/Bridge/Twig/Extension/YamlExtension.php View File

@@ -52,7 +52,7 @@ class YamlExtension extends \Twig_Extension
52 52
             return '%'.gettype($value).'% '.$this->encode($value);
53 53
         }
54 54
 
55
-        return $value;
55
+        return $this->encode($value);
56 56
     }
57 57
 
58 58
     /**

+ 3 - 1
vendor/symfony/src/Symfony/Bundle/DoctrineBundle/Registry.php View File

@@ -15,6 +15,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
15 15
 use Symfony\Bridge\Doctrine\RegistryInterface;
16 16
 use Doctrine\DBAL\Connection;
17 17
 use Doctrine\ORM\Configuration;
18
+use Doctrine\ORM\EntityManager;
19
+use Doctrine\ORM\EntityRepository;
18 20
 use Doctrine\ORM\ORMException;
19 21
 
20 22
 /**
@@ -210,7 +212,7 @@ class Registry implements RegistryInterface
210 212
      * @param string $entityName        The name of the entity.
211 213
      * @param string $entityManagerName The entity manager name (null for the default one)
212 214
      *
213
-     * @return Doctrine\ORM\EntityRepository
215
+     * @return EntityRepository
214 216
      */
215 217
     public function getRepository($entityName, $entityManagerName = null)
216 218
     {

+ 8 - 1
vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php View File

@@ -70,6 +70,13 @@ class RedirectController extends ContainerAware
70 70
             return new Response(null, 410);
71 71
         }
72 72
 
73
+        $statusCode = $permanent ? 301 : 302;
74
+
75
+        // redirect if the path is a full URL
76
+        if (parse_url($path, PHP_URL_SCHEME)) {
77
+            return new RedirectResponse($path, $statusCode);
78
+        }
79
+
73 80
         $request = $this->container->get('request');
74 81
         if (null === $scheme) {
75 82
             $scheme = $request->getScheme();
@@ -89,6 +96,6 @@ class RedirectController extends ContainerAware
89 96
 
90 97
         $url = $scheme.'://'.$request->getHost().$port.$request->getBaseUrl().$path.$qs;
91 98
 
92
-        return new RedirectResponse($url, $permanent ? 301 : 302);
99
+        return new RedirectResponse($url, $statusCode);
93 100
     }
94 101
 }

+ 1 - 1
vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventDispatcher.php View File

@@ -178,7 +178,7 @@ class TraceableEventDispatcher extends ContainerAwareEventDispatcher implements
178 178
             if (!is_array($listener)) {
179 179
                 $listener = array($listener, '__invoke');
180 180
             }
181
-            $class = get_class($listener[0]);
181
+            $class = is_object($listener[0]) ? get_class($listener[0]) : $listener[0];
182 182
             try {
183 183
                 $r = new \ReflectionMethod($class, $listener[1]);
184 184
                 $file = $r->getFileName();

+ 4 - 0
vendor/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php View File

@@ -17,6 +17,7 @@ use Symfony\Component\DependencyInjection\DefinitionDecorator;
17 17
 use Symfony\Component\DependencyInjection\Reference;
18 18
 use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
19 19
 use Symfony\Component\Config\Resource\FileResource;
20
+use Symfony\Component\Config\Resource\DirectoryResource;
20 21
 use Symfony\Component\Finder\Finder;
21 22
 use Symfony\Component\HttpKernel\DependencyInjection\Extension;
22 23
 use Symfony\Component\Config\FileLocator;
@@ -507,6 +508,9 @@ class FrameworkExtension extends Extension
507 508
 
508 509
             // Register translation resources
509 510
             if ($dirs) {
511
+                foreach ($dirs as $dir) {
512
+                    $container->addResource(new DirectoryResource($dir));
513
+                }
510 514
                 $finder = new Finder();
511 515
                 $finder->files()->filter(function (\SplFileInfo $file) {
512 516
                     return 2 === substr_count($file->getBasename(), '.') && preg_match('/\.\w+$/', $file->getBasename());

+ 3 - 2
vendor/symfony/src/Symfony/Bundle/FrameworkBundle/HttpKernel.php View File

@@ -140,6 +140,7 @@ class HttpKernel extends BaseHttpKernel
140 140
 
141 141
             $options['attributes']['_route'] = '_internal';
142 142
             $subRequest = $request->duplicate($options['query'], null, $options['attributes']);
143
+            $subRequest->setMethod('GET');
143 144
         }
144 145
 
145 146
         $level = ob_get_level();
@@ -189,14 +190,14 @@ class HttpKernel extends BaseHttpKernel
189 190
             return $controller;
190 191
         }
191 192
 
192
-        $path = http_build_query($attributes);
193
+        $path = http_build_query($attributes, '', '&');
193 194
         $uri = $this->container->get('router')->generate('_internal', array(
194 195
             'controller' => $controller,
195 196
             'path'       => $path ?: 'none',
196 197
             '_format'    => $this->container->get('request')->getRequestFormat(),
197 198
         ));
198 199
 
199
-        if ($queryString = http_build_query($query)) {
200
+        if ($queryString = http_build_query($query, '', '&')) {
200 201
             $uri .= '?'.$queryString;
201 202
         }
202 203
 

+ 171 - 0
vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.hr.xliff View File

@@ -0,0 +1,171 @@
1
+<?xml version="1.0"?>
2
+<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3
+    <file source-language="en" datatype="plaintext" original="file.ext">
4
+        <body>
5
+            <trans-unit id="1">
6
+                <source>This value should be false</source>
7
+                <target>Ova vrijednost treba biti netočna</target>
8
+            </trans-unit>
9
+            <trans-unit id="2">
10
+                <source>This value should be true</source>
11
+                <target>Ova vrijednost treba biti točna</target>
12
+            </trans-unit>
13
+            <trans-unit id="3">
14
+                <source>This value should be of type {{ type }}</source>
15
+                <target>Ova vrijednost treba biti tipa {{ type }}</target>
16
+            </trans-unit>
17
+            <trans-unit id="4">
18
+                <source>This value should be blank</source>
19
+                <target>Ova vrijednost treba biti prazna</target>
20
+            </trans-unit>
21
+            <trans-unit id="5">
22
+                <source>The value you selected is not a valid choice</source>
23
+                <target>Ova vrijednost treba biti jedna od ponuđenih</target>
24
+            </trans-unit>
25
+            <trans-unit id="6">
26
+                <source>You must select at least {{ limit }} choices</source>
27
+                <target>Izaberite barem {{ limit }} mogućnosti</target>
28
+            </trans-unit>
29
+            <trans-unit id="7">
30
+                <source>You must select at most {{ limit }} choices</source>
31
+                <target>Izaberite najviše {{ limit }} mogućnosti</target>
32
+            </trans-unit>
33
+            <trans-unit id="8">
34
+                <source>One or more of the given values is invalid</source>
35
+                <target>Jedna ili više danih vrijednosti nije ispravna</target>
36
+            </trans-unit>
37
+            <trans-unit id="9">
38
+                <source>The fields {{ fields }} were not expected</source>
39
+                <target>Polja {{ fields }} nisu bila očekivana</target>
40
+            </trans-unit>
41
+            <trans-unit id="10">
42
+                <source>The fields {{ fields }} are missing</source>
43
+                <target>Polja {{ fields }} nedostaju</target>
44
+            </trans-unit>
45
+            <trans-unit id="11">
46
+                <source>This value is not a valid date</source>
47
+                <target>Ova vrijednost nije ispravan datum</target>
48
+            </trans-unit>
49
+            <trans-unit id="12">
50
+                <source>This value is not a valid datetime</source>
51
+                <target>Ova vrijednost nije ispravan datum-vrijeme</target>
52
+            </trans-unit>
53
+            <trans-unit id="13">
54
+                <source>This value is not a valid email address</source>
55
+                <target>Ova vrijednost nije ispravna e-mail adresa</target>
56
+            </trans-unit>
57
+            <trans-unit id="14">
58
+                <source>The file could not be found</source>
59
+                <target>Datoteka ne može biti pronađena</target>
60
+            </trans-unit>
61
+            <trans-unit id="15">
62
+                <source>The file is not readable</source>
63
+                <target>Datoteka nije čitljiva</target>
64
+            </trans-unit>
65
+            <trans-unit id="16">
66
+                <source>The file is too large ({{ size }}). Allowed maximum size is {{ limit }}</source>
67
+                <target>Datoteka je prevelika ({{ size }}). Najveća dozvoljena veličina je {{ limit }}</target>
68
+            </trans-unit>
69
+            <trans-unit id="17">
70
+                <source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}</source>
71
+                <target>Mime tip datoteke nije ispravan ({{ type }}). Dozvoljeni mime tipovi su {{ types }}</target>
72
+            </trans-unit>
73
+            <trans-unit id="18">
74
+                <source>This value should be {{ limit }} or less</source>
75
+                <target>Ova vrijednost treba biti {{ limit }} ili manje</target>
76
+            </trans-unit>
77
+            <trans-unit id="19">
78
+                <source>This value is too long. It should have {{ limit }} characters or less</source>
79
+                <target>Ova vrijednost je predugačka. Treba imati {{ limit }} znakova ili manje</target>
80
+            </trans-unit>
81
+            <trans-unit id="20">
82
+                <source>This value should be {{ limit }} or more</source>
83
+                <target>Ova vrijednost treba biti {{ limit }} ili više</target>
84
+            </trans-unit>
85
+            <trans-unit id="21">
86
+                <source>This value is too short. It should have {{ limit }} characters or more</source>
87
+                <target>Ova vrijednost je prekratka. Treba imati {{ limit }} znakova ili više</target>
88
+            </trans-unit>
89
+            <trans-unit id="22">
90
+                <source>This value should not be blank</source>
91
+                <target>Ova vrijednost ne smije biti prazna</target>
92
+            </trans-unit>
93
+            <trans-unit id="23">
94
+                <source>This value should not be null</source>
95
+                <target>Ova vrijednost ne smije biti null</target>
96
+            </trans-unit>
97
+            <trans-unit id="24">
98
+                <source>This value should be null</source>
99
+                <target>Ova vrijednost treba biti null</target>
100
+            </trans-unit>
101
+            <trans-unit id="25">
102
+                <source>This value is not valid</source>
103
+                <target>Ova vrijednost nije ispravna</target>
104
+            </trans-unit>
105
+            <trans-unit id="26">
106
+                <source>This value is not a valid time</source>
107
+                <target>Ova vrijednost nije ispravno vrijeme</target>
108
+            </trans-unit>
109
+            <trans-unit id="27">
110
+                <source>This value is not a valid URL</source>
111
+                <target>Ova vrijednost nije ispravan URL</target>
112
+            </trans-unit>
113
+            <trans-unit id="28">
114
+                <source>This form should not contain extra fields</source>
115
+                <target>Ovaj obrazac ne smije sadržavati dodatna polja</target>
116
+            </trans-unit>
117
+            <trans-unit id="29">
118
+                <source>The uploaded file was too large. Please try to upload a smaller file</source>
119
+                <target>Prenesena datoteka je prevelika. Molim pokušajte prenijeti manju datoteku</target>
120
+            </trans-unit>
121
+            <trans-unit id="30">
122
+                <source>The CSRF token is invalid</source>
123
+                <target>CSRF vrijednost nije ispravna</target>
124
+            </trans-unit>
125
+            <trans-unit id="31">
126
+                <source>The two values should be equal</source>
127
+                <target>Obje vrijednosti trebaju biti jednake</target>
128
+            </trans-unit>
129
+            <trans-unit id="32">
130
+                <source>The file is too large. Allowed maximum size is {{ limit }}</source>
131
+                <target>Ova datoteka je prevelika. Najveća dozvoljena veličina je {{ limit }}</target>
132
+            </trans-unit>
133
+            <trans-unit id="33">
134
+                <source>The file is too large</source>
135
+                <target>Ova datoteka je prevelika</target>
136
+            </trans-unit>
137
+            <trans-unit id="34">
138
+                <source>The file could not be uploaded</source>
139
+                <target>Ova datoteka ne može biti prenesena</target>
140
+            </trans-unit>
141
+            <trans-unit id="35">
142
+                <source>This value should be a valid number</source>
143
+                <target>Ova vrijednost treba biti ispravan broj</target>
144
+            </trans-unit>
145
+            <trans-unit id="36">
146
+                <source>This file is not a valid image</source>
147
+                <target>Ova datoteka nije ispravna slika</target>
148
+            </trans-unit>
149
+            <trans-unit id="37">
150
+                <source>This is not a valid IP address</source>
151
+                <target>Ovo nije ispravna IP adresa</target>
152
+            </trans-unit>
153
+            <trans-unit id="38">
154
+                <source>This value is not a valid language</source>
155
+                <target>Ova vrijednost nije ispravan jezik</target>
156
+            </trans-unit>
157
+            <trans-unit id="39">
158
+                <source>This value is not a valid locale</source>
159
+                <target>Ova vrijednost nije ispravana regionalna oznaka</target>
160
+            </trans-unit>
161
+            <trans-unit id="40">
162
+                <source>This value is not a valid country</source>
163
+                <target>Ova vrijednost nije ispravna zemlja</target>
164
+            </trans-unit>
165
+            <trans-unit id="41">
166
+                <source>This value is already used</source>
167
+                <target>Ova vrijednost je već iskorištena</target>
168
+            </trans-unit>
169
+        </body>
170
+    </file>
171
+</xliff>

+ 1 - 1
vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.nl.xliff View File

@@ -24,7 +24,7 @@
24 24
             </trans-unit>
25 25
             <trans-unit id="6">
26 26
                 <source>You must select at least {{ limit }} choices</source>
27
-                <target>Selecteer tenminste {{ limit }} opties</target>
27
+                <target>Selecteer ten minste {{ limit }} opties</target>
28 28
             </trans-unit>
29 29
             <trans-unit id="7">
30 30
                 <source>You must select at most {{ limit }} choices</source>

+ 11 - 4
vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php View File

@@ -92,15 +92,22 @@ class RedirectControllerTest extends TestCase
92 92
 
93 93
     public function testEmptyPath()
94 94
     {
95
-        $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
96
-
97 95
         $controller = new RedirectController();
98
-        $controller->setContainer($container);
99
-
100 96
         $returnResponse = $controller->urlRedirectAction('');
101 97
 
102 98
         $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $returnResponse);
103 99
 
104 100
         $this->assertEquals(410, $returnResponse->getStatusCode());
105 101
     }
102
+
103
+    public function testFullURL()
104
+    {
105
+        $controller = new RedirectController();
106
+        $returnResponse = $controller->urlRedirectAction('http://foo.bar/');
107
+
108
+        $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $returnResponse);
109
+
110
+        $this->assertEquals('http://foo.bar/', $returnResponse->headers->get('Location'));
111
+        $this->assertEquals(302, $returnResponse->getStatusCode());
112
+    }
106 113
 }

+ 22 - 0
vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Debug/TraceableEventDispatcherTest.php View File

@@ -26,4 +26,26 @@ class TraceableEventDispatcherTest extends TestCase
26 26
         $dispatcher = new TraceableEventDispatcher($container);
27 27
         $dispatcher->addListener('onFooEvent', new \stdClass());
28 28
     }
29
+
30
+    public function testStaticCallable()
31
+    {
32
+        $container  = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
33
+        $dispatcher = new TraceableEventDispatcher($container);
34
+
35
+        $dispatcher->addListener('onFooEvent', array(__NAMESPACE__.'\StaticClassFixture', 'staticListener'));
36
+
37
+        $dispatcher->dispatch('onFooEvent');
38
+
39
+        $this->assertTrue(StaticClassFixture::$called);
40
+    }
41
+}
42
+
43
+class StaticClassFixture
44
+{
45
+    static public $called = false;
46
+
47
+    static public function staticListener($event)
48
+    {
49
+        self::$called = true;
50
+    }
29 51
 }

+ 1 - 1
vendor/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php View File

@@ -274,7 +274,7 @@ class MainConfiguration implements ConfigurationInterface
274 274
                             continue;
275 275
                         }
276 276
 
277
-                        if (!preg_match('#'.$firewall['pattern'].'#', $firewall[$k]['check_path'])) {
277
+                        if (false !== strpos('/', $firewall[$k]['check_path']) && !preg_match('#'.$firewall['pattern'].'#', $firewall[$k]['check_path'])) {
278 278
                             throw new \LogicException(sprintf('The check_path "%s" for login method "%s" is not matched by the firewall pattern "%s".', $firewall[$k]['check_path'], $k, $firewall['pattern']));
279 279
                         }
280 280
                     }

+ 1 - 1
vendor/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpDigestFactory.php View File

@@ -62,7 +62,7 @@ class HttpDigestFactory implements SecurityFactoryInterface
62 62
             ->children()
63 63
                 ->scalarNode('provider')->end()
64 64
                 ->scalarNode('realm')->defaultValue('Secured Area')->end()
65
-                ->scalarNode('key')->cannotBeEmpty()->end()
65
+                ->scalarNode('key')->isRequired()->cannotBeEmpty()->end()
66 66
             ->end()
67 67
         ;
68 68
     }

+ 1 - 1
vendor/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/container1.php View File

@@ -48,7 +48,7 @@ $container->loadFromExtension('security', array(
48 48
         'simple' => array('pattern' => '/login', 'security' => false),
49 49
         'secure' => array('stateless' => true,
50 50
             'http_basic' => true,
51
-            'http_digest' => true,
51
+            'http_digest' => array('key' => 'TheKey'),
52 52
             'form_login' => true,
53 53
             'anonymous' => true,
54 54
             'switch_user' => true,

+ 1 - 1
vendor/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/container1.xml View File

@@ -41,7 +41,7 @@
41 41
 
42 42
         <firewall name="secure" stateless="true">
43 43
             <http-basic />
44
-            <http-digest />
44
+            <http-digest key="TheKey" />
45 45
             <form-login />
46 46
             <anonymous />
47 47
             <switch-user />

+ 2 - 1
vendor/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml View File

@@ -35,7 +35,8 @@ security:
35 35
         secure:
36 36
             stateless: true
37 37
             http_basic: true
38
-            http_digest: true
38
+            http_digest:
39
+                key: TheKey
39 40
             form_login: true
40 41
             anonymous: true
41 42
             switch_user: true

+ 7 - 5
vendor/symfony/src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php View File

@@ -61,13 +61,15 @@ class ExceptionController extends ContainerAware
61 61
 
62 62
     protected function getAndCleanOutputBuffering()
63 63
     {
64
-        // the count variable avoids an infinite loop on
65
-        // some Windows configurations where ob_get_level()
66
-        // never reaches 0
67
-        $count = 100;
64
+        // ob_get_level() never returns 0 on some Windows configurations, so if
65
+        // the level is the same two times in a row, the loop should be stopped.
66
+        $previousObLevel = null;
68 67
         $startObLevel = $this->container->get('request')->headers->get('X-Php-Ob-Level', -1);
68
+
69 69
         $currentContent = '';
70
-        while (ob_get_level() > $startObLevel && --$count) {
70
+
71
+        while (($obLevel = ob_get_level()) > $startObLevel && $obLevel !== $previousObLevel) {
72
+            $previousObLevel = $obLevel;
71 73
             $currentContent .= ob_get_clean();
72 74
         }
73 75
 

+ 1 - 0
vendor/symfony/src/Symfony/Bundle/TwigBundle/Resources/config/schema/twig-1.0.xsd View File

@@ -20,6 +20,7 @@
20 20
         <xsd:attribute name="charset" type="xsd:string" />
21 21
         <xsd:attribute name="debug" type="xsd:string" />
22 22
         <xsd:attribute name="strict-variables" type="xsd:string" />
23
+        <xsd:attribute name="exception-controller" type="xsd:string" />
23 24
     </xsd:complexType>
24 25
 
25 26
     <xsd:complexType name="form">

+ 1 - 1
vendor/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php View File

@@ -66,7 +66,7 @@ class TwigExtensionTest extends TestCase
66 66
 
67 67
         // Yaml and Php specific configs
68 68
         if (in_array($format, array('yml', 'php'))) {
69
-            $this->assertEquals('bad', $calls[2][1][0], '->load() registers variables as Twig globals');
69
+            $this->assertEquals('bad', $calls[2][1][0], '->load() registers variables as Twig globals');
70 70
             $this->assertEquals(array('key' => 'foo'), $calls[2][1][1], '->load() registers variables as Twig globals');
71 71
         }
72 72
 

+ 2 - 0
vendor/symfony/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php View File

@@ -84,6 +84,8 @@ class ApcUniversalClassLoader extends UniversalClassLoader
84 84
      * Finds a file by class name while caching lookups to APC.
85 85
      *
86 86
      * @param string $class A class name to resolve to file
87
+     *
88
+     * @return string|null The path, if found
87 89
      */
88 90
     public function findFile($class)
89 91
     {

+ 1 - 1
vendor/symfony/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php View File

@@ -172,7 +172,7 @@ class ClassCollectionLoader
172 172
     /**
173 173
      * Writes a cache file.
174 174
      *
175
-     * @param string $file Filename
175
+     * @param string $file    Filename
176 176
      * @param string $content Temporary file content
177 177
      *
178 178
      * @throws \RuntimeException when a cache file cannot be written

+ 2 - 2
vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php View File

@@ -169,8 +169,8 @@ class UniversalClassLoader
169 169
     /**
170 170
      * Registers a set of classes using the PEAR naming convention.
171 171
      *
172
-     * @param string       $prefix  The classes prefix
173
-     * @param array|string $paths   The location(s) of the classes
172
+     * @param string       $prefix The classes prefix
173
+     * @param array|string $paths  The location(s) of the classes
174 174
      *
175 175
      * @api
176 176
      */

+ 39 - 4
vendor/symfony/src/Symfony/Component/Console/Application.php View File

@@ -733,13 +733,16 @@ class Application
733 733
         do {
734 734
             $title = sprintf('  [%s]  ', get_class($e));
735 735
             $len = $strlen($title);
736
+            $width = $this->getTerminalWidth() ? $this->getTerminalWidth() - 1 : PHP_INT_MAX;
736 737
             $lines = array();
737
-            foreach (explode("\n", $e->getMessage()) as $line) {
738
-                $lines[] = sprintf('  %s  ', $line);
739
-                $len = max($strlen($line) + 4, $len);
738
+            foreach (preg_split("{\r?\n}", $e->getMessage()) as $line) {
739
+                foreach (str_split($line, $width - 4) as $line) {
740
+                    $lines[] = sprintf('  %s  ', $line);
741
+                    $len = max($strlen($line) + 4, $len);
742
+                }
740 743
             }
741 744
 
742
-            $messages = array(str_repeat(' ', $len), $title.str_repeat(' ', $len - $strlen($title)));
745
+            $messages = array(str_repeat(' ', $len), $title.str_repeat(' ', max(0, $len - $strlen($title))));
743 746
 
744 747
             foreach ($lines as $line) {
745 748
                 $messages[] = $line.str_repeat(' ', $len - $strlen($line));
@@ -787,6 +790,38 @@ class Application
787 790
     }
788 791
 
789 792
     /**
793
+     * Tries to figure out the terminal width in which this application runs
794
+     *
795
+     * @return int|null
796
+     */
797
+    protected function getTerminalWidth()
798
+    {
799
+        if (defined('PHP_WINDOWS_VERSION_BUILD') && $ansicon = getenv('ANSICON')) {
800
+            return preg_replace('{^(\d+)x.*$}', '$1', $ansicon);
801
+        }
802
+
803
+        if (preg_match("{rows.(\d+);.columns.(\d+);}i", exec('stty -a | grep columns'), $match)) {
804
+            return $match[1];
805
+        }
806
+    }
807
+
808
+    /**
809
+     * Tries to figure out the terminal height in which this application runs
810
+     *
811
+     * @return int|null
812
+     */
813
+    protected function getTerminalHeight()
814
+    {
815
+        if (defined('PHP_WINDOWS_VERSION_BUILD') && $ansicon = getenv('ANSICON')) {
816
+            return preg_replace('{^\d+x\d+ \(\d+x(\d+)\)$}', '$1', trim($ansicon));
817
+        }
818
+
819
+        if (preg_match("{rows.(\d+);.columns.(\d+);}i", exec('stty -a | grep columns'), $match)) {
820
+            return $match[2];
821
+        }
822
+    }
823
+
824
+    /**
790 825
      * Gets the name of the command based on input.
791 826
      *
792 827
      * @param InputInterface $input The input interface

+ 21 - 1
vendor/symfony/src/Symfony/Component/Console/Output/ConsoleOutput.php View File

@@ -42,6 +42,26 @@ class ConsoleOutput extends StreamOutput
42 42
      */
43 43
     public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null)
44 44
     {
45
-        parent::__construct(fopen('php://stdout', 'w'), $verbosity, $decorated, $formatter);
45
+        $outputStream = 'php://stdout';
46
+        if (!$this->hasStdoutSupport()) {
47
+            $outputStream = 'php://output';
48
+        }
49
+
50
+        parent::__construct(fopen($outputStream, 'w'), $verbosity, $decorated, $formatter);
51
+    }
52
+
53
+    /**
54
+     * Returns true if current environment supports writing console output to
55
+     * STDOUT.
56
+     *
57
+     * IBM iSeries (OS400) exhibits character-encoding issues when writing to
58
+     * STDOUT and doesn't properly convert ASCII to EBCDIC, resulting in garbage
59
+     * output.
60
+     *
61
+     * @return boolean
62
+     */
63
+    protected function hasStdoutSupport()
64
+    {
65
+        return ('OS400' != php_uname('s'));
46 66
     }
47 67
 }

+ 11 - 3
vendor/symfony/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php View File

@@ -16,6 +16,7 @@ use Symfony\Component\DependencyInjection\Alias;
16 16
 use Symfony\Component\DependencyInjection\ContainerInterface;
17 17
 use Symfony\Component\DependencyInjection\Definition;
18 18
 use Symfony\Component\DependencyInjection\Reference;
19
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
19 20
 use Symfony\Component\Config\Resource\FileResource;
20 21
 use Symfony\Component\Yaml\Yaml;
21 22
 
@@ -198,23 +199,30 @@ class YamlFileLoader extends FileLoader
198 199
 
199 200
         if (isset($service['calls'])) {
200 201
             foreach ($service['calls'] as $call) {
201
-                $definition->addMethodCall($call[0], $this->resolveServices($call[1]));
202
+                $args = isset($call[1]) ? $this->resolveServices($call[1]) : array();
203
+                $definition->addMethodCall($call[0], $args);
202 204
             }
203 205
         }
204 206
 
205 207
         if (isset($service['tags'])) {
206 208
             if (!is_array($service['tags'])) {
207
-                throw new \InvalidArgumentException(sprintf('Parameter "tags" must be an array for service "%s" in %s.', $id, $file));
209
+                throw new InvalidArgumentException(sprintf('Parameter "tags" must be an array for service "%s" in %s.', $id, $file));
208 210
             }
209 211
 
210 212
             foreach ($service['tags'] as $tag) {
211 213
                 if (!isset($tag['name'])) {
212
-                    throw new \InvalidArgumentException(sprintf('A "tags" entry is missing a "name" key for service "%s" in %s.', $id, $file));
214
+                    throw new InvalidArgumentException(sprintf('A "tags" entry is missing a "name" key for service "%s" in %s.', $id, $file));
213 215
                 }
214 216
 
215 217
                 $name = $tag['name'];
216 218
                 unset($tag['name']);
217 219
 
220
+                foreach ($tag as $attribute => $value) {
221
+                    if (!is_scalar($value)) {
222
+                        throw new InvalidArgumentException(sprintf('A "tags" attribute must be of a scalar-type for service "%s", tag "%s" in %s.', $id, $name, $file));
223
+                    }
224
+                }
225
+
218 226
                 $definition->addTag($name, $tag);
219 227
             }
220 228
         }

+ 35 - 8
vendor/symfony/src/Symfony/Component/DomCrawler/Crawler.php View File

@@ -22,6 +22,9 @@ use Symfony\Component\CssSelector\CssSelector;
22 22
  */
23 23
 class Crawler extends \SplObjectStorage
24 24
 {
25
+    /**
26
+     * @var string The current URI or the base href value
27
+     */
25 28
     private $uri;
26 29
 
27 30
     /**
@@ -75,8 +78,10 @@ class Crawler extends \SplObjectStorage
75 78
     /**
76 79
      * Adds HTML/XML content.
77 80
      *
78
-     * @param string $content A string to parse as HTML/XML
79
-     * @param string $type    The content type of the string
81
+     * @param string      $content A string to parse as HTML/XML
82
+     * @param null|string $type    The content type of the string
83
+     *
84
+     * @return null|void
80 85
      */
81 86
     public function addContent($content, $type = null)
82 87
     {
@@ -208,7 +213,7 @@ class Crawler extends \SplObjectStorage
208 213
      *
209 214
      * @param integer $position The position
210 215
      *
211
-     * @return A new instance of the Crawler with the selected node, or an empty Crawler if it does not exist.
216
+     * @return Crawler A new instance of the Crawler with the selected node, or an empty Crawler if it does not exist.
212 217
      *
213 218
      * @api
214 219
      */
@@ -518,7 +523,7 @@ class Crawler extends \SplObjectStorage
518 523
     /**
519 524
      * Selects links by name or alt value for clickable images.
520 525
      *
521
-     * @param  string $value The link text
526
+     * @param string $value The link text
522 527
      *
523 528
      * @return Crawler A new instance of Crawler with the filtered list of nodes
524 529
      *
@@ -535,7 +540,7 @@ class Crawler extends \SplObjectStorage
535 540
     /**
536 541
      * Selects a button by name or alt value for images.
537 542
      *
538
-     * @param  string $value The button text
543
+     * @param string $value The button text
539 544
      *
540 545
      * @return Crawler A new instance of Crawler with the filtered list of nodes
541 546
      *
@@ -553,7 +558,7 @@ class Crawler extends \SplObjectStorage
553 558
     /**
554 559
      * Returns a Link object for the first node in the list.
555 560
      *
556
-     * @param  string $method The method for the link (get by default)
561
+     * @param string $method The method for the link (get by default)
557 562
      *
558 563
      * @return Link   A Link instance
559 564
      *
@@ -592,8 +597,8 @@ class Crawler extends \SplObjectStorage
592 597
     /**
593 598
      * Returns a Form object for the first node in the list.
594 599
      *
595
-     * @param  array  $values An array of values for the form fields
596
-     * @param  string $method The method for the form
600
+     * @param array  $values An array of values for the form fields
601
+     * @param string $method The method for the form
597 602
      *
598 603
      * @return Form   A Form instance
599 604
      *
@@ -616,6 +621,28 @@ class Crawler extends \SplObjectStorage
616 621
         return $form;
617 622
     }
618 623
 
624
+    /**
625
+     * Converts string for XPath expressions.
626
+     *
627
+     * Escaped characters are: quotes (") and apostrophe (').
628
+     *
629
+     *  Examples:
630
+     *  <code>
631
+     *     echo Crawler::xpathLiteral('foo " bar');
632
+     *     //prints 'foo " bar'
633
+     *
634
+     *     echo Crawler::xpathLiteral("foo ' bar");
635
+     *     //prints "foo ' bar"
636
+     *
637
+     *     echo Crawler::xpathLiteral('a\'b"c');
638
+     *     //prints concat('a', "'", 'b"c')
639
+     *  </code>
640
+     *
641
+     * @param string $s String to be escaped
642
+     *
643
+     * @return string Converted string
644
+     *
645
+     */
619 646
     static public function xpathLiteral($s)
620 647
     {
621 648
         if (false === strpos($s, "'")) {

+ 13 - 6
vendor/symfony/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php View File

@@ -22,8 +22,17 @@ namespace Symfony\Component\DomCrawler\Field;
22 22
  */
23 23
 class ChoiceFormField extends FormField
24 24
 {
25
+    /**
26
+     * @var string
27
+     */
25 28
     private $type;
29
+    /**
30
+     * @var Boolean
31
+     */
26 32
     private $multiple;
33
+    /**
34
+     * @var array
35
+     */
27 36
     private $options;
28 37
 
29 38
     /**
@@ -44,7 +53,7 @@ class ChoiceFormField extends FormField
44 53
     /**
45 54
      * Check if the current selected option is disabled
46 55
      *
47
-     * @return bool
56
+     * @return Boolean
48 57
      */
49 58
     public function isDisabled()
50 59
     {
@@ -62,8 +71,6 @@ class ChoiceFormField extends FormField
62 71
      *
63 72
      * @param string $value The value of the field
64 73
      *
65
-     * @throws \InvalidArgumentException When value type provided is not correct
66
-     *
67 74
      * @api
68 75
      */
69 76
     public function select($value)
@@ -74,7 +81,7 @@ class ChoiceFormField extends FormField
74 81
     /**
75 82
      * Ticks a checkbox.
76 83
      *
77
-     * @throws \InvalidArgumentException When value type provided is not correct
84
+     * @throws \LogicException When the type provided is not correct
78 85
      *
79 86
      * @api
80 87
      */
@@ -90,7 +97,7 @@ class ChoiceFormField extends FormField
90 97
     /**
91 98
      * Ticks a checkbox.
92 99
      *
93
-     * @throws \InvalidArgumentException When value type provided is not correct
100
+     * @throws \LogicException When the type provided is not correct
94 101
      *
95 102
      * @api
96 103
      */
@@ -248,7 +255,7 @@ class ChoiceFormField extends FormField
248 255
     /**
249 256
      * Returns option value with associated disabled flag
250 257
      *
251
-     * @param type $node
258
+     * @param \DOMNode $node
252 259
      *
253 260
      * @return array
254 261
      */

+ 23 - 0
vendor/symfony/src/Symfony/Component/DomCrawler/Field/FormField.php View File

@@ -18,11 +18,29 @@ namespace Symfony\Component\DomCrawler\Field;
18 18
  */
19 19
 abstract class FormField
20 20
 {
21
+    /**
22
+     * @var \DOMNode
23
+     */
21 24
     protected $node;
25
+    /**
26
+     * @var string
27
+     */
22 28
     protected $name;
29
+    /**
30
+     * @var string
31
+     */
23 32
     protected $value;
33
+    /**
34
+     * @var \DOMDocument
35
+     */
24 36
     protected $document;
37
+    /**
38
+     * @var \DOMXPath
39
+     */
25 40
     protected $xpath;
41
+    /**
42
+     * @var Boolean
43
+     */
26 44
     protected $disabled;
27 45
 
28 46
     /**
@@ -87,6 +105,11 @@ abstract class FormField
87 105
         return true;
88 106
     }
89 107
 
108
+    /**
109
+     * Check if the current field is disabled
110
+     *
111
+     * @return Boolean
112
+     */
90 113
     public function isDisabled()
91 114
     {
92 115
         return $this->node->hasAttribute('disabled');

+ 10 - 4
vendor/symfony/src/Symfony/Component/DomCrawler/Form.php View File

@@ -22,7 +22,13 @@ use Symfony\Component\DomCrawler\Field\FormField;
22 22
  */
23 23
 class Form extends Link implements \ArrayAccess
24 24
 {
25
+    /**
26
+     * @var \DOMNode
27
+     */
25 28
     private $button;
29
+    /**
30
+     * @var Field\FormField[]
31
+     */
26 32
     private $fields;
27 33
 
28 34
     /**
@@ -58,6 +64,8 @@ class Form extends Link implements \ArrayAccess
58 64
      *
59 65
      * @param array $values An array of field values
60 66
      *
67
+     * @return Form
68
+     *
61 69
      * @api
62 70
      */
63 71
     public function setValues(array $values)
@@ -133,7 +141,7 @@ class Form extends Link implements \ArrayAccess
133 141
      */
134 142
     public function getPhpValues()
135 143
     {
136
-        $qs = http_build_query($this->getValues());
144
+        $qs = http_build_query($this->getValues(), '', '&');
137 145
         parse_str($qs, $values);
138 146
 
139 147
         return $values;
@@ -151,7 +159,7 @@ class Form extends Link implements \ArrayAccess
151 159
      */
152 160
     public function getPhpFiles()
153 161
     {
154
-        $qs = http_build_query($this->getFiles());
162
+        $qs = http_build_query($this->getFiles(), '', '&');
155 163
         parse_str($qs, $values);
156 164
 
157 165
         return $values;
@@ -254,8 +262,6 @@ class Form extends Link implements \ArrayAccess
254 262
      *
255 263
      * @param Field\FormField $field The field
256 264
      *
257
-     * @return FormField The field instance
258
-     *
259 265
      * @api
260 266
      */
261 267
     public function set(Field\FormField $field)

+ 23 - 2
vendor/symfony/src/Symfony/Component/DomCrawler/Link.php View File

@@ -20,8 +20,17 @@ namespace Symfony\Component\DomCrawler;
20 20
  */
21 21
 class Link
22 22
 {
23
+    /**
24
+     * @var \DOMNode A \DOMNode instance
25
+     */
23 26
     protected $node;
27
+    /**
28
+     * @var string The method to use for the link
29
+     */
24 30
     protected $method;
31
+    /**
32
+     * @var string The URI of the page where the link is embedded (or the base href)
33
+     */
25 34
     protected $currentUri;
26 35
 
27 36
     /**
@@ -31,7 +40,7 @@ class Link
31 40
      * @param string   $currentUri The URI of the page where the link is embedded (or the base href)
32 41
      * @param string   $method     The method to use for the link (get by default)
33 42
      *
34
-     * @throws \LogicException if the node is not a link
43
+     * @throws \InvalidArgumentException if the node is not a link
35 44
      *
36 45
      * @api
37 46
      */
@@ -90,7 +99,7 @@ class Link
90 99
         }
91 100
 
92 101
         // only an anchor
93
-        if ('#' ===  $uri[0]) {
102
+        if ('#' === $uri[0]) {
94 103
             $baseUri = $this->currentUri;
95 104
             if (false !== $pos = strpos($baseUri, '#')) {
96 105
                 $baseUri = substr($baseUri, 0, $pos);
@@ -120,11 +129,23 @@ class Link
120 129
         return substr($this->currentUri, 0, strrpos($this->currentUri, '/') + 1).$uri;
121 130
     }
122 131
 
132
+    /**
133
+     * Returns raw uri data
134
+     *
135
+     * @return string
136
+     */
123 137
     protected function getRawUri()
124 138
     {
125 139
         return $this->node->getAttribute('href');
126 140
     }
127 141
 
142
+    /**
143
+     * Sets current \DOMNode instance
144
+     *
145
+     * @param \DOMNode $node A \DOMNode instance
146
+     *
147
+     * @throws \LogicException If given node is not an anchor
148
+     */
128 149
     protected function setNode(\DOMNode $node)
129 150
     {
130 151
         if ('a' != $node->nodeName) {

+ 1 - 1
vendor/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php View File

@@ -117,7 +117,7 @@ class EventDispatcher implements EventDispatcherInterface
117 117
             if (is_string($params)) {
118 118
                 $this->addListener($eventName, array($subscriber, $params));
119 119
             } else {
120
-                $this->addListener($eventName, array($subscriber, $params[0]), $params[1]);
120
+                $this->addListener($eventName, array($subscriber, $params[0]), isset($params[1]) ? $params[1] : 0);
121 121
             }
122 122
         }
123 123
     }

+ 4 - 1
vendor/symfony/src/Symfony/Component/Finder/Comparator/DateComparator.php View File

@@ -32,7 +32,10 @@ class DateComparator extends Comparator
32 32
             throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a date test.', $test));
33 33
         }
34 34
 
35
-        if (false === $target = @strtotime($matches[2])) {
35
+        try {
36
+            $date = new \DateTime($matches[2]);
37
+            $target = $date->format('U');
38
+        } catch (\Exception $e) {
36 39
             throw new \InvalidArgumentException(sprintf('"%s" is not a valid date.', $matches[2]));
37 40
         }
38 41
 

+ 2 - 2
vendor/symfony/src/Symfony/Component/HttpFoundation/ParameterBag.php View File

@@ -104,7 +104,7 @@ class ParameterBag
104 104
 
105 105
         $value = $this->parameters[$root];
106 106
         $currentKey = null;
107
-        for ($i=$pos,$c=strlen($path); $i<$c; $i++) {
107
+        for ($i = $pos, $c = strlen($path); $i < $c; $i++) {
108 108
             $char = $path[$i];
109 109
 
110 110
             if ('[' === $char) {
@@ -234,7 +234,7 @@ class ParameterBag
234 234
      * @param mixed   $default The default value if the parameter key does not exist
235 235
      * @param boolean $deep If true, a path like foo[bar] will find deeper items
236 236
      *
237
-     * @return string The filtered value
237
+     * @return integer The filtered value
238 238
      *
239 239
      * @api
240 240
      */

+ 2 - 2
vendor/symfony/src/Symfony/Component/HttpFoundation/Request.php View File

@@ -564,9 +564,9 @@ class Request
564 564
     {
565 565
         if (self::$trustProxy && $this->headers->has('X-Forwarded-Port')) {
566 566
             return $this->headers->get('X-Forwarded-Port');
567
-        } else {
568
-            return $this->server->get('SERVER_PORT');
569 567
         }
568
+
569
+        return $this->server->get('SERVER_PORT');
570 570
     }
571 571
 
572 572
     /**

+ 1 - 1
vendor/symfony/src/Symfony/Component/HttpFoundation/ServerBag.php View File

@@ -28,7 +28,7 @@ class ServerBag extends ParameterBag
28 28
             }
29 29
             // CONTENT_* are not prefixed with HTTP_
30 30
             elseif (in_array($key, array('CONTENT_LENGTH', 'CONTENT_MD5', 'CONTENT_TYPE'))) {
31
-                $headers[$key] = $this->parameters[$key];
31
+                $headers[$key] = $value;
32 32
             }
33 33
         }
34 34
 

+ 2 - 0
vendor/symfony/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php View File

@@ -26,6 +26,8 @@ class ErrorHandler
26 26
         E_USER_NOTICE       => 'User Notice',
27 27
         E_STRICT            => 'Runtime Notice',
28 28
         E_RECOVERABLE_ERROR => 'Catchable Fatal Error',
29
+        E_DEPRECATED        => 'Deprecated',
30
+        E_USER_DEPRECATED   => 'User Deprecated',
29 31
     );
30 32
 
31 33
     private $level;

+ 1 - 0
vendor/symfony/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php View File

@@ -74,6 +74,7 @@ class ExceptionListener
74 74
         );
75 75
 
76 76
         $request = $request->duplicate(null, null, $attributes);
77
+        $request->setMethod('GET');
77 78
 
78 79
         try {
79 80
             $response = $event->getKernel()->handle($request, HttpKernelInterface::SUB_REQUEST, true);

+ 38 - 15
vendor/symfony/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php View File

@@ -15,6 +15,7 @@ use Symfony\Component\HttpKernel\HttpKernelInterface;
15 15
 use Symfony\Component\HttpKernel\Event\GetResponseEvent;
16 16
 use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
17 17
 use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
18
+use Symfony\Component\HttpKernel\Profiler\Profile;
18 19
 use Symfony\Component\HttpKernel\Profiler\Profiler;
19 20
 use Symfony\Component\HttpFoundation\RequestMatcherInterface;
20 21
 
@@ -32,6 +33,7 @@ class ProfilerListener
32 33
     protected $exception;
33 34
     protected $children;
34 35
     protected $requests;
36
+    protected $profiles;
35 37
 
36 38
     /**
37 39
      * Constructor.
@@ -48,6 +50,7 @@ class ProfilerListener
48 50
         $this->onlyException = (Boolean) $onlyException;
49 51
         $this->onlyMasterRequests = (Boolean) $onlyMasterRequests;
50 52
         $this->children = new \SplObjectStorage();
53
+        $this->profiles = array();
51 54
     }
52 55
 
53 56
     /**
@@ -85,14 +88,25 @@ class ProfilerListener
85 88
             return;
86 89
         }
87 90
 
91
+        $request = $event->getRequest();
88 92
         $exception = $this->exception;
89 93
         $this->exception = null;
90 94
 
91
-        if (null !== $this->matcher && !$this->matcher->matches($event->getRequest())) {
95
+        if (null !== $this->matcher && !$this->matcher->matches($request)) {
92 96
             return;
93 97
         }
94 98
 
95
-        if (!$profile = $this->profiler->collect($event->getRequest(), $event->getResponse(), $exception)) {
99
+        if (!$profile = $this->profiler->collect($request, $event->getResponse(), $exception)) {
100
+            return;
101
+        }
102
+
103
+        $this->profiles[] = $profile;
104
+
105
+        if (null !== $exception) {
106
+            foreach ($this->profiles as $profile) {
107
+                $this->profiler->saveProfile($profile);
108
+            }
109
+
96 110
             return;
97 111
         }
98 112
 
@@ -100,27 +114,36 @@ class ProfilerListener
100 114
         if (!$master) {
101 115
             array_pop($this->requests);
102 116
 
103
-            $parent = $this->requests[count($this->requests) - 1];
104
-            if (!isset($this->children[$parent])) {
105
-                $profiles = array($profile);
106
-            } else {
107
-                $profiles = $this->children[$parent];
108
-                $profiles[] = $profile;
109
-            }
110
-
117
+            $parent = end($this->requests);
118
+            $profiles = isset($this->children[$parent]) ? $this->children[$parent] : array();
119
+            $profiles[] = $profile;
111 120
             $this->children[$parent] = $profiles;
112 121
         }
113 122
 
114
-        // store the profile and its children
115
-        if (isset($this->children[$event->getRequest()])) {
116
-            foreach ($this->children[$event->getRequest()] as $child) {
123
+        if (isset($this->children[$request])) {
124
+            foreach ($this->children[$request] as $child) {
117 125
                 $child->setParent($profile);
118 126
                 $profile->addChild($child);
119
-                $this->profiler->saveProfile($child);
120 127
             }
121
-            $this->children[$event->getRequest()] = array();
128
+            $this->children[$request] = array();
122 129
         }
123 130
 
131
+        if ($master) {
132
+            $this->saveProfiles($profile);
133
+        }
134
+    }
135
+
136
+    /**
137
+     * Saves the profile hierarchy.
138
+     *
139
+     * @param Profile $profile The root profile
140
+     */
141
+    private function saveProfiles(Profile $profile)
142
+    {
124 143
         $this->profiler->saveProfile($profile);
144
+        foreach ($profile->getChildren() as $profile) {
145
+            $this->saveProfiles($profile);
146
+        }
125 147
     }
126 148
 }
149
+

+ 2 - 2
vendor/symfony/src/Symfony/Component/HttpKernel/HttpCache/Store.php View File

@@ -110,7 +110,7 @@ class Store implements StoreInterface
110 110
         // find a cached entry that matches the request.
111 111
         $match = null;
112 112
         foreach ($entries as $entry) {
113
-            if ($this->requestsMatch(isset($entry[1]['vary']) ? $entry[1]['vary'][0] : '', $request->headers->all(), $entry[0])) {
113
+            if ($this->requestsMatch(isset($entry[1]['vary'][0]) ? $entry[1]['vary'][0] : '', $request->headers->all(), $entry[0])) {
114 114
                 $match = $entry;
115 115
 
116 116
                 break;
@@ -167,7 +167,7 @@ class Store implements StoreInterface
167 167
         $entries = array();
168 168
         $vary = $response->headers->get('vary');
169 169
         foreach ($this->getMetadata($key) as $entry) {
170
-            if (!isset($entry[1]['vary'])) {
170
+            if (!isset($entry[1]['vary'][0])) {
171 171
                 $entry[1]['vary'] = array('');
172 172
             }
173 173
 

+ 1 - 1
vendor/symfony/src/Symfony/Component/HttpKernel/Kernel.php View File

@@ -57,7 +57,7 @@ abstract class Kernel implements KernelInterface
57 57
     protected $startTime;
58 58
     protected $classes;
59 59
 
60
-    const VERSION = '2.0.12';
60
+    const VERSION = '2.0.13';
61 61
 
62 62
     /**
63 63
      * Constructor.

+ 1 - 1
vendor/symfony/src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php View File

@@ -33,7 +33,7 @@ class MethodArgumentValueNotImplementedException extends NotImplementedException
33 33
             $methodName,
34 34
             $argName,
35 35
             var_export($argValue, true),
36
-            $additionalMessage != '' ? ' '.$additionalMessage.'. ' : ''
36
+            $additionalMessage !== '' ? ' '.$additionalMessage.'. ' : ''
37 37
         );
38 38
 
39 39
         parent::__construct($message);

+ 19 - 3
vendor/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php View File

@@ -19,7 +19,8 @@ use Symfony\Component\Locale\Stub\StubIntl;
19 19
  * @return Boolean Whether the error code indicates an error
20 20
  * @see    Symfony\Component\Locale\Stub\StubIntl::isFailure
21 21
  */
22
-function intl_is_failure($errorCode) {
22
+function intl_is_failure($errorCode)
23
+{
23 24
     return StubIntl::isFailure($errorCode);
24 25
 }
25 26
 
@@ -31,9 +32,11 @@ function intl_is_failure($errorCode) {
31 32
  *                 StubIntl::U_ZERO_ERROR if no error occurred
32 33
  * @see    Symfony\Component\Locale\Stub\StubIntl::getErrorCode
33 34
  */
34
-function intl_get_error_code() {
35
+function intl_get_error_code()
36
+{
35 37
     return StubIntl::getErrorCode();
36 38
 }
39
+
37 40
 /**
38 41
  * Stub implementation for the intl_get_error_code function of the intl extension
39 42
  *
@@ -42,6 +45,19 @@ function intl_get_error_code() {
42 45
  *                 "U_ZERO_ERROR" if no error occurred
43 46
  * @see    Symfony\Component\Locale\Stub\StubIntl::getErrorMessage
44 47
  */
45
-function intl_get_error_message() {
48
+function intl_get_error_message()
49
+{
46 50
     return StubIntl::getErrorMessage();
47 51
 }
52
+
53
+/**
54
+ * Stub implementation for the intl_error_name function of the intl extension
55
+ *
56
+ * @return String will be the same as the name of the error code constant
57
+ *
58
+ * @see    Symfony\Component\Locale\Stub\StubIntl::getErrorName
59
+ */
60
+function intl_error_name($errorCode)
61
+{
62
+    return StubIntl::getErrorName($errorCode);
63
+}

+ 2 - 2
vendor/symfony/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php View File

@@ -155,7 +155,7 @@ class FullTransformer
155 155
         }
156 156
 
157 157
         // behave like the intl extension
158
-        StubIntl::setErrorCode(StubIntl::U_PARSE_ERROR);
158
+        StubIntl::setError(StubIntl::U_PARSE_ERROR, 'Date parsing failed');
159 159
 
160 160
         return false;
161 161
     }
@@ -292,7 +292,7 @@ class FullTransformer
292 292
 
293 293
         // If month is false, return immediately (intl behavior)
294 294
         if (false === $month) {
295
-            StubIntl::setErrorCode(StubIntl::U_PARSE_ERROR);
295
+            StubIntl::setError(StubIntl::U_PARSE_ERROR, 'Date parsing failed');
296 296
 
297 297
             return false;
298 298
         }

+ 1 - 1
vendor/symfony/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php View File

@@ -88,7 +88,7 @@ class TimeZoneTransformer extends Transformer
88 88
                 ));
89 89
             }
90 90
 
91
-            return 'Etc/GMT'.($hours != 0 ? $signal.$hours : '');
91
+            return 'Etc/GMT'.($hours !== 0 ? $signal.$hours : '');
92 92
         }
93 93
 
94 94
         throw new \InvalidArgumentException('The GMT time zone \'%s\' does not match with the supported formats GMT[+-]HH:MM or GMT[+-]HHMM.');

+ 2 - 12
vendor/symfony/src/Symfony/Component/Locale/Stub/StubCollator.php View File

@@ -21,16 +21,6 @@ use Symfony\Component\Locale\Exception\MethodArgumentValueNotImplementedExceptio
21 21
  */
22 22
 class StubCollator
23 23
 {
24
-    /**
25
-     * Constants defined by the intl extension, not class constants in IntlDateFormatter
26
-     * TODO: remove if the Form component drop the call to the intl_is_failure() function
27
-     *
28
-     * @see StubIntlDateFormatter::getErrorCode()
29
-     * @see StubIntlDateFormatter::getErrorMessage()
30
-     */
31
-    const U_ZERO_ERROR = 0;
32
-    const U_ZERO_ERROR_MESSAGE = 'U_ZERO_ERROR';
33
-
34 24
     /** Attribute constants */
35 25
     const FRENCH_COLLATION = 0;
36 26
     const ALTERNATE_HANDLING = 1;
@@ -158,7 +148,7 @@ class StubCollator
158 148
      */
159 149
     public function getErrorCode()
160 150
     {
161
-        return self::U_ZERO_ERROR;
151
+        return StubIntl::U_ZERO_ERROR;
162 152
     }
163 153
 
164 154
     /**
@@ -168,7 +158,7 @@ class StubCollator
168 158
      */
169 159
     public function getErrorMessage()
170 160
     {
171
-        return self::U_ZERO_ERROR_MESSAGE;
161
+        return 'U_ZERO_ERROR';
172 162
     }
173 163
 
174 164
     /**

+ 30 - 18
vendor/symfony/src/Symfony/Component/Locale/Stub/StubIntl.php View File

@@ -45,28 +45,24 @@ abstract class StubIntl
45 45
      * @var array
46 46
      */
47 47
     private static $errorCodes = array(
48
-        self::U_ZERO_ERROR,
49
-        self::U_ILLEGAL_ARGUMENT_ERROR,
50
-        self::U_PARSE_ERROR,
48
+        self::U_ZERO_ERROR => 'U_ZERO_ERROR',
49
+        self::U_ILLEGAL_ARGUMENT_ERROR => 'U_ILLEGAL_ARGUMENT_ERROR',
50
+        self::U_PARSE_ERROR => 'U_PARSE_ERROR',
51 51
     );
52 52
 
53 53
     /**
54
-     * The error messages of all known error codes
54
+     * The error code of the last operation
55 55
      *
56
-     * @var array
56
+     * @var integer
57 57
      */
58
-    private static $errorMessages = array(
59
-        self::U_ZERO_ERROR => 'U_ZERO_ERROR',
60
-        self::U_ILLEGAL_ARGUMENT_ERROR => 'datefmt_format: takes either an array  or an integer timestamp value : U_ILLEGAL_ARGUMENT_ERROR',
61
-        self::U_PARSE_ERROR => 'Date parsing failed: U_PARSE_ERROR',
62
-    );
58
+    private static $errorCode = self::U_ZERO_ERROR;
63 59
 
64 60
     /**
65 61
      * The error code of the last operation
66 62
      *
67 63
      * @var integer
68 64
      */
69
-    private static $errorCode = self::U_ZERO_ERROR;
65
+    private static $errorMessage = 'U_ZERO_ERROR';
70 66
 
71 67
     /**
72 68
      * Returns whether the error code indicates a failure
@@ -77,8 +73,8 @@ abstract class StubIntl
77 73
      */
78 74
     static public function isFailure($errorCode)
79 75
     {
80
-        return in_array($errorCode, self::$errorCodes, true)
81
-            && $errorCode !== self::U_ZERO_ERROR;
76
+        return isset(self::$errorCodes[$errorCode])
77
+            && $errorCode > self::U_ZERO_ERROR;
82 78
     }
83 79
 
84 80
     /**
@@ -102,22 +98,38 @@ abstract class StubIntl
102 98
      */
103 99
     static public function getErrorMessage()
104 100
     {
105
-        return self::$errorMessages[self::$errorCode];
101
+        return self::$errorMessage;
102
+    }
103
+
104
+    /**
105
+     * Returns the symbolic name for a given error code
106
+     *
107
+     * @return string
108
+     */
109
+    static public function getErrorName($code)
110
+    {
111
+        if (isset(self::$errorCodes[$code])) {
112
+            return self::$errorCodes[$code];
113
+        }
114
+
115
+        return '[BOGUS UErrorCode]';
106 116
     }
107 117
 
108 118
     /**
109
-     * Sets the current error code
119
+     * Sets the current error
110 120
      *
111
-     * @param  integer $code  One of the error constants in this class
121
+     * @param  integer $code     One of the error constants in this class
122
+     * @param  string  $message  The ICU class error message
112 123
      *
113 124
      * @throws \InvalidArgumentException If the code is not one of the error constants in this class
114 125
      */
115
-    static public function setErrorCode($code)
126
+    static public function setError($code, $message = '')
116 127
     {
117
-        if (!isset(self::$errorMessages[$code])) {
128
+        if (!isset(self::$errorCodes[$code])) {
118 129
             throw new \InvalidArgumentException(sprintf('No such error code: "%s"', $code));
119 130
         }
120 131
 
132
+        self::$errorMessage = $message ? sprintf('%s: %s', $message, self::$errorCodes[$code]) : self::$errorCodes[$code];
121 133
         self::$errorCode = $code;
122 134
     }
123 135
 }

+ 50 - 17
vendor/symfony/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php View File

@@ -26,14 +26,18 @@ use Symfony\Component\Locale\Exception\MethodArgumentValueNotImplementedExceptio
26 26
 class StubIntlDateFormatter
27 27
 {
28 28
     /**
29
-     * Constants defined by the intl extension, not class constants in IntlDateFormatter
30
-     * TODO: remove if the Form component drop the call to the intl_is_failure() function
29
+     * The error code from the last operation
31 30
      *
32
-     * @see StubIntlDateFormatter::getErrorCode()
33
-     * @see StubIntlDateFormatter::getErrorMessage()
31
+     * @var integer
34 32
      */
35
-    const U_ZERO_ERROR = 0;
36
-    const U_ZERO_ERROR_MESSAGE = 'U_ZERO_ERROR';
33
+    protected $errorCode = StubIntl::U_ZERO_ERROR;
34
+
35
+    /**
36
+     * The error message from the last operation
37
+     *
38
+     * @var string
39
+     */
40
+    protected $errorMessage = 'U_ZERO_ERROR';
37 41
 
38 42
     /* date/time format types */
39 43
     const NONE = -1;
@@ -120,11 +124,11 @@ class StubIntlDateFormatter
120 124
      */
121 125
     public function __construct($locale, $datetype, $timetype, $timezone = null, $calendar = self::GREGORIAN, $pattern = null)
122 126
     {
123
-        if ('en' != $locale) {
127
+        if ('en' !== $locale) {
124 128
             throw new MethodArgumentValueNotImplementedException(__METHOD__, 'locale', $locale, 'Only the \'en\' locale is supported');
125 129
         }
126 130
 
127
-        if (self::GREGORIAN != $calendar) {
131
+        if (self::GREGORIAN !== $calendar) {
128 132
             throw new MethodArgumentValueNotImplementedException(__METHOD__, 'calendar', $calendar, 'Only the GREGORIAN calendar is supported');
129 133
         }
130 134
 
@@ -171,19 +175,42 @@ class StubIntlDateFormatter
171 175
     {
172 176
         // intl allows timestamps to be passed as arrays - we don't
173 177
         if (is_array($timestamp)) {
174
-            throw new MethodArgumentValueNotImplementedException(__METHOD__, 'timestamp', $timestamp, 'Only integer unix timestamps are supported');
178
+            $message = version_compare(\PHP_VERSION, '5.3.4', '>=') ?
179
+                'Only integer unix timestamps and DateTime objects are supported' :
180
+                'Only integer unix timestamps are supported';
181
+
182
+            throw new MethodArgumentValueNotImplementedException(__METHOD__, 'timestamp', $timestamp, $message);
183
+        }
184
+
185
+        // behave like the intl extension
186
+        $argumentError = null;
187
+        if (version_compare(\PHP_VERSION, '5.3.4', '<') && !is_int($timestamp)) {
188
+            $argumentError = 'datefmt_format: takes either an array  or an integer timestamp value ';
189
+        } elseif (version_compare(\PHP_VERSION, '5.3.4', '>=') && !is_int($timestamp) && !$timestamp instanceOf \DateTime) {
190
+            $argumentError = 'datefmt_format: takes either an array or an integer timestamp value or a DateTime object';
175 191
         }
176 192
 
177
-        if (!is_int($timestamp)) {
178
-            // behave like the intl extension
179
-            StubIntl::setErrorCode(StubIntl::U_ILLEGAL_ARGUMENT_ERROR);
193
+        if (null !== $argumentError) {
194
+            StubIntl::setError(StubIntl::U_ILLEGAL_ARGUMENT_ERROR, $argumentError);
195
+            $this->errorCode = StubIntl::getErrorCode();
196
+            $this->errorMessage = StubIntl::getErrorMessage();
180 197
 
181 198
             return false;
182 199
         }
183 200
 
201
+        // As of PHP 5.3.4, IntlDateFormatter::format() accepts DateTime instances
202
+        if (version_compare(\PHP_VERSION, '5.3.4', '>=') && $timestamp instanceOf \DateTime) {
203
+            $timestamp = $timestamp->getTimestamp();
204
+        }
205
+
184 206
         $transformer = new FullTransformer($this->getPattern(), $this->getTimeZoneId());
185 207
         $formatted = $transformer->format($this->createDateTime($timestamp));
186 208
 
209
+        // behave like the intl extension
210
+        StubIntl::setError(StubIntl::U_ZERO_ERROR);
211
+        $this->errorCode = StubIntl::getErrorCode();
212
+        $this->errorMessage = StubIntl::getErrorMessage();
213
+
187 214
         return $formatted;
188 215
     }
189 216
 
@@ -220,7 +247,7 @@ class StubIntlDateFormatter
220 247
      */
221 248
     public function getErrorCode()
222 249
     {
223
-        return self::U_ZERO_ERROR;
250
+        return $this->errorCode;
224 251
     }
225 252
 
226 253
     /**
@@ -232,7 +259,7 @@ class StubIntlDateFormatter
232 259
      */
233 260
     public function getErrorMessage()
234 261
     {
235
-        return self::U_ZERO_ERROR_MESSAGE;
262
+        return $this->errorMessage;
236 263
     }
237 264
 
238 265
     /**
@@ -345,12 +372,18 @@ class StubIntlDateFormatter
345 372
             throw new MethodArgumentNotImplementedException(__METHOD__, 'position');
346 373
         }
347 374
 
348
-        StubIntl::setErrorCode(StubIntl::U_ZERO_ERROR);
349
-
350 375
         $dateTime = $this->createDateTime(0);
351 376
         $transformer = new FullTransformer($this->getPattern(), $this->getTimeZoneId());
352 377
 
353
-        return $transformer->parse($dateTime, $value);
378
+        $timestamp = $transformer->parse($dateTime, $value);
379
+
380
+        // behave like the intl extension. FullTransformer::parse() set the proper error
381
+        if (false === $timestamp) {
382
+            $this->errorCode = StubIntl::getErrorCode();
383
+            $this->errorMessage = StubIntl::getErrorMessage();
384
+        }
385
+
386
+        return $timestamp;
354 387
     }
355 388
 
356 389
     /**

+ 1 - 1
vendor/symfony/src/Symfony/Component/Locale/Stub/StubLocale.php View File

@@ -480,7 +480,7 @@ class StubLocale
480 480
      */
481 481
     static private function getStubData($locale, $cacheVariable, $stubDataDir)
482 482
     {
483
-        if ('en' != $locale) {
483
+        if ('en' !== $locale) {
484 484
             throw new \InvalidArgumentException(sprintf('Only the \'en\' locale is supported. %s', NotImplementedException::INTL_INSTALL_MESSAGE));
485 485
         }
486 486
 

+ 48 - 41
vendor/symfony/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php View File

@@ -24,33 +24,6 @@ use Symfony\Component\Locale\Exception\MethodArgumentValueNotImplementedExceptio
24 24
  */
25 25
 class StubNumberFormatter
26 26
 {
27
-    /**
28
-     * Constants defined by the intl extension, not class constants in NumberFormatter
29
-     * TODO: remove if the Form component drop the call to the intl_is_failure() function
30
-     *
31
-     * @see StubNumberFormatter::getErrorCode()
32
-     * @see StubNumberFormatter::getErrorMessage()
33
-     */
34
-    const U_ZERO_ERROR = 0;
35
-    const U_PARSE_ERROR = 9;
36
-
37
-    /**
38
-     * The error messages for each error code
39
-     *
40
-     * @var array
41
-     */
42
-    protected $errorMessages = array(
43
-        self::U_ZERO_ERROR => 'U_ZERO_ERROR',
44
-        self::U_PARSE_ERROR => 'Number parsing failed: U_PARSE_ERROR',
45
-    );
46
-
47
-    /**
48
-     * The error code from the last operation
49
-     *
50
-     * @var integer
51
-     */
52
-    protected $errorCode = self::U_ZERO_ERROR;
53
-
54 27
     /** Format style constants */
55 28
     const PATTERN_DECIMAL   = 0;
56 29
     const DECIMAL           = 1;
@@ -139,6 +112,30 @@ class StubNumberFormatter
139 112
     const PAD_AFTER_SUFFIX  = 3;
140 113
 
141 114
     /**
115
+     * The error code from the last operation
116
+     *
117
+     * @var integer
118
+     */
119
+    protected $errorCode = StubIntl::U_ZERO_ERROR;
120
+
121
+    /**
122
+     * The error message from the last operation
123
+     *
124
+     * @var string
125
+     */
126
+    protected $errorMessage = 'U_ZERO_ERROR';
127
+
128
+    /**
129
+     * @var string
130
+     */
131
+    private $locale;
132
+
133
+    /**
134
+     * @var int
135
+     */
136
+    private $style;
137
+
138
+    /**
142 139
      * Default values for the en locale
143 140
      *
144 141
      * @var array
@@ -225,16 +222,6 @@ class StubNumberFormatter
225 222
     );
226 223
 
227 224
     /**
228
-     * @var string
229
-     */
230
-    private $locale = null;
231
-
232
-    /**
233
-     * @var int
234
-     */
235
-    private $style = null;
236
-
237
-    /**
238 225
      * Constructor
239 226
      *
240 227
      * @param  string  $locale   The locale code
@@ -364,8 +351,12 @@ class StubNumberFormatter
364 351
         $fractionDigits = $this->getAttribute(self::FRACTION_DIGITS);
365 352
 
366 353
         $value = $this->round($value, $fractionDigits);
354
+        $value = $this->formatNumber($value, $fractionDigits);
367 355
 
368
-        return $this->formatNumber($value, $fractionDigits);
356
+        // behave like the intl extension
357
+        $this->resetError();
358
+
359
+        return $value;
369 360
     }
370 361
 
371 362
     /**
@@ -403,7 +394,7 @@ class StubNumberFormatter
403 394
      */
404 395
     public function getErrorMessage()
405 396
     {
406
-        return $this->errorMessages[$this->errorCode];
397
+        return $this->errorMessage;
407 398
     }
408 399
 
409 400
     /**
@@ -514,15 +505,21 @@ class StubNumberFormatter
514 505
 
515 506
         // Any string before the numeric value causes error in the parsing
516 507
         if (isset($matches[1]) && !empty($matches[1])) {
517
-            $this->errorCode = self::U_PARSE_ERROR;
508
+            StubIntl::setError(StubIntl::U_PARSE_ERROR, 'Number parsing failed');
509
+            $this->errorCode = StubIntl::getErrorCode();
510
+            $this->errorMessage = StubIntl::getErrorMessage();
518 511
 
519 512
             return false;
520 513
         }
521 514
 
522 515
         // Remove everything that is not number or dot (.)
523 516
         $value = preg_replace('/[^0-9\.\-]/', '', $value);
517
+        $value = $this->convertValueDataType($value, $type);
518
+
519
+        // behave like the intl extension
520
+        $this->resetError();
524 521
 
525
-        return $this->convertValueDataType($value, $type);
522
+        return $value;
526 523
     }
527 524
 
528 525
     /**
@@ -624,6 +621,16 @@ class StubNumberFormatter
624 621
     }
625 622
 
626 623
     /**
624
+     * Set the error to the default U_ZERO_ERROR
625
+     */
626
+    protected function resetError()
627
+    {
628
+        StubIntl::setError(StubIntl::U_ZERO_ERROR);
629
+        $this->errorCode = StubIntl::getErrorCode();
630
+        $this->errorMessage = StubIntl::getErrorMessage();
631
+    }
632
+
633
+    /**
627 634
      * Rounds a currency value, applying increment rounding if applicable
628 635
      *
629 636
      * When a currency have a rounding increment, an extra round is made after the first one. The rounding factor is

+ 1 - 1
vendor/symfony/src/Symfony/Component/Routing/Generator/UrlGenerator.php View File

@@ -146,7 +146,7 @@ class UrlGenerator implements UrlGeneratorInterface
146 146
 
147 147
         // add a query string if needed
148 148
         $extra = array_diff_key($originParameters, $variables, $defaults);
149
-        if ($extra && $query = http_build_query($extra)) {
149
+        if ($extra && $query = http_build_query($extra, '', '&')) {
150 150
             $url .= '?'.$query;
151 151
         }
152 152
 

+ 44 - 3
vendor/symfony/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php View File

@@ -31,6 +31,8 @@ class ApacheMatcherDumper extends MatcherDumper
31 31
      * @param array $options An array of options
32 32
      *
33 33
      * @return string A string to be used as Apache rewrite rules
34
+     *
35
+     * @throws \LogicException When the route regex is invalid
34 36
      */
35 37
     public function dump(array $options = array())
36 38
     {
@@ -39,6 +41,8 @@ class ApacheMatcherDumper extends MatcherDumper
39 41
             'base_uri'    => '',
40 42
         ), $options);
41 43
 
44
+        $options['script_name'] = self::escape($options['script_name'], ' ', '\\');
45
+
42 46
         $rules = array("# skip \"real\" requests\nRewriteCond %{REQUEST_FILENAME} -f\nRewriteRule .* - [QSA,L]");
43 47
         $methodVars = array();
44 48
 
@@ -46,8 +50,14 @@ class ApacheMatcherDumper extends MatcherDumper
46 50
             $compiledRoute = $route->compile();
47 51
 
48 52
             // prepare the apache regex
49
-            $regex = preg_replace('/\?P<.+?>/', '', substr(str_replace(array("\n", ' '), '', $compiledRoute->getRegex()), 1, -3));
50
-            $regex = '^'.preg_quote($options['base_uri']).substr($regex, 1);
53
+            $regex = $compiledRoute->getRegex();
54
+            $delimiter = $regex[0];
55
+            $regexPatternEnd = strrpos($regex, $delimiter);
56
+            if (strlen($regex) < 2 || 0 === $regexPatternEnd) {
57
+                throw new \LogicException('The "%s" route regex "%s" is invalid', $name, $regex);
58
+            }
59
+            $regex = preg_replace('/\?P<.+?>/', '', substr($regex, 1, $regexPatternEnd - 1));
60
+            $regex = '^'.self::escape(preg_quote($options['base_uri']).substr($regex, 1), ' ', '\\');
51 61
 
52 62
             $hasTrailingSlash = '/$' == substr($regex, -2) && '^/$' != $regex;
53 63
 
@@ -56,7 +66,6 @@ class ApacheMatcherDumper extends MatcherDumper
56 66
                 $variables[] = 'E=_ROUTING_'.$variable.':%'.($i + 1);
57 67
             }
58 68
             foreach ($route->getDefaults() as $key => $value) {
59
-                // todo: a more legit way to escape the value?
60 69
                 $variables[] = 'E=_ROUTING_'.$key.':'.strtr($value, array(
61 70
                     ':'  => '\\:',
62 71
                     '='  => '\\=',
@@ -112,4 +121,36 @@ class ApacheMatcherDumper extends MatcherDumper
112 121
 
113 122
         return implode("\n\n", $rules)."\n";
114 123
     }
124
+
125
+    /**
126
+     * Escapes a string.
127
+     *
128
+     * @param string $string The string to be escaped
129
+     * @param string $char   The character to be escaped
130
+     * @param string $with   The character to be used for escaping
131
+     *
132
+     * @return string The escaped string
133
+     */
134
+    static private function escape($string, $char, $with)
135
+    {
136
+        $escaped = false;
137
+        $output = '';
138
+        foreach(str_split($string) as $symbol) {
139
+            if ($escaped) {
140
+                $output .= $symbol;
141
+                $escaped = false;
142
+                continue;
143
+            }
144
+            if ($symbol === $char) {
145
+                $output .= $with.$char;
146
+                continue;
147
+            }
148
+            if ($symbol === $with) {
149
+                $escaped = true;
150
+            }
151
+            $output .= $symbol;
152
+        }
153
+
154
+        return $output;
155
+    }
115 156
 }

+ 2 - 2
vendor/symfony/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php View File

@@ -148,7 +148,7 @@ EOF;
148 148
         $conditions = array();
149 149
         $hasTrailingSlash = false;
150 150
         $matches = false;
151
-        if (!count($compiledRoute->getVariables()) && false !== preg_match('#^(.)\^(?P<url>.*?)\$\1#', str_replace(array("\n", ' '), '', $compiledRoute->getRegex()), $m)) {
151
+        if (!count($compiledRoute->getVariables()) && false !== preg_match('#^(.)\^(?P<url>.*?)\$\1#', $compiledRoute->getRegex(), $m)) {
152 152
             if ($supportsRedirections && substr($m['url'], -1) === '/') {
153 153
                 $conditions[] = sprintf("rtrim(\$pathinfo, '/') === %s", var_export(rtrim(str_replace('\\', '', $m['url']), '/'), true));
154 154
                 $hasTrailingSlash = true;
@@ -160,7 +160,7 @@ EOF;
160 160
                 $conditions[] = sprintf("0 === strpos(\$pathinfo, %s)", var_export($compiledRoute->getStaticPrefix(), true));
161 161
             }
162 162
 
163
-            $regex = str_replace(array("\n", ' '), '', $compiledRoute->getRegex());
163
+            $regex = $compiledRoute->getRegex();
164 164
             if ($supportsRedirections && $pos = strpos($regex, '/$')) {
165 165
                 $regex = substr($regex, 0, $pos).'/?$'.substr($regex, $pos + 2);
166 166
                 $hasTrailingSlash = true;

+ 1 - 1
vendor/symfony/src/Symfony/Component/Routing/RouteCollection.php View File

@@ -95,7 +95,7 @@ class RouteCollection implements \IteratorAggregate
95 95
     public function add($name, Route $route)
96 96
     {
97 97
         if (!preg_match('/^[a-z0-9A-Z_.]+$/', $name)) {
98
-            throw new \InvalidArgumentException(sprintf('Name "%s" contains non valid characters for a route name.', $name));
98
+            throw new \InvalidArgumentException(sprintf('The provided route name "%s" contains non valid characters. A route name must only contain digits (0-9), letters (a-z and A-Z), underscores (_) and dots (.).', $name));
99 99
         }
100 100
 
101 101
         $parent = $this;

+ 43 - 24
vendor/symfony/src/Symfony/Component/Routing/RouteCompiler.php View File

@@ -66,7 +66,8 @@ class RouteCompiler implements RouteCompilerInterface
66 66
         // find the first optional token
67 67
         $firstOptional = INF;
68 68
         for ($i = count($tokens) - 1; $i >= 0; $i--) {
69
-            if ('variable' === $tokens[$i][0] && $route->hasDefault($tokens[$i][3])) {
69
+            $token = $tokens[$i];
70
+            if ('variable' === $token[0] && $route->hasDefault($token[3])) {
70 71
                 $firstOptional = $i;
71 72
             } else {
72 73
                 break;
@@ -74,36 +75,54 @@ class RouteCompiler implements RouteCompilerInterface
74 75
         }
75 76
 
76 77
         // compute the matching regexp
77
-        $regex = '';
78
-        $indent = 1;
79
-        if (1 === count($tokens) && 0 === $firstOptional) {
80
-            $token = $tokens[0];
81
-            ++$indent;
82
-            $regex .= str_repeat(' ', $indent * 4).sprintf("%s(?:\n", preg_quote($token[1], '#'));
83
-            $regex .= str_repeat(' ', $indent * 4).sprintf("(?P<%s>%s)\n", $token[3], $token[2]);
84
-        } else {
85
-            foreach ($tokens as $i => $token) {
86
-                if ('text' === $token[0]) {
87
-                    $regex .= str_repeat(' ', $indent * 4).preg_quote($token[1], '#')."\n";
88
-                } else {
89
-                    if ($i >= $firstOptional) {
90
-                        $regex .= str_repeat(' ', $indent * 4)."(?:\n";
91
-                        ++$indent;
92
-                    }
93
-                    $regex .= str_repeat(' ', $indent * 4).sprintf("%s(?P<%s>%s)\n", preg_quote($token[1], '#'), $token[3], $token[2]);
94
-                }
95
-            }
96
-        }
97
-        while (--$indent) {
98
-            $regex .= str_repeat(' ', $indent * 4).")?\n";
78
+        $regexp = '';
79
+        for ($i = 0, $nbToken = count($tokens); $i < $nbToken; $i++) {
80
+            $regexp .= $this->computeRegexp($tokens, $i, $firstOptional);
99 81
         }
100 82
 
101 83
         return new CompiledRoute(
102 84
             $route,
103 85
             'text' === $tokens[0][0] ? $tokens[0][1] : '',
104
-            sprintf("#^\n%s$#xs", $regex),
86
+            sprintf("#^%s$#s", $regexp),
105 87
             array_reverse($tokens),
106 88
             $variables
107 89
         );
108 90
     }
91
+
92
+    /**
93
+     * Computes the regexp used to match the token.
94
+     *
95
+     * @param array   $tokens        The route tokens
96
+     * @param integer $index         The index of the current token
97
+     * @param integer $firstOptional The index of the first optional token
98
+     *
99
+     * @return string The regexp
100
+     */
101
+    private function computeRegexp(array $tokens, $index, $firstOptional)
102
+    {
103
+        $token = $tokens[$index];
104
+        if('text' === $token[0]) {
105
+            // Text tokens
106
+            return preg_quote($token[1], '#');
107
+        } else {
108
+            // Variable tokens
109
+            if (0 === $index && 0 === $firstOptional && 1 == count($tokens)) {
110
+                // When the only token is an optional variable token, the separator is required
111
+                return sprintf('%s(?P<%s>%s)?', preg_quote($token[1], '#'), $token[3], $token[2]);
112
+            } else {
113
+                $nbTokens = count($tokens);
114
+                $regexp = sprintf('%s(?P<%s>%s)', preg_quote($token[1], '#'), $token[3], $token[2]);
115
+                if ($index >= $firstOptional) {
116
+                    // Enclose each optional tokens in a subpattern to make it optional
117
+                    $regexp = "(?:$regexp";
118
+                    if ($nbTokens - 1 == $index) {
119
+                        // Close the optional subpatterns
120
+                        $regexp .= str_repeat(")?", $nbTokens - $firstOptional);
121
+                    }
122
+                }
123
+
124
+                return $regexp;
125
+            }
126
+        }
127
+    }
109 128
 }

+ 2 - 2
vendor/symfony/src/Symfony/Component/Security/Http/Firewall/ContextListener.php View File

@@ -20,7 +20,7 @@ use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
20 20
 use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
21 21
 use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
22 22
 use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
23
-use Symfony\Component\Security\Core\SecurityContext;
23
+use Symfony\Component\Security\Core\SecurityContextInterface;
24 24
 use Symfony\Component\Security\Core\User\UserInterface;
25 25
 use Symfony\Component\EventDispatcher\EventDispatcherInterface;
26 26
 
@@ -37,7 +37,7 @@ class ContextListener implements ListenerInterface
37 37
     private $logger;
38 38
     private $userProviders;
39 39
 
40
-    public function __construct(SecurityContext $context, array $userProviders, $contextKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null)
40
+    public function __construct(SecurityContextInterface $context, array $userProviders, $contextKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null)
41 41
     {
42 42
         if (empty($contextKey)) {
43 43
             throw new \InvalidArgumentException('$contextKey must not be empty.');

+ 3 - 3
vendor/symfony/src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php View File

@@ -6,7 +6,7 @@ use Symfony\Component\HttpKernel\Log\LoggerInterface;
6 6
 use Symfony\Component\HttpKernel\Event\GetResponseEvent;
7 7
 use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface;
8 8
 use Symfony\Component\Security\Core\Exception\AuthenticationException;
9
-use Symfony\Component\Security\Core\SecurityContext;
9
+use Symfony\Component\Security\Core\SecurityContextInterface;
10 10
 use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface;
11 11
 use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
12 12
 use Symfony\Component\Security\Http\SecurityEvents;
@@ -37,13 +37,13 @@ class RememberMeListener implements ListenerInterface
37 37
     /**
38 38
      * Constructor
39 39
      *
40
-     * @param SecurityContext                $securityContext
40
+     * @param SecurityContextInterface       $securityContext
41 41
      * @param RememberMeServicesInterface    $rememberMeServices
42 42
      * @param AuthenticationManagerInterface $authenticationManager
43 43
      * @param LoggerInterface                $logger
44 44
      * @param EventDispatcherInterface       $dispatcher
45 45
      */
46
-    public function __construct(SecurityContext $securityContext, RememberMeServicesInterface $rememberMeServices, AuthenticationManagerInterface $authenticationManager, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null)
46
+    public function __construct(SecurityContextInterface $securityContext, RememberMeServicesInterface $rememberMeServices, AuthenticationManagerInterface $authenticationManager, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null)
47 47
     {
48 48
         $this->securityContext = $securityContext;
49 49
         $this->rememberMeServices = $rememberMeServices;

+ 2 - 2
vendor/symfony/src/Symfony/Component/Translation/README.md View File

@@ -10,12 +10,12 @@ translated strings from these including support for pluralization.
10 10
 
11 11
     $translator = new Translator('fr_FR', new MessageSelector());
12 12
     $translator->setFallbackLocale('fr');
13
-    $translator->addLoader('array', return new ArrayLoader());
13
+    $translator->addLoader('array', new ArrayLoader());
14 14
     $translator->addResource('array', array(
15 15
         'Hello World!' => 'Bonjour',
16 16
     ), 'fr');
17 17
 
18
-    $translator->trans('Hello World!');
18
+    echo $translator->trans('Hello World!') . "\n";
19 19
 
20 20
 Resources
21 21
 ---------

+ 5 - 4
vendor/symfony/src/Symfony/Component/Validator/README.md View File

@@ -8,6 +8,7 @@ annotations, which can then be checked against instances of these classes.
8 8
     use Symfony\Component\Validator\Validator;
9 9
     use Symfony\Component\Validator\Mapping\ClassMetadataFactory;
10 10
     use Symfony\Component\Validator\Mapping\Loader\StaticMethodLoader;
11
+    use Symfony\Component\Validator\Constraints as Assert;
11 12
     use Symfony\Component\Validator\ConstraintValidatorFactory;
12 13
 
13 14
     $validator = new Validator(
@@ -20,10 +21,10 @@ annotations, which can then be checked against instances of these classes.
20 21
             'first_name' => new Assert\MinLength(101),
21 22
             'last_name'  => new Assert\MinLength(1),
22 23
         )),
23
-        'email' => new Assert\Email(),
24
-        'simple' => new Assert\MinLength(102),
25
-        'gender' => new Assert\Choice(array(3, 4)),
26
-        'file' => new Assert\File(),
24
+        'email'    => new Assert\Email(),
25
+        'simple'   => new Assert\MinLength(102),
26
+        'gender'   => new Assert\Choice(array(3, 4)),
27
+        'file'     => new Assert\File(),
27 28
         'password' => new Assert\MinLength(60),
28 29
     ));
29 30
 

+ 13 - 1
vendor/symfony/tests/Symfony/Tests/Bridge/Monolog/Processor/WebProcessorTest.php View File

@@ -14,6 +14,7 @@ namespace Symfony\Tests\Bridge\Monolog\Processor;
14 14
 use Monolog\Logger;
15 15
 use Symfony\Bridge\Monolog\Processor\WebProcessor;
16 16
 use Symfony\Component\HttpFoundation\Request;
17
+use Symfony\Component\HttpKernel\HttpKernelInterface;
17 18
 
18 19
 class WebProcessorTest extends \PHPUnit_Framework_TestCase
19 20
 {
@@ -35,7 +36,18 @@ class WebProcessorTest extends \PHPUnit_Framework_TestCase
35 36
         $request = new Request();
36 37
         $request->server->replace($server);
37 38
 
38
-        $processor = new WebProcessor($request);
39
+        $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')
40
+            ->disableOriginalConstructor()
41
+            ->getMock();
42
+        $event->expects($this->any())
43
+            ->method('getRequestType')
44
+            ->will($this->returnValue(HttpKernelInterface::MASTER_REQUEST));
45
+        $event->expects($this->any())
46
+            ->method('getRequest')
47
+            ->will($this->returnValue($request));
48
+
49
+        $processor = new WebProcessor();
50
+        $processor->onKernelRequest($event);
39 51
         $record = $processor($this->getRecord());
40 52
 
41 53
         $this->assertEquals($server['REQUEST_URI'], $record['extra']['url']);

+ 17 - 2
vendor/symfony/tests/Symfony/Tests/Component/Console/ApplicationTest.php View File

@@ -201,8 +201,11 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
201 201
 
202 202
     public function testSetCatchExceptions()
203 203
     {
204
-        $application = new Application();
204
+        $application = $this->getMock('Symfony\Component\Console\Application', array('getTerminalWidth'));
205 205
         $application->setAutoExit(false);
206
+        $application->expects($this->any())
207
+            ->method('getTerminalWidth')
208
+            ->will($this->returnValue(120));
206 209
         $tester = new ApplicationTester($application);
207 210
 
208 211
         $application->setCatchExceptions(true);
@@ -237,8 +240,11 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
237 240
 
238 241
     public function testRenderException()
239 242
     {
240
-        $application = new Application();
243
+        $application = $this->getMock('Symfony\Component\Console\Application', array('getTerminalWidth'));
241 244
         $application->setAutoExit(false);
245
+        $application->expects($this->any())
246
+            ->method('getTerminalWidth')
247
+            ->will($this->returnValue(120));
242 248
         $tester = new ApplicationTester($application);
243 249
 
244 250
         $tester->run(array('command' => 'foo'), array('decorated' => false));
@@ -255,6 +261,15 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
255 261
         $tester->run(array('command' => 'foo3:bar'), array('decorated' => false));
256 262
         $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3.txt', $this->normalize($tester->getDisplay()), '->renderException() renders a pretty exceptions with previous exceptions');
257 263
 
264
+        $application = $this->getMock('Symfony\Component\Console\Application', array('getTerminalWidth'));
265
+        $application->setAutoExit(false);
266
+        $application->expects($this->any())
267
+            ->method('getTerminalWidth')
268
+            ->will($this->returnValue(32));
269
+        $tester = new ApplicationTester($application);
270
+
271
+        $tester->run(array('command' => 'foo'), array('decorated' => false));
272
+        $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception4.txt', $this->normalize($tester->getDisplay()), '->renderException() wraps messages when they are bigger than the terminal');
258 273
     }
259 274
 
260 275
     public function testRun()

+ 9 - 0
vendor/symfony/tests/Symfony/Tests/Component/Console/Fixtures/application_renderexception4.txt View File

@@ -0,0 +1,9 @@
1
+
2
+
3
+                               
4
+  [InvalidArgumentException]   
5
+  Command "foo" is not define  
6
+  d.                           
7
+                               
8
+
9
+

+ 6 - 0
vendor/symfony/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/badtag3.yml View File

@@ -0,0 +1,6 @@
1
+services:
2
+    foo_service:
3
+        class:    FooClass
4
+        tags:
5
+          # tag-attribute is not a scalar
6
+          - { name: foo, foo: { foo: foo, bar: bar } }

+ 1 - 0
vendor/symfony/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/services6.yml View File

@@ -14,6 +14,7 @@ services:
14 14
     class: FooClass
15 15
     calls:
16 16
       - [ setBar, [] ]
17
+      - [ setBar ]
17 18
   method_call2:
18 19
     class: FooClass
19 20
     calls:

+ 15 - 3
vendor/symfony/tests/Symfony/Tests/Component/DependencyInjection/Loader/YamlFileLoaderTest.php View File

@@ -113,7 +113,7 @@ class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase
113 113
         $this->assertEquals('sc_configure', $services['configurator1']->getConfigurator(), '->load() parses the configurator tag');
114 114
         $this->assertEquals(array(new Reference('baz'), 'configure'), $services['configurator2']->getConfigurator(), '->load() parses the configurator tag');
115 115
         $this->assertEquals(array('BazClass', 'configureStatic'), $services['configurator3']->getConfigurator(), '->load() parses the configurator tag');
116
-        $this->assertEquals(array(array('setBar', array())), $services['method_call1']->getMethodCalls(), '->load() parses the method_call tag');
116
+        $this->assertEquals(array(array('setBar', array()), array('setBar', array())), $services['method_call1']->getMethodCalls(), '->load() parses the method_call tag');
117 117
         $this->assertEquals(array(array('setBar', array('foo', new Reference('foo'), array(true, false)))), $services['method_call2']->getMethodCalls(), '->load() parses the method_call tag');
118 118
         $this->assertEquals('baz_factory', $services['factory_service']->getFactoryService());
119 119
 
@@ -169,7 +169,7 @@ class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase
169 169
             $loader->load('badtag1.yml');
170 170
             $this->fail('->load() should throw an exception when the tags key of a service is not an array');
171 171
         } catch (\Exception $e) {
172
-            $this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the tags key is not an array');
172
+            $this->assertInstanceOf('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the tags key is not an array');
173 173
             $this->assertStringStartsWith('Parameter "tags" must be an array for service', $e->getMessage(), '->load() throws an InvalidArgumentException if the tags key is not an array');
174 174
         }
175 175
     }
@@ -181,8 +181,20 @@ class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase
181 181
             $loader->load('badtag2.yml');
182 182
             $this->fail('->load() should throw an exception when a tag is missing the name key');
183 183
         } catch (\Exception $e) {
184
-            $this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if a tag is missing the name key');
184
+            $this->assertInstanceOf('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if a tag is missing the name key');
185 185
             $this->assertStringStartsWith('A "tags" entry is missing a "name" key for service ', $e->getMessage(), '->load() throws an InvalidArgumentException if a tag is missing the name key');
186 186
         }
187 187
     }
188
+
189
+    public function testTagWithAttributeArrayThrowsException()
190
+    {
191
+        $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath.'/yaml'));
192
+        try {
193
+            $loader->load('badtag3.yml');
194
+            $this->fail('->load() should throw an exception when a tag-attribute is not a scalar');
195
+        } catch (\Exception $e) {
196
+            $this->assertInstanceOf('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if a tag-attribute is not a scalar');
197
+            $this->assertStringStartsWith('A "tags" attribute must be of a scalar-type for service ', $e->getMessage(), '->load() throws an InvalidArgumentException if a tag-attribute is not a scalar');
198
+        }
199
+    }
188 200
 }

+ 4 - 1
vendor/symfony/tests/Symfony/Tests/Component/EventDispatcher/EventDispatcherTest.php View File

@@ -241,6 +241,9 @@ class TestEventSubscriberWithPriorities implements EventSubscriberInterface
241 241
 {
242 242
     public static function getSubscribedEvents()
243 243
     {
244
-        return array('pre.foo' => array('preFoo', 10));
244
+        return array(
245
+            'pre.foo' => array('preFoo', 10),
246
+            'post.foo' => array('postFoo'),
247
+            );
245 248
     }
246 249
 }

+ 3 - 2
vendor/symfony/tests/Symfony/Tests/Component/Locale/Stub/StubCollatorTest.php View File

@@ -15,6 +15,7 @@ require_once __DIR__.'/../TestCase.php';
15 15
 
16 16
 use Symfony\Component\Locale\Locale;
17 17
 use Symfony\Component\Locale\Stub\StubCollator;
18
+use Symfony\Component\Locale\Stub\StubIntl;
18 19
 use Symfony\Tests\Component\Locale\TestCase as LocaleTestCase;
19 20
 
20 21
 class StubCollatorTest extends LocaleTestCase
@@ -91,13 +92,13 @@ class StubCollatorTest extends LocaleTestCase
91 92
     public function testGetErrorCode()
92 93
     {
93 94
         $collator = $this->createStubCollator();
94
-        $this->assertEquals(StubCollator::U_ZERO_ERROR, $collator->getErrorCode());
95
+        $this->assertEquals(StubIntl::U_ZERO_ERROR, $collator->getErrorCode());
95 96
     }
96 97
 
97 98
     public function testGetErrorMessage()
98 99
     {
99 100
         $collator = $this->createStubCollator();
100
-        $this->assertEquals(StubCollator::U_ZERO_ERROR_MESSAGE, $collator->getErrorMessage());
101
+        $this->assertEquals('U_ZERO_ERROR', $collator->getErrorMessage());
101 102
     }
102 103
 
103 104
     public function testGetLocale()

+ 109 - 32
vendor/symfony/tests/Symfony/Tests/Component/Locale/Stub/StubIntlDateFormatterTest.php View File

@@ -53,49 +53,69 @@ class StubIntlDateFormatterTest extends LocaleTestCase
53 53
         $this->assertNull($formatter->getTimeZoneId());
54 54
     }
55 55
 
56
+    public function testFormatWithUnsupportedTimestampArgument()
57
+    {
58
+        $formatter = $this->createStubFormatter();
59
+
60
+        $localtime = array(
61
+            'tm_sec'   => 59,
62
+            'tm_min'   => 3,
63
+            'tm_hour'  => 15,
64
+            'tm_mday'  => 15,
65
+            'tm_mon'   => 3,
66
+            'tm_year'  => 112,
67
+            'tm_wday'  => 0,
68
+            'tm_yday'  => 105,
69
+            'tm_isdst' => 0
70
+        );
71
+
72
+        try {
73
+            $formatter->format($localtime);
74
+        } catch (\Exception $e) {
75
+            $this->assertInstanceOf('Symfony\Component\Locale\Exception\MethodArgumentValueNotImplementedException', $e);
76
+
77
+            if ($this->isGreaterOrEqualThanPhpVersion('5.3.4')) {
78
+                $this->assertStringEndsWith('Only integer unix timestamps and DateTime objects are supported.  Please install the \'intl\' extension for full localization capabilities.', $e->getMessage());
79
+            } else {
80
+                $this->assertStringEndsWith('Only integer unix timestamps are supported.  Please install the \'intl\' extension for full localization capabilities.', $e->getMessage());
81
+            }
82
+        }
83
+    }
84
+
56 85
     /**
57 86
      * @dataProvider formatProvider
58 87
      */
59
-    public function testFormatStub($pattern, $timestamp, $expected, $errorCode = 0, $errorMessage = 'U_ZERO_ERROR')
88
+    public function testFormatStub($pattern, $timestamp, $expected)
60 89
     {
90
+        $errorCode = StubIntl::U_ZERO_ERROR;
91
+        $errorMessage = 'U_ZERO_ERROR';
92
+
61 93
         $formatter = $this->createStubFormatter($pattern);
62 94
         $this->assertSame($expected, $formatter->format($timestamp));
63 95
         $this->assertSame($errorMessage, StubIntl::getErrorMessage());
64 96
         $this->assertSame($errorCode, StubIntl::getErrorCode());
65
-        $this->assertSame($errorCode != 0, StubIntl::isFailure(StubIntl::getErrorCode()));
97
+        $this->assertFalse(StubIntl::isFailure(StubIntl::getErrorCode()));
98
+        $this->assertSame($errorMessage, $formatter->getErrorMessage());
99
+        $this->assertSame($errorCode, $formatter->getErrorCode());
100
+        $this->assertFalse(StubIntl::isFailure($formatter->getErrorCode()));
66 101
     }
67 102
 
68 103
     /**
69 104
      * @dataProvider formatProvider
70 105
      */
71
-    public function testFormatIntl($pattern, $timestamp, $expected, $errorCode = 0, $errorMessage = 'U_ZERO_ERROR')
106
+    public function testFormatIntl($pattern, $timestamp, $expected)
72 107
     {
73 108
         $this->skipIfIntlExtensionIsNotLoaded();
74 109
         $this->skipIfICUVersionIsTooOld();
75
-        $formatter = $this->createIntlFormatter($pattern);
76
-        $this->assertSame($expected, $formatter->format($timestamp));
77
-        $this->assertSame($errorMessage, intl_get_error_message());
78
-        $this->assertSame($errorCode, intl_get_error_code());
79
-        $this->assertSame($errorCode != 0, intl_is_failure(intl_get_error_code()));
80
-    }
81 110
 
82
-    /**
83
-     * @dataProvider formatErrorProvider
84
-     */
85
-    public function testFormatErrorIntl($pattern, $timestamp, $expected, $errorCode = 0, $errorMessage = 'U_ZERO_ERROR')
86
-    {
87
-        $this->skipIfIntlExtensionIsNotLoaded();
88
-        $this->skipIfICUVersionIsTooOld();
89
-
90
-        if (version_compare(PHP_VERSION, '5.3.3') > 0) {
91
-            $this->markTestSkipped('The intl error messages were change in PHP 5.3.3.');
92
-        }
111
+        $errorCode = StubIntl::U_ZERO_ERROR;
112
+        $errorMessage = 'U_ZERO_ERROR';
93 113
 
94 114
         $formatter = $this->createIntlFormatter($pattern);
95 115
         $this->assertSame($expected, $formatter->format($timestamp));
96 116
         $this->assertSame($errorMessage, intl_get_error_message());
97 117
         $this->assertSame($errorCode, intl_get_error_code());
98
-        $this->assertSame($errorCode != 0, intl_is_failure(intl_get_error_code()));
118
+        $this->assertFalse(intl_is_failure(intl_get_error_code()));
99 119
     }
100 120
 
101 121
     public function formatProvider()
@@ -276,16 +296,67 @@ class StubIntlDateFormatterTest extends LocaleTestCase
276 296
             array('zzzzz', 0, 'GMT+00:00'),
277 297
         );
278 298
 
299
+        // As of PHP 5.3.4, IntlDateFormatter::format() accepts DateTime instances
300
+        if ($this->isGreaterOrEqualThanPhpVersion('5.3.4')) {
301
+            $dateTime = new \DateTime('@0');
302
+
303
+            /* general, DateTime */
304
+            $formatData[] = array('y-M-d', $dateTime, '1970-1-1');
305
+            $formatData[] = array("yyyy.MM.dd 'at' HH:mm:ss zzz", $dateTime, '1970.01.01 at 00:00:00 GMT+00:00');
306
+            $formatData[] = array("EEE, MMM d, ''yy", $dateTime, "Thu, Jan 1, '70");
307
+            $formatData[] = array('h:mm a', $dateTime, '12:00 AM');
308
+            $formatData[] = array('K:mm a, z', $dateTime, '0:00 AM, GMT+00:00');
309
+            $formatData[] = array('yyyyy.MMMM.dd hh:mm aaa', $dateTime, '01970.January.01 12:00 AM');
310
+        }
311
+
279 312
         return $formatData;
280 313
     }
281 314
 
315
+    /**
316
+     * @dataProvider formatErrorProvider
317
+     */
318
+    public function testFormatIllegalArgumentErrorStub($pattern, $timestamp, $errorMessage)
319
+    {
320
+        $errorCode = StubIntl::U_ILLEGAL_ARGUMENT_ERROR;
321
+
322
+        $formatter = $this->createStubFormatter($pattern);
323
+        $this->assertFalse($formatter->format($timestamp));
324
+        $this->assertSame($errorMessage, StubIntl::getErrorMessage());
325
+        $this->assertSame($errorCode, StubIntl::getErrorCode());
326
+        $this->assertTrue(StubIntl::isFailure(StubIntl::getErrorCode()));
327
+        $this->assertSame($errorMessage, $formatter->getErrorMessage());
328
+        $this->assertSame($errorCode, $formatter->getErrorCode());
329
+        $this->assertTrue(StubIntl::isFailure($formatter->getErrorCode()));
330
+    }
331
+
332
+    /**
333
+     * @dataProvider formatErrorProvider
334
+     */
335
+    public function testFormatIllegalArgumentErrorIntl($pattern, $timestamp, $errorMessage)
336
+    {
337
+        $this->skipIfIntlExtensionIsNotLoaded();
338
+        $this->skipIfICUVersionIsTooOld();
339
+
340
+        $errorCode = StubIntl::U_ILLEGAL_ARGUMENT_ERROR;
341
+
342
+        $formatter = $this->createIntlFormatter($pattern);
343
+        $this->assertFalse($formatter->format($timestamp));
344
+        $this->assertSame($errorMessage, intl_get_error_message());
345
+        $this->assertSame($errorCode, intl_get_error_code());
346
+        $this->assertTrue(intl_is_failure(intl_get_error_code()));
347
+    }
348
+
282 349
     public function formatErrorProvider()
283 350
     {
284
-        /* errors */
351
+        $message = 'datefmt_format: takes either an array  or an integer timestamp value : U_ILLEGAL_ARGUMENT_ERROR';
352
+
353
+        if ($this->isGreaterOrEqualThanPhpVersion('5.3.4')) {
354
+            $message = 'datefmt_format: takes either an array or an integer timestamp value or a DateTime object: U_ILLEGAL_ARGUMENT_ERROR';
355
+        }
285 356
 
286 357
         return array(
287
-            array('y-M-d', '0', false, 1, 'datefmt_format: takes either an array  or an integer timestamp value : U_ILLEGAL_ARGUMENT_ERROR'),
288
-            array('y-M-d', 'foobar', false, 1, 'datefmt_format: takes either an array  or an integer timestamp value : U_ILLEGAL_ARGUMENT_ERROR'),
358
+            array('y-M-d', '0', $message),
359
+            array('y-M-d', 'foobar', $message),
289 360
         );
290 361
     }
291 362
 
@@ -469,13 +540,13 @@ class StubIntlDateFormatterTest extends LocaleTestCase
469 540
     public function testGetErrorCode()
470 541
     {
471 542
         $formatter = $this->createStubFormatter();
472
-        $this->assertEquals(StubIntlDateFormatter::U_ZERO_ERROR, $formatter->getErrorCode());
543
+        $this->assertEquals(StubIntl::getErrorCode(), $formatter->getErrorCode());
473 544
     }
474 545
 
475 546
     public function testGetErrorMessage()
476 547
     {
477 548
         $formatter = $this->createStubFormatter();
478
-        $this->assertEquals(StubIntlDateFormatter::U_ZERO_ERROR_MESSAGE, $formatter->getErrorMessage());
549
+        $this->assertEquals(StubIntl::getErrorMessage(), $formatter->getErrorMessage());
479 550
     }
480 551
 
481 552
     public function testGetLocale()
@@ -527,7 +598,7 @@ class StubIntlDateFormatterTest extends LocaleTestCase
527 598
         $this->assertSame($expected, $formatter->parse($value));
528 599
         $this->assertSame($errorMessage, intl_get_error_message());
529 600
         $this->assertSame($errorCode, intl_get_error_code());
530
-        $this->assertSame($errorCode != 0, intl_is_failure(intl_get_error_code()));
601
+        $this->assertFalse(intl_is_failure(intl_get_error_code()));
531 602
     }
532 603
 
533 604
     /**
@@ -542,7 +613,10 @@ class StubIntlDateFormatterTest extends LocaleTestCase
542 613
         $this->assertSame($expected, $formatter->parse($value));
543 614
         $this->assertSame($errorMessage, StubIntl::getErrorMessage());
544 615
         $this->assertSame($errorCode, StubIntl::getErrorCode());
545
-        $this->assertSame($errorCode != 0, StubIntl::isFailure(StubIntl::getErrorCode()));
616
+        $this->assertFalse(StubIntl::isFailure(StubIntl::getErrorCode()));
617
+        $this->assertSame($errorMessage, $formatter->getErrorMessage());
618
+        $this->assertSame($errorCode, $formatter->getErrorCode());
619
+        $this->assertFalse(StubIntl::isFailure($formatter->getErrorCode()));
546 620
     }
547 621
 
548 622
     public function parseProvider()
@@ -698,10 +772,10 @@ class StubIntlDateFormatterTest extends LocaleTestCase
698 772
 
699 773
         $this->skipIfIntlExtensionIsNotLoaded();
700 774
         $formatter = $this->createIntlFormatter($pattern);
701
-        $this->assertSame(false, $formatter->parse($value));
775
+        $this->assertFalse($formatter->parse($value));
702 776
         $this->assertSame($errorMessage, intl_get_error_message());
703 777
         $this->assertSame($errorCode, intl_get_error_code());
704
-        $this->assertSame($errorCode != 0, intl_is_failure(intl_get_error_code()));
778
+        $this->assertTrue(intl_is_failure(intl_get_error_code()));
705 779
     }
706 780
 
707 781
     /**
@@ -713,10 +787,13 @@ class StubIntlDateFormatterTest extends LocaleTestCase
713 787
         $errorMessage = 'Date parsing failed: U_PARSE_ERROR';
714 788
 
715 789
         $formatter = $this->createStubFormatter($pattern);
716
-        $this->assertSame(false, $formatter->parse($value));
790
+        $this->assertFalse($formatter->parse($value));
717 791
         $this->assertSame($errorMessage, StubIntl::getErrorMessage());
718 792
         $this->assertSame($errorCode, StubIntl::getErrorCode());
719
-        $this->assertSame($errorCode != 0, StubIntl::isFailure(StubIntl::getErrorCode()));
793
+        $this->assertTrue(StubIntl::isFailure(StubIntl::getErrorCode()));
794
+        $this->assertSame($errorMessage, $formatter->getErrorMessage());
795
+        $this->assertSame($errorCode, $formatter->getErrorCode());
796
+        $this->assertTrue(StubIntl::isFailure($formatter->getErrorCode()));
720 797
     }
721 798
 
722 799
     public function parseErrorProvider()

+ 49 - 0
vendor/symfony/tests/Symfony/Tests/Component/Locale/Stub/StubIntlTest.php View File

@@ -0,0 +1,49 @@
1
+<?php
2
+
3
+/*
4
+ * This file is part of the Symfony package.
5
+ *
6
+ * (c) Fabien Potencier <fabien@symfony.com>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+namespace Symfony\Tests\Component\Locale\Stub;
13
+
14
+require_once __DIR__.'/../TestCase.php';
15
+
16
+use Symfony\Component\Locale\Locale;
17
+use Symfony\Component\Locale\Stub\StubIntl;
18
+use Symfony\Tests\Component\Locale\TestCase as LocaleTestCase;
19
+
20
+class StubIntlTest extends LocaleTestCase
21
+{
22
+    public function codeProvider()
23
+    {
24
+        return array (
25
+            array(-129, '[BOGUS UErrorCode]'),
26
+            array(0, 'U_ZERO_ERROR'),
27
+            array(1, 'U_ILLEGAL_ARGUMENT_ERROR'),
28
+            array(9, 'U_PARSE_ERROR'),
29
+            array(129, '[BOGUS UErrorCode]'),
30
+        );
31
+    }
32
+
33
+    /**
34
+     * @dataProvider codeProvider
35
+     */
36
+    public function testGetErrorName($code, $name)
37
+    {
38
+        $this->assertSame($name, StubIntl::getErrorName($code));
39
+    }
40
+
41
+    /**
42
+     * @dataProvider codeProvider
43
+     */
44
+    public function testGetErrorNameWithIntl($code, $name)
45
+    {
46
+        $this->skipIfIntlExtensionIsNotLoaded();
47
+        $this->assertSame(intl_error_name($code), StubIntl::getErrorName($code));
48
+    }
49
+}

+ 46 - 5
vendor/symfony/tests/Symfony/Tests/Component/Locale/Stub/StubNumberFormatterTest.php View File

@@ -14,6 +14,7 @@ namespace Symfony\Tests\Component\Locale\Stub;
14 14
 require_once __DIR__.'/../TestCase.php';
15 15
 
16 16
 use Symfony\Component\Locale\Locale;
17
+use Symfony\Component\Locale\Stub\StubIntl;
17 18
 use Symfony\Component\Locale\Stub\StubNumberFormatter;
18 19
 use Symfony\Tests\Component\Locale\TestCase as LocaleTestCase;
19 20
 
@@ -224,15 +225,36 @@ class StubNumberFormatterTest extends LocaleTestCase
224 225
 
225 226
     public function testFormatStub()
226 227
     {
228
+        $errorCode = StubIntl::U_ZERO_ERROR;
229
+        $errorMessage = 'U_ZERO_ERROR';
230
+
227 231
         $formatter = $this->getStubFormatterWithDecimalStyle();
228 232
         $this->assertSame('9.555', $formatter->format(9.555));
233
+
234
+        $this->assertSame($errorMessage, StubIntl::getErrorMessage());
235
+        $this->assertSame($errorCode, StubIntl::getErrorCode());
236
+        $this->assertFalse(StubIntl::isFailure(StubIntl::getErrorCode()));
237
+        $this->assertSame($errorMessage, $formatter->getErrorMessage());
238
+        $this->assertSame($errorCode, $formatter->getErrorCode());
239
+        $this->assertFalse(StubIntl::isFailure($formatter->getErrorCode()));
229 240
     }
230 241
 
231 242
     public function testFormatIntl()
232 243
     {
233 244
         $this->skipIfIntlExtensionIsNotLoaded();
245
+
246
+        $errorCode = StubIntl::U_ZERO_ERROR;
247
+        $errorMessage = 'U_ZERO_ERROR';
248
+
234 249
         $formatter = $this->getIntlFormatterWithDecimalStyle();
235 250
         $this->assertSame('9.555', $formatter->format(9.555));
251
+
252
+        $this->assertSame($errorMessage, intl_get_error_message());
253
+        $this->assertSame($errorCode, intl_get_error_code());
254
+        $this->assertFalse(intl_is_failure(intl_get_error_code()));
255
+        $this->assertSame($errorMessage, $formatter->getErrorMessage());
256
+        $this->assertSame($errorCode, $formatter->getErrorCode());
257
+        $this->assertFalse(intl_is_failure($formatter->getErrorCode()));
236 258
     }
237 259
 
238 260
     /**
@@ -613,7 +635,7 @@ class StubNumberFormatterTest extends LocaleTestCase
613 635
     public function testGetErrorCode()
614 636
     {
615 637
         $formatter = $this->getStubFormatterWithDecimalStyle();
616
-        $this->assertEquals(StubNumberFormatter::U_ZERO_ERROR, $formatter->getErrorCode());
638
+        $this->assertEquals(StubIntl::U_ZERO_ERROR, $formatter->getErrorCode());
617 639
     }
618 640
 
619 641
     public function testGetLocale()
@@ -668,10 +690,19 @@ class StubNumberFormatterTest extends LocaleTestCase
668 690
         $this->assertSame($expected, $parsedValue, $message);
669 691
 
670 692
         if ($expected === false) {
671
-            $this->assertSame($formatter::U_PARSE_ERROR, $formatter->getErrorCode());
693
+            $errorCode = StubIntl::U_PARSE_ERROR;
694
+            $errorMessage = 'Number parsing failed: U_PARSE_ERROR';
672 695
         } else {
673
-            $this->assertEquals($formatter::U_ZERO_ERROR, $formatter->getErrorCode());
696
+            $errorCode = StubIntl::U_ZERO_ERROR;
697
+            $errorMessage = 'U_ZERO_ERROR';
674 698
         }
699
+
700
+        $this->assertSame($errorMessage, StubIntl::getErrorMessage());
701
+        $this->assertSame($errorCode, StubIntl::getErrorCode());
702
+        $this->assertSame($errorCode !== 0, StubIntl::isFailure(StubIntl::getErrorCode()));
703
+        $this->assertSame($errorMessage, $formatter->getErrorMessage());
704
+        $this->assertSame($errorCode, $formatter->getErrorCode());
705
+        $this->assertSame($errorCode !== 0, StubIntl::isFailure($formatter->getErrorCode()));
675 706
     }
676 707
 
677 708
     /**
@@ -681,15 +712,25 @@ class StubNumberFormatterTest extends LocaleTestCase
681 712
     {
682 713
         $this->skipIfIntlExtensionIsNotLoaded();
683 714
         $this->skipIfICUVersionIsTooOld();
715
+
684 716
         $formatter = $this->getIntlFormatterWithDecimalStyle();
685 717
         $parsedValue = $formatter->parse($value, \NumberFormatter::TYPE_DOUBLE);
686 718
         $this->assertSame($expected, $parsedValue, $message);
687 719
 
688 720
         if ($expected === false) {
689
-            $this->assertSame(U_PARSE_ERROR, $formatter->getErrorCode());
721
+            $errorCode = StubIntl::U_PARSE_ERROR;
722
+            $errorMessage = 'Number parsing failed: U_PARSE_ERROR';
690 723
         } else {
691
-            $this->assertEquals(U_ZERO_ERROR, $formatter->getErrorCode());
724
+            $errorCode = StubIntl::U_ZERO_ERROR;
725
+            $errorMessage = 'U_ZERO_ERROR';
692 726
         }
727
+
728
+        $this->assertSame($errorMessage, intl_get_error_message());
729
+        $this->assertSame($errorCode, intl_get_error_code());
730
+        $this->assertSame($errorCode > 0, intl_is_failure(intl_get_error_code()));
731
+        $this->assertSame($errorMessage, $formatter->getErrorMessage());
732
+        $this->assertSame($errorCode, $formatter->getErrorCode());
733
+        $this->assertSame($errorCode > 0, intl_is_failure($formatter->getErrorCode()));
693 734
     }
694 735
 
695 736
     public function parseProvider()

+ 5 - 0
vendor/symfony/tests/Symfony/Tests/Component/Locale/TestCase.php View File

@@ -58,6 +58,11 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase
58 58
         }
59 59
     }
60 60
 
61
+    protected function isGreaterOrEqualThanPhpVersion($version)
62
+    {
63
+        return version_compare(\PHP_VERSION, $version, '>=');
64
+    }
65
+
61 66
     protected function isGreaterOrEqualThanIcuVersion($version)
62 67
     {
63 68
         $version = $this->normalizeIcuVersion($version);

+ 4 - 0
vendor/symfony/tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher1.apache View File

@@ -53,6 +53,10 @@ RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz5,E=_ROUTING_foo:%1]
53 53
 RewriteCond %{REQUEST_URI} ^/test/baz$
54 54
 RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz6,E=_ROUTING_foo:bar\ baz]
55 55
 
56
+# baz7
57
+RewriteCond %{REQUEST_URI} ^/te\ st/baz$
58
+RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz7]
59
+
56 60
 # 405 Method Not Allowed
57 61
 RewriteCond %{_ROUTING__allow_GET} !-z [OR]
58 62
 RewriteCond %{_ROUTING__allow_HEAD} !-z [OR]

+ 19 - 14
vendor/symfony/tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher1.php View File

@@ -26,12 +26,12 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
26 26
         $pathinfo = urldecode($pathinfo);
27 27
 
28 28
         // foo
29
-        if (0 === strpos($pathinfo, '/foo') && preg_match('#^/foo/(?P<bar>baz|symfony)$#xs', $pathinfo, $matches)) {
29
+        if (0 === strpos($pathinfo, '/foo') && preg_match('#^/foo/(?P<bar>baz|symfony)$#s', $pathinfo, $matches)) {
30 30
             return array_merge($this->mergeDefaults($matches, array (  'def' => 'test',)), array('_route' => 'foo'));
31 31
         }
32 32
 
33 33
         // bar
34
-        if (0 === strpos($pathinfo, '/bar') && preg_match('#^/bar/(?P<foo>[^/]+?)$#xs', $pathinfo, $matches)) {
34
+        if (0 === strpos($pathinfo, '/bar') && preg_match('#^/bar/(?P<foo>[^/]+?)$#s', $pathinfo, $matches)) {
35 35
             if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
36 36
                 $allow = array_merge($allow, array('GET', 'HEAD'));
37 37
                 goto not_bar;
@@ -42,7 +42,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
42 42
         not_bar:
43 43
 
44 44
         // barhead
45
-        if (0 === strpos($pathinfo, '/barhead') && preg_match('#^/barhead/(?P<foo>[^/]+?)$#xs', $pathinfo, $matches)) {
45
+        if (0 === strpos($pathinfo, '/barhead') && preg_match('#^/barhead/(?P<foo>[^/]+?)$#s', $pathinfo, $matches)) {
46 46
             if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
47 47
                 $allow = array_merge($allow, array('GET', 'HEAD'));
48 48
                 goto not_barhead;
@@ -68,13 +68,13 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
68 68
         }
69 69
 
70 70
         // baz4
71
-        if (0 === strpos($pathinfo, '/test') && preg_match('#^/test/(?P<foo>[^/]+?)/$#xs', $pathinfo, $matches)) {
71
+        if (0 === strpos($pathinfo, '/test') && preg_match('#^/test/(?P<foo>[^/]+?)/$#s', $pathinfo, $matches)) {
72 72
             $matches['_route'] = 'baz4';
73 73
             return $matches;
74 74
         }
75 75
 
76 76
         // baz5
77
-        if (0 === strpos($pathinfo, '/test') && preg_match('#^/test/(?P<foo>[^/]+?)/$#xs', $pathinfo, $matches)) {
77
+        if (0 === strpos($pathinfo, '/test') && preg_match('#^/test/(?P<foo>[^/]+?)/$#s', $pathinfo, $matches)) {
78 78
             if ($this->context->getMethod() != 'POST') {
79 79
                 $allow[] = 'POST';
80 80
                 goto not_baz5;
@@ -85,7 +85,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
85 85
         not_baz5:
86 86
 
87 87
         // baz.baz6
88
-        if (0 === strpos($pathinfo, '/test') && preg_match('#^/test/(?P<foo>[^/]+?)/$#xs', $pathinfo, $matches)) {
88
+        if (0 === strpos($pathinfo, '/test') && preg_match('#^/test/(?P<foo>[^/]+?)/$#s', $pathinfo, $matches)) {
89 89
             if ($this->context->getMethod() != 'PUT') {
90 90
                 $allow[] = 'PUT';
91 91
                 goto not_bazbaz6;
@@ -101,33 +101,38 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
101 101
         }
102 102
 
103 103
         // quoter
104
-        if (preg_match('#^/(?P<quoter>[\']+)$#xs', $pathinfo, $matches)) {
104
+        if (preg_match('#^/(?P<quoter>[\']+)$#s', $pathinfo, $matches)) {
105 105
             $matches['_route'] = 'quoter';
106 106
             return $matches;
107 107
         }
108 108
 
109
+        // space
110
+        if ($pathinfo === '/spa ce') {
111
+            return array('_route' => 'space');
112
+        }
113
+
109 114
         if (0 === strpos($pathinfo, '/a')) {
110 115
             if (0 === strpos($pathinfo, '/a/b\'b')) {
111 116
                 // foo1
112
-                if (preg_match('#^/a/b\'b/(?P<foo>[^/]+?)$#xs', $pathinfo, $matches)) {
117
+                if (preg_match('#^/a/b\'b/(?P<foo>[^/]+?)$#s', $pathinfo, $matches)) {
113 118
                     $matches['_route'] = 'foo1';
114 119
                     return $matches;
115 120
                 }
116 121
 
117 122
                 // bar1
118
-                if (preg_match('#^/a/b\'b/(?P<bar>[^/]+?)$#xs', $pathinfo, $matches)) {
123
+                if (preg_match('#^/a/b\'b/(?P<bar>[^/]+?)$#s', $pathinfo, $matches)) {
119 124
                     $matches['_route'] = 'bar1';
120 125
                     return $matches;
121 126
                 }
122 127
 
123 128
                 // foo2
124
-                if (preg_match('#^/a/b\'b/(?P<foo1>[^/]+?)$#xs', $pathinfo, $matches)) {
129
+                if (preg_match('#^/a/b\'b/(?P<foo1>[^/]+?)$#s', $pathinfo, $matches)) {
125 130
                     $matches['_route'] = 'foo2';
126 131
                     return $matches;
127 132
                 }
128 133
 
129 134
                 // bar2
130
-                if (preg_match('#^/a/b\'b/(?P<bar1>[^/]+?)$#xs', $pathinfo, $matches)) {
135
+                if (preg_match('#^/a/b\'b/(?P<bar1>[^/]+?)$#s', $pathinfo, $matches)) {
131 136
                     $matches['_route'] = 'bar2';
132 137
                     return $matches;
133 138
                 }
@@ -145,7 +150,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
145 150
             }
146 151
 
147 152
             // foo4
148
-            if (preg_match('#^/aba/(?P<foo>[^/]+?)$#xs', $pathinfo, $matches)) {
153
+            if (preg_match('#^/aba/(?P<foo>[^/]+?)$#s', $pathinfo, $matches)) {
149 154
                 $matches['_route'] = 'foo4';
150 155
                 return $matches;
151 156
             }
@@ -153,13 +158,13 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
153 158
         }
154 159
 
155 160
         // foo3
156
-        if (preg_match('#^/(?P<_locale>[^/]+?)/b/(?P<foo>[^/]+?)$#xs', $pathinfo, $matches)) {
161
+        if (preg_match('#^/(?P<_locale>[^/]+?)/b/(?P<foo>[^/]+?)$#s', $pathinfo, $matches)) {
157 162
             $matches['_route'] = 'foo3';
158 163
             return $matches;
159 164
         }
160 165
 
161 166
         // bar3
162
-        if (preg_match('#^/(?P<_locale>[^/]+?)/b/(?P<bar>[^/]+?)$#xs', $pathinfo, $matches)) {
167
+        if (preg_match('#^/(?P<_locale>[^/]+?)/b/(?P<bar>[^/]+?)$#s', $pathinfo, $matches)) {
163 168
             $matches['_route'] = 'bar3';
164 169
             return $matches;
165 170
         }

+ 7 - 0
vendor/symfony/tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher2.apache View File

@@ -0,0 +1,7 @@
1
+# skip "real" requests
2
+RewriteCond %{REQUEST_FILENAME} -f
3
+RewriteRule .* - [QSA,L]
4
+
5
+# foo
6
+RewriteCond %{REQUEST_URI} ^/foo$
7
+RewriteRule .* ap\ p_d\ ev.php [QSA,L,E=_ROUTING__route:foo]

+ 0 - 0
vendor/symfony/tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher2.php View File


Some files were not shown because too many files changed in this diff