Skip to content

Commit 03c28e4

Browse files
committed
Merge branch '2.3' into 2.7
* 2.3: [ci] Get ICU/intl from github instead of nebm.ist.utl.pt/~glopes [Debug] Fix handling of php7 throwables [Process] remove dead code [ClassLoader] Fix storing not-found classes in APC cache [Form] cs fixes in date types
2 parents 45755e0 + 3c3e543 commit 03c28e4

File tree

10 files changed

+21
-33
lines changed

10 files changed

+21
-33
lines changed

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ install:
2121
- IF %PHP%==1 appveyor DownloadFile https://curl.haxx.se/ca/cacert.pem
2222
- IF %PHP%==1 appveyor DownloadFile http://windows.php.net/downloads/releases/archives/php-5.3.11-nts-Win32-VC9-x86.zip
2323
- IF %PHP%==1 7z x php-5.3.11-nts-Win32-VC9-x86.zip -y >nul
24-
- IF %PHP%==1 appveyor DownloadFile http://nebm.ist.utl.pt/~glopes/misc/intl_win/ICU-51.2-dlls.zip
24+
- IF %PHP%==1 appveyor DownloadFile https://raw.githubusercontent.com/symfony/binary-utils/master/ICU-51.2-dlls.zip
2525
- IF %PHP%==1 7z x ICU-51.2-dlls.zip -y >nul
2626
- IF %PHP%==1 del /Q *.zip
2727
- IF %PHP%==1 cd ext
28-
- IF %PHP%==1 appveyor DownloadFile http://nebm.ist.utl.pt/~glopes/misc/intl_win/php_intl-3.0.0-5.3-nts-vc9-x86.zip
28+
- IF %PHP%==1 appveyor DownloadFile https://raw.githubusercontent.com/symfony/binary-utils/master/php_intl-3.0.0-5.3-nts-vc9-x86.zip
2929
- IF %PHP%==1 7z x php_intl-3.0.0-5.3-nts-vc9-x86.zip -y >nul
3030
- IF %PHP%==1 appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/apcu/4.0.10/php_apcu-4.0.10-5.3-nts-vc9-x86.zip
3131
- IF %PHP%==1 7z x php_apcu-4.0.10-5.3-nts-vc9-x86.zip -y >nul

src/Symfony/Component/ClassLoader/ApcClassLoader.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,10 @@ public function loadClass($class)
122122
*/
123123
public function findFile($class)
124124
{
125-
if (false === $file = apcu_fetch($this->prefix.$class)) {
126-
apcu_store($this->prefix.$class, $file = $this->decorated->findFile($class));
125+
$file = apcu_fetch($this->prefix.$class, $success);
126+
127+
if (!$success) {
128+
apcu_store($this->prefix.$class, $file = $this->decorated->findFile($class) ?: null);
127129
}
128130

129131
return $file;

src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,10 @@ public function __construct($prefix)
9292
*/
9393
public function findFile($class)
9494
{
95-
if (false === $file = apcu_fetch($this->prefix.$class)) {
96-
apcu_store($this->prefix.$class, $file = parent::findFile($class));
95+
$file = apcu_fetch($this->prefix.$class, $success);
96+
97+
if (!$success) {
98+
apcu_store($this->prefix.$class, $file = parent::findFile($class) ?: null);
9799
}
98100

99101
return $file;

src/Symfony/Component/ClassLoader/DebugClassLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function unregister()
8989
*/
9090
public function findFile($class)
9191
{
92-
return $this->classFinder->findFile($class);
92+
return $this->classFinder->findFile($class) ?: null;
9393
}
9494

9595
/**

src/Symfony/Component/ClassLoader/WinCacheClassLoader.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,10 @@ public function loadClass($class)
123123
*/
124124
public function findFile($class)
125125
{
126-
if (false === $file = wincache_ucache_get($this->prefix.$class)) {
127-
wincache_ucache_set($this->prefix.$class, $file = $this->decorated->findFile($class), 0);
126+
$file = wincache_ucache_get($this->prefix.$class, $success);
127+
128+
if (!$success) {
129+
wincache_ucache_set($this->prefix.$class, $file = $this->decorated->findFile($class) ?: null, 0);
128130
}
129131

130132
return $file;

src/Symfony/Component/ClassLoader/XcacheClassLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function findFile($class)
126126
if (xcache_isset($this->prefix.$class)) {
127127
$file = xcache_get($this->prefix.$class);
128128
} else {
129-
$file = $this->decorated->findFile($class);
129+
$file = $this->decorated->findFile($class) ?: null;
130130
xcache_set($this->prefix.$class, $file);
131131
}
132132

src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public function buildView(FormView $view, FormInterface $form, array $options)
203203
public function configureOptions(OptionsResolver $resolver)
204204
{
205205
$compound = function (Options $options) {
206-
return $options['widget'] !== 'single_text';
206+
return 'single_text' !== $options['widget'];
207207
};
208208

209209
// Defaults to the value of "widget"

src/Symfony/Component/Form/Extension/Core/Type/DateType.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
7878
$pattern
7979
);
8080

81-
// new \intlDateFormatter may return null instead of false in case of failure, see https://bugs.php.net/bug.php?id=66323
81+
// new \IntlDateFormatter may return null instead of false in case of failure, see https://bugs.php.net/bug.php?id=66323
8282
if (!$formatter) {
8383
throw new InvalidOptionsException(intl_get_error_message(), intl_get_error_code());
8484
}
@@ -175,7 +175,7 @@ public function finishView(FormView $view, FormInterface $form, array $options)
175175
public function configureOptions(OptionsResolver $resolver)
176176
{
177177
$compound = function (Options $options) {
178-
return $options['widget'] !== 'single_text';
178+
return 'single_text' !== $options['widget'];
179179
};
180180

181181
$placeholder = $placeholderDefault = function (Options $options) {
@@ -206,7 +206,7 @@ public function configureOptions(OptionsResolver $resolver)
206206
};
207207

208208
$format = function (Options $options) {
209-
return $options['widget'] === 'single_text' ? DateType::HTML5_FORMAT : DateType::DEFAULT_FORMAT;
209+
return 'single_text' === $options['widget'] ? DateType::HTML5_FORMAT : DateType::DEFAULT_FORMAT;
210210
};
211211

212212
$resolver->setDefaults(array(

src/Symfony/Component/Form/Extension/Core/Type/TimeType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public function buildView(FormView $view, FormInterface $form, array $options)
163163
public function configureOptions(OptionsResolver $resolver)
164164
{
165165
$compound = function (Options $options) {
166-
return $options['widget'] !== 'single_text';
166+
return 'single_text' !== $options['widget'];
167167
};
168168

169169
$placeholder = $placeholderDefault = function (Options $options) {

src/Symfony/Component/Process/Tests/ProcessTest.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,24 +1184,6 @@ public function provideVariousIncrementals() {
11841184
);
11851185
}
11861186

1187-
/**
1188-
* provides default method names for simple getter/setter.
1189-
*/
1190-
public function methodProvider()
1191-
{
1192-
$defaults = array(
1193-
array('CommandLine'),
1194-
array('Timeout'),
1195-
array('WorkingDirectory'),
1196-
array('Env'),
1197-
array('Stdin'),
1198-
array('Input'),
1199-
array('Options'),
1200-
);
1201-
1202-
return $defaults;
1203-
}
1204-
12051187
/**
12061188
* @param string $commandline
12071189
* @param null|string $cwd

0 commit comments

Comments
 (0)