Merge branch '3.0'
* 3.0: Create PULL_REQUEST_TEMPLATE.md Remove duplicate validation in RedirectResponse [Yaml] fix default timezone to be UTC [DependencyInjection] fix dumped YAML string [Config] Add suggest to composer.json for symfony/yaml
This commit is contained in:
commit
ddf62075e8
10
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
10
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
| Q | A
|
||||
| ------------- | ---
|
||||
| Bug fix? | [yes|no]
|
||||
| New feature? | [yes|no]
|
||||
| BC breaks? | [yes|no]
|
||||
| Deprecations? | [yes|no]
|
||||
| Tests pass? | [yes|no]
|
||||
| Fixed tickets | [comma-separated list of tickets fixed by the PR, if any]
|
||||
| License | MIT
|
||||
| Doc PR | [reference to the documentation PR, if any]
|
@ -12,19 +12,6 @@ If you'd like to contribute, please read the following documents:
|
||||
* [Pull Request Template][3]: Template header to use in your pull request
|
||||
description;
|
||||
|
||||
```markdown
|
||||
| Q | A
|
||||
| ------------- | ---
|
||||
| Bug fix? | yes/no
|
||||
| New feature? | yes/no
|
||||
| BC breaks? | no
|
||||
| Deprecations? | no
|
||||
| Tests pass? | yes
|
||||
| Fixed tickets | #1234
|
||||
| License | MIT
|
||||
| Doc PR | symfony/symfony-docs#1234
|
||||
```
|
||||
|
||||
* [Backwards Compatibility][4]: Backward compatibility rules.
|
||||
|
||||
[1]: https://symfony.com/doc/current/contributing/code/index.html
|
||||
|
@ -19,6 +19,9 @@
|
||||
"php": ">=5.5.9",
|
||||
"symfony/filesystem": "~2.8|~3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/yaml": "To use the yaml reference dumper"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Symfony\\Component\\Config\\": "" },
|
||||
"exclude-from-classmap": [
|
||||
|
@ -89,7 +89,7 @@ class YamlDumper extends Dumper
|
||||
}
|
||||
|
||||
if ($definition->getFile()) {
|
||||
$code .= sprintf(" file: %s\n", $definition->getFile());
|
||||
$code .= sprintf(" file: %s\n", $this->dumper->dump($definition->getFile()));
|
||||
}
|
||||
|
||||
if ($definition->isSynthetic()) {
|
||||
|
@ -33,10 +33,6 @@ class RedirectResponse extends Response
|
||||
*/
|
||||
public function __construct($url, $status = 302, $headers = array())
|
||||
{
|
||||
if (empty($url)) {
|
||||
throw new \InvalidArgumentException('Cannot redirect to an empty URL.');
|
||||
}
|
||||
|
||||
parent::__construct('', $status, $headers);
|
||||
|
||||
$this->setTargetUrl($url);
|
||||
|
@ -569,7 +569,12 @@ class Inline
|
||||
case preg_match('/^(-|\+)?[0-9,]+(\.[0-9]+)?$/', $scalar):
|
||||
return (float) str_replace(',', '', $scalar);
|
||||
case preg_match(self::getTimestampRegex(), $scalar):
|
||||
return strtotime($scalar);
|
||||
$timeZone = date_default_timezone_get();
|
||||
date_default_timezone_set('UTC');
|
||||
$time = strtotime($scalar);
|
||||
date_default_timezone_set($timeZone);
|
||||
|
||||
return $time;
|
||||
}
|
||||
default:
|
||||
return (string) $scalar;
|
||||
|
@ -754,7 +754,7 @@ yaml: |
|
||||
Billsmer @ 338-4338.
|
||||
php: |
|
||||
array(
|
||||
'invoice' => 34843, 'date' => mktime(0, 0, 0, 1, 23, 2001),
|
||||
'invoice' => 34843, 'date' => gmmktime(0, 0, 0, 1, 23, 2001),
|
||||
'bill-to' =>
|
||||
array( 'given' => 'Chris', 'family' => 'Dumars', 'address' => array( 'lines' => "458 Walkman Dr.\nSuite #292\n", 'city' => 'Royal Oak', 'state' => 'MI', 'postal' => 48046 ) )
|
||||
, 'ship-to' =>
|
||||
@ -879,7 +879,7 @@ yaml: |
|
||||
php: |
|
||||
array(
|
||||
'invoice' => 34843,
|
||||
'date' => mktime(0, 0, 0, 1, 23, 2001),
|
||||
'date' => gmmktime(0, 0, 0, 1, 23, 2001),
|
||||
'total' => 4443.52
|
||||
)
|
||||
---
|
||||
|
@ -285,7 +285,7 @@ class InlineTest extends \PHPUnit_Framework_TestCase
|
||||
array("'on'", 'on'),
|
||||
array("'off'", 'off'),
|
||||
|
||||
array('2007-10-30', mktime(0, 0, 0, 10, 30, 2007)),
|
||||
array('2007-10-30', gmmktime(0, 0, 0, 10, 30, 2007)),
|
||||
array('2007-10-30T02:59:43Z', gmmktime(2, 59, 43, 10, 30, 2007)),
|
||||
array('2007-10-30 02:59:43 Z', gmmktime(2, 59, 43, 10, 30, 2007)),
|
||||
array('1960-10-30 02:59:43 Z', gmmktime(2, 59, 43, 10, 30, 1960)),
|
||||
|
Reference in New Issue
Block a user