Skip to content

Commit 835176c

Browse files
committed
Merge branch '3.1'
* 3.1: added a comment about a workaround [Finder] no PHP warning on empty directory iteration [HttpKernel] Fixed the nullable support for php 7.1 and below fixed CS [Form] Fix typo in doc comment Fix version constraint [Config] Handle open_basedir restrictions in FileLocator Fixed bad merge [DoctrineBridge][PropertyInfo] Treat Doctrine decimal type as string [bugfix] [Console] Set `Input::$interactive` to `false` when command is executed with `--quiet` as verbosity level Use JSON_UNESCAPED_SLASHES for lint commands output Fixed collapsed ChoiceType options attributes [FrameworkBundle] Remove cache clearer default value in config Consider the umask setting when dumping a file. Fixed the nullable support for php 7.1 and below Make ReflectionExtractor compatible with ReflectionType changes in PHP 7.1
2 parents 47657e5 + ad7bc03 commit 835176c

File tree

32 files changed

+306
-38
lines changed

32 files changed

+306
-38
lines changed

src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,12 @@ private function getPhpType($doctrineType)
178178
return Type::BUILTIN_TYPE_INT;
179179

180180
case DBALType::FLOAT:
181-
case DBALType::DECIMAL:
182181
return Type::BUILTIN_TYPE_FLOAT;
183182

184183
case DBALType::STRING:
185184
case DBALType::TEXT:
186185
case DBALType::GUID:
186+
case DBALType::DECIMAL:
187187
return Type::BUILTIN_TYPE_STRING;
188188

189189
case DBALType::BOOLEAN:

src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ public function testGetProperties()
4949
'time',
5050
'json',
5151
'simpleArray',
52+
'float',
53+
'decimal',
5254
'bool',
5355
'binary',
5456
'customFoo',
@@ -73,6 +75,8 @@ public function typesProvider()
7375
return array(
7476
array('id', array(new Type(Type::BUILTIN_TYPE_INT))),
7577
array('guid', array(new Type(Type::BUILTIN_TYPE_STRING))),
78+
array('float', array(new Type(Type::BUILTIN_TYPE_FLOAT))),
79+
array('decimal', array(new Type(Type::BUILTIN_TYPE_STRING))),
7680
array('bool', array(new Type(Type::BUILTIN_TYPE_BOOL))),
7781
array('binary', array(new Type(Type::BUILTIN_TYPE_RESOURCE))),
7882
array('json', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true))),

src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineDummy.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,16 @@ class DoctrineDummy
6565
*/
6666
private $simpleArray;
6767

68+
/**
69+
* @Column(type="float")
70+
*/
71+
private $float;
72+
73+
/**
74+
* @Column(type="decimal", precision=10, scale=2)
75+
*/
76+
private $decimal;
77+
6878
/**
6979
* @Column(type="boolean")
7080
*/

src/Symfony/Bridge/Twig/Command/LintCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ private function displayJson(OutputInterface $output, $filesInfo)
202202
}
203203
});
204204

205-
$output->writeln(json_encode($filesInfo, JSON_PRETTY_PRINT));
205+
$output->writeln(json_encode($filesInfo, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
206206

207207
return min($errors, 1);
208208
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ private function addCacheSection(ArrayNodeDefinition $rootNode)
680680
->scalarNode('provider')
681681
->info('The service name to use as provider when the specified adapter needs one.')
682682
->end()
683-
->scalarNode('clearer')->defaultValue('cache.default_clearer')->end()
683+
->scalarNode('clearer')->end()
684684
->end()
685685
->end()
686686
->validate()

src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_attributes.html.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
id="<?php echo $view->escape($id) ?>" name="<?php echo $view->escape($full_name) ?>"
21
<?php if ($disabled): ?>disabled="disabled" <?php endif ?>
32
<?php foreach ($choice_attr as $k => $v): ?>
43
<?php if ($v === true): ?>

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,28 @@ public function doTestCachePools($options, $adapterClass)
6262
static::bootKernel($options);
6363
$container = static::$kernel->getContainer();
6464

65-
$pool = $container->get('cache.test');
66-
$this->assertInstanceOf($adapterClass, $pool);
65+
$pool1 = $container->get('cache.pool1');
66+
$this->assertInstanceOf($adapterClass, $pool1);
6767

6868
$key = 'foobar';
69-
$pool->deleteItem($key);
70-
$item = $pool->getItem($key);
69+
$pool1->deleteItem($key);
70+
$item = $pool1->getItem($key);
7171
$this->assertFalse($item->isHit());
7272

7373
$item->set('baz');
74-
$pool->save($item);
75-
$item = $pool->getItem($key);
74+
$pool1->save($item);
75+
$item = $pool1->getItem($key);
7676
$this->assertTrue($item->isHit());
7777

78+
$pool2 = $container->get('cache.pool2');
79+
$pool2->save($item);
80+
7881
$container->get('cache_clearer')->clear($container->getParameter('kernel.cache_dir'));
79-
$item = $pool->getItem($key);
82+
$item = $pool1->getItem($key);
8083
$this->assertFalse($item->isHit());
84+
85+
$item = $pool2->getItem($key);
86+
$this->assertTrue($item->isHit());
8187
}
8288

8389
protected static function createKernel(array $options = array())

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/config.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,10 @@ imports:
44
framework:
55
cache:
66
pools:
7-
cache.test:
7+
cache.pool1:
88
public: true
9+
cache.pool2:
10+
public: true
11+
adapter: cache.pool3
12+
cache.pool3:
13+
clearer: ~

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/redis_config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@ framework:
55
cache:
66
app: cache.adapter.redis
77
pools:
8-
cache.test:
8+
cache.pool1:
99
public: true
10+
cache.pool2:
11+
public: true
12+
clearer: ~

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/redis_custom_config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@ services:
1717
framework:
1818
cache:
1919
pools:
20-
cache.test:
20+
cache.pool1:
2121
public: true
22+
cache.pool2:
23+
public: true
24+
clearer: ~

0 commit comments

Comments
 (0)