Skip to content

Commit a3d398e

Browse files
Merge branch '2.8' into 3.3
* 2.8: [SecurityBundle] Fix syntax error in test [Console] Remove remaining dead code bumped Symfony version to 2.8.32 bumped Symfony version to 2.7.39 updated VERSION for 2.8.31 updated CHANGELOG for 2.8.31 updated VERSION for 2.7.38 updated CHANGELOG for 2.7.38 Replace array|\Traversable by iterable Fix ambiguous pattern
2 parents 146cefd + 7215acb commit a3d398e

File tree

11 files changed

+45
-45
lines changed

11 files changed

+45
-45
lines changed

src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/AddSessionDomainConstraintPassTest.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ private function createContainer($sessionStorageOptions)
126126
$ext = new SecurityExtension();
127127
$ext->load($config, $container);
128128

129-
(new AddSessionDomainConstraintPass())->process($container);
129+
$pass = new AddSessionDomainConstraintPass();
130+
$pass->process($container);
130131

131132
return $container;
132133
}

src/Symfony/Component/Console/Application.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,10 @@ public function run(InputInterface $input = null, OutputInterface $output = null
121121
$e = null;
122122
$exitCode = $this->doRun($input, $output);
123123
} catch (\Exception $e) {
124-
} catch (\Throwable $e) {
125124
}
126125

