Skip to content

Commit 682bf5b

Browse files
Merge branch '3.3' into 3.4
* 3.3: PHP CS Fixer: clean up repo and adjust config use interface_exists instead of class_exists Dumper shouldn't use html format for phpdbg [Validator] Fix access to root object when using composite constraint
2 parents 1b36d03 + 00e8908 commit 682bf5b

File tree

25 files changed

+72
-29
lines changed

25 files changed

+72
-29
lines changed

.php_cs.dist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,9 @@ return PhpCsFixer\Config::create()
3636
->notPath('Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_name_entry_label.html.php')
3737
// explicit heredoc test
3838
->notPath('Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/translation.html.php')
39+
// explicit trigger_error tests
40+
->notPath('Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt')
41+
->notPath('Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak.phpt')
42+
->notPath('Symfony/Component/Debug/Tests/DebugClassLoaderTest.php')
3943
)
4044
;

src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,35 @@ public function getTransTests()
8888
array('{% trans into "fr"%}Hello{% endtrans %}', 'Hello'),
8989

9090
// transchoice
91-
array('{% transchoice count from "messages" %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
92-
'There is no apples', array('count' => 0)),
93-
array('{% transchoice count %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
94-
'There is 5 apples', array('count' => 5)),
95-
array('{% transchoice count %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%){% endtranschoice %}',
96-
'There is 5 apples (Symfony)', array('count' => 5, 'name' => 'Symfony')),
97-
array('{% transchoice count with { \'%name%\': \'Symfony\' } %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%){% endtranschoice %}',
98-
'There is 5 apples (Symfony)', array('count' => 5)),
99-
array('{% transchoice count into "fr"%}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
100-
'There is no apples', array('count' => 0)),
101-
array('{% transchoice 5 into "fr"%}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
102-
'There is 5 apples'),
91+
array(
92+
'{% transchoice count from "messages" %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
93+
'There is no apples',
94+
array('count' => 0),
95+
),
96+
array(
97+
'{% transchoice count %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
98+
'There is 5 apples',
99+
array('count' => 5),
100+
),
101+
array(
102+
'{% transchoice count %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%){% endtranschoice %}',
103+
'There is 5 apples (Symfony)',
104+
array('count' => 5, 'name' => 'Symfony'),
105+
),
106+
array(
107+
'{% transchoice count with { \'%name%\': \'Symfony\' } %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%){% endtranschoice %}',
108+
'There is 5 apples (Symfony)',
109+
array('count' => 5),
110+
),
111+
array(
112+
'{% transchoice count into "fr"%}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
113+
'There is no apples',
114+
array('count' => 0),
115+
),
116+
array(
117+
'{% transchoice 5 into "fr"%}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
118+
'There is 5 apples',
119+
),
103120

104121
// trans filter
105122
array('{{ "Hello"|trans }}', 'Hello'),

src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ class Translator extends BaseTranslator implements WarmableInterface
4848
private $resources = array();
4949

5050
/**
51+
* Constructor.
52+
*
5153
* Available options:
5254
*
5355
* * cache_dir: The cache directory (or null to disable caching)

src/Symfony/Bundle/WebServerBundle/Command/ServerLogCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function isEnabled()
3939
}
4040

4141
// based on a symfony/symfony package, it crashes due a missing FormatterInterface from monolog/monolog
42-
if (!class_exists(FormatterInterface::class)) {
42+
if (!interface_exists(FormatterInterface::class)) {
4343
return false;
4444
}
4545

src/Symfony/Component/Cache/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2016-present Fabien Potencier
1+
Copyright (c) 2016-2018 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Debug/Resources/ext/tests/001.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
--TEST--
22
Test symfony_zval_info API
33
--SKIPIF--
4-
<?php if (!extension_loaded('symfony_debug')) print 'skip'; ?>
4+
<?php if (!extension_loaded('symfony_debug')) {
5+
echo 'skip';
6+
} ?>
57
--FILE--
68
<?php
79

src/Symfony/Component/Debug/Resources/ext/tests/002.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
--TEST--
22
Test symfony_debug_backtrace in case of fatal error
33
--SKIPIF--
4-
<?php if (!extension_loaded('symfony_debug')) print 'skip'; ?>
4+
<?php if (!extension_loaded('symfony_debug')) {
5+
echo 'skip';
6+
} ?>
57
--FILE--
68
<?php
79

src/Symfony/Component/Debug/Resources/ext/tests/002_1.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
--TEST--
22
Test symfony_debug_backtrace in case of non fatal error
33
--SKIPIF--
4-
<?php if (!extension_loaded('symfony_debug')) print 'skip'; ?>
4+
<?php if (!extension_loaded('symfony_debug')) {
5+
echo 'skip';
6+
} ?>
57
--FILE--
68
<?php
79

src/Symfony/Component/Debug/Resources/ext/tests/003.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
--TEST--
22
Test ErrorHandler in case of fatal error
33
--SKIPIF--
4-
<?php if (!extension_loaded('symfony_debug')) print 'skip'; ?>
4+
<?php if (!extension_loaded('symfony_debug')) {
5+
echo 'skip';
6+
} ?>
57
--FILE--
68
<?php
79

src/Symfony/Component/Debug/Tests/phpt/exception_rethrown.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ ErrorHandler::register()->setDefaultLogger(new TestLogger());
2626
ini_set('display_errors', 1);
2727

2828
throw new \Exception('foo');
29-
3029
?>
3130
--EXPECTF--
3231
Uncaught Exception: foo

0 commit comments

Comments
 (0)