127126
if (null !== $e) {
128-
if (!$this->catchExceptions || !$e instanceof \Exception) {
127+
if (!$this->catchExceptions) {
129128
throw $e;
130129
}
131130

@@ -998,8 +997,8 @@ public function extractNamespace($name, $limit = null)
998997
* Finds alternative of $name among $collection,
999998
* if nothing is found in $collection, try in $abbrevs.
1000999
*
1001-
* @param string $name The string
1002-
* @param array|\Traversable $collection The collection
1000+
* @param string $name The string
1001+
* @param iterable $collection The collection
10031002
*
10041003
* @return string[] A sorted array of similar string
10051004
*/

src/Symfony/Component/Console/Question/Question.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function setHiddenFallback($fallback)
117117
/**
118118
* Gets values for the autocompleter.
119119
*
120-
* @return null|array|\Traversable
120+
* @return null|iterable
121121
*/
122122
public function getAutocompleterValues()
123123
{
@@ -127,7 +127,7 @@ public function getAutocompleterValues()
127127
/**
128128
* Sets values for the autocompleter.
129129
*
130-
* @param null|array|\Traversable $values
130+
* @param null|iterable $values
131131
*
132132
* @return $this
133133
*

src/Symfony/Component/Filesystem/Filesystem.php

+17-17
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ public function copy($originFile, $targetFile, $overwriteNewerFiles = false)
8383
/**
8484
* Creates a directory recursively.
8585
*
86-
* @param string|array|\Traversable $dirs The directory path
87-
* @param int $mode The directory mode
86+
* @param string|iterable $dirs The directory path
87+
* @param int $mode The directory mode
8888
*
8989
* @throws IOException On any directory creation failure
9090
*/
@@ -111,7 +111,7 @@ public function mkdir($dirs, $mode = 0777)
111111
/**
112112
* Checks the existence of files or directories.
113113
*
114-
* @param string|array|\Traversable $files A filename, an array of files, or a \Traversable instance to check
114+
* @param string|iterable $files A filename, an array of files, or a \Traversable instance to check
115115
*
116116
* @return bool true if the file exists, false otherwise
117117
*/
@@ -135,9 +135,9 @@ public function exists($files)
135135
/**
136136
* Sets access and modification time of file.
137137
*
138-
* @param string|array|\Traversable $files A filename, an array of files, or a \Traversable instance to create
139-
* @param int $time The touch time as a Unix timestamp
140-
* @param int $atime The access time as a Unix timestamp
138+
* @param string|iterable $files A filename, an array of files, or a \Traversable instance to create
139+
* @param int $time The touch time as a Unix timestamp
140+
* @param int $atime The access time as a Unix timestamp
141141
*
142142
* @throws IOException When touch fails
143143
*/
@@ -154,7 +154,7 @@ public function touch($files, $time = null, $atime = null)
154154
/**
155155
* Removes files or directories.
156156
*
157-
* @param string|array|\Traversable $files A filename, an array of files, or a \Traversable instance to remove
157+
* @param string|iterable $files A filename, an array of files, or a \Traversable instance to remove
158158
*
159159
* @throws IOException When removal fails
160160
*/
@@ -190,10 +190,10 @@ public function remove($files)
190190
/**
191191
* Change mode for an array of files or directories.
192192
*
193-
* @param string|array|\Traversable $files A filename, an array of files, or a \Traversable instance to change mode
194-
* @param int $mode The new mode (octal)
195-
* @param int $umask The mode mask (octal)
196-
* @param bool $recursive Whether change the mod recursively or not
193+
* @param string|iterable $files A filename, an array of files, or a \Traversable instance to change mode
194+
* @param int $mode The new mode (octal)
195+
* @param int $umask The mode mask (octal)
196+
* @param bool $recursive Whether change the mod recursively or not
197197
*
198198
* @throws IOException When the change fail
199199
*/
@@ -212,9 +212,9 @@ public function chmod($files, $mode, $umask = 0000, $recursive = false)
212212
/**
213213
* Change the owner of an array of files or directories.
214214
*
215-
* @param string|array|\Traversable $files A filename, an array of files, or a \Traversable instance to change owner
216-
* @param string $user The new owner user name
217-
* @param bool $recursive Whether change the owner recursively or not
215+
* @param string|iterable $files A filename, an array of files, or a \Traversable instance to change owner
216+
* @param string $user The new owner user name
217+
* @param bool $recursive Whether change the owner recursively or not
218218
*
219219
* @throws IOException When the change fail
220220
*/
@@ -239,9 +239,9 @@ public function chown($files, $user, $recursive = false)
239239
/**
240240
* Change the group of an array of files or directories.
241241
*
242-
* @param string|array|\Traversable $files A filename, an array of files, or a \Traversable instance to change group
243-
* @param string $group The group name
244-
* @param bool $recursive Whether change the group recursively or not
242+
* @param string|iterable $files A filename, an array of files, or a \Traversable instance to change group
243+
* @param string $group The group name
244+
* @param bool $recursive Whether change the group recursively or not
245245
*
246246
* @throws IOException When the change fail
247247
*/

src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ class ArrayChoiceList implements ChoiceListInterface
5656
*
5757
* The given choice array must have the same array keys as the value array.
5858
*
59-
* @param array|\Traversable $choices The selectable choices
60-
* @param callable|null $value The callable for creating the value
61-
* for a choice. If `null` is passed,
62-
* incrementing integers are used as
63-
* values
59+
* @param iterable $choices The selectable choices
60+
* @param callable|null $value The callable for creating the value
61+
* for a choice. If `null` is passed,
62+
* incrementing integers are used as
63+
* values
6464
*/
6565
public function __construct($choices, callable $value = null)
6666
{

src/Symfony/Component/Form/ChoiceList/Factory/ChoiceListFactoryInterface.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ interface ChoiceListFactoryInterface
3131
* The callable receives the choice as first and the array key as the second
3232
* argument.
3333
*
34-
* @param array|\Traversable $choices The choices
35-
* @param null|callable $value The callable generating the choice
36-
* values
34+
* @param iterable $choices The choices
35+
* @param null|callable $value The callable generating the choice
36+
* values
3737
*
3838
* @return ChoiceListInterface The choice list
3939
*/

src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function getDecoratedFactory()
6363
/**
6464
* {@inheritdoc}
6565
*
66-
* @param array|\Traversable $choices The choices
66+
* @param iterable $choices The choices
6767
* @param null|callable|string|PropertyPath $value The callable or path for
6868
* generating the choice values
6969
*

src/Symfony/Component/Intl/Data/Bundle/Writer/TextBundleWriter.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,11 @@ private function writeArray($file, array $value, $indentation)
195195
/**
196196
* Writes a "table" node.
197197
*
198-
* @param resource $file The file handle to write to
199-
* @param array|\Traversable $value The value of the node
200-
* @param int $indentation The number of levels to indent
201-
* @param bool $fallback Whether the table should be merged
202-
* with the fallback locale
198+
* @param resource $file The file handle to write to
199+
* @param iterable $value The value of the node
200+
* @param int $indentation The number of levels to indent
201+
* @param bool $fallback Whether the table should be merged
202+
* with the fallback locale
203203
*
204204
* @throws UnexpectedTypeException when $value is not an array and not a
205205
* \Traversable instance

src/Symfony/Component/PropertyAccess/PropertyAccessor.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -645,11 +645,11 @@ private function writeProperty($zval, $property, $value)
645645
/**
646646
* Adjusts a collection-valued property by calling add*() and remove*() methods.
647647
*
648-
* @param array $zval The array containing the object to write to
649-
* @param string $property The property to write
650-
* @param array|\Traversable $collection The collection to write
651-
* @param string $addMethod The add*() method
652-
* @param string $removeMethod The remove*() method
648+
* @param array $zval The array containing the object to write to
649+
* @param string $property The property to write
650+
* @param iterable $collection The collection to write
651+
* @param string $addMethod The add*() method
652+
* @param string $removeMethod The remove*() method
653653
*/
654654
private function writeCollection($zval, $property, $collection, $addMethod, $removeMethod)
655655
{

src/Symfony/Component/Validator/Constraints/UrlValidator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class UrlValidator extends ConstraintValidator
2424
(%s):// # protocol
2525
(([\.\pL\pN-]+:)?([\.\pL\pN-]+)@)? # basic auth
2626
(
27-
([\pL\pN\pS-\.])+(\.?([\pL\pN]|xn\-\-[\pL\pN-]+)+\.?) # a domain name
27+
([\pL\pN\pS\-\.])+(\.?([\pL\pN]|xn\-\-[\pL\pN-]+)+\.?) # a domain name
2828
| # or
2929
\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} # an IP address
3030
| # or

src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ private function validateObject($object, $propertyPath, array $groups, $traversa
374374
* objects are iterated as well. Nested arrays are always iterated,
375375
* regardless of the value of $recursive.
376376
*
377-
* @param array|\Traversable $collection The collection
377+
* @param iterable $collection The collection
378378
* @param string $propertyPath The current property path
379379
* @param string[] $groups The validated groups
380380
* @param ExecutionContextInterface $context The current execution context

0 commit comments

Comments
 (0)