Skip to content

Commit 5fd92ab

Browse files
committed
Merge remote-tracking branch 'origin/dev' into travis
2 parents 74e84f7 + 290356e commit 5fd92ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2067
-2513
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: php
22
php:
3-
# - 5.5
4-
# - 5.4
3+
- 5.5
4+
- 5.4
55
- 5.3
66

77
before_install:
@@ -15,7 +15,6 @@ script:
1515
- ../scripts/run_tests.sh
1616

1717
after_script:
18-
- php composer.phar update satooshi/php-coveralls --dev
1918
- php bin/coveralls -v
2019

2120
notifications:

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
This repository is part of the [codebender.cc](http://www.codebender.cc) maker and artist web platform.
22

3-
[![Build Status](https://travis-ci.org/codebendercc/compiler.svg?branch=master)](https://travis-ci.org/codebendercc/compiler) [![Coverage Status](https://img.shields.io/coveralls/codebendercc/compiler.svg)](https://coveralls.io/r/codebendercc/compiler?branch=master)
3+
[![Build Status](https://travis-ci.org/codebendercc/compiler.svg?branch=master)](https://travis-ci.org/codebendercc/compiler)
4+
[![Coverage Status](https://coveralls.io/repos/codebendercc/compiler/badge.svg?branch=master)](https://coveralls.io/r/codebendercc/compiler?branch=master)
45

56
## And what's that?
67

Symfony/app/.htaccess

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
deny from all
1+
deny from all
2+

Symfony/app/AppKernel.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public function registerBundles()
2020
);
2121

2222
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
23-
$bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
2423
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
2524
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
2625
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();

Symfony/app/SymfonyRequirements.php

Lines changed: 50 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function getTestMessage()
7777
}
7878

7979
/**
80-
* Returns the help text for resolving the problem
80+
* Returns the help text for resolving the problem.
8181
*
8282
* @return string The help text
8383
*/
@@ -119,14 +119,14 @@ class PhpIniRequirement extends Requirement
119119
*
120120
* @param string $cfgName The configuration name used for ini_get()
121121
* @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false,
122-
or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
123-
* @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
124-
This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
125-
Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
126-
* @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
127-
* @param string|null $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
128-
* @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
129-
* @param Boolean $optional Whether this is only an optional recommendation not a mandatory requirement
122+
* or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
123+
* @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
124+
* This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
125+
* Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
126+
* @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
127+
* @param string|null $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
128+
* @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
129+
* @param Boolean $optional Whether this is only an optional recommendation not a mandatory requirement
130130
*/
131131
public function __construct($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null, $optional = false)
132132
{
@@ -221,13 +221,13 @@ public function addRecommendation($fulfilled, $testMessage, $helpHtml, $helpText
221221
*
222222
* @param string $cfgName The configuration name used for ini_get()
223223
* @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false,
224-
or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
225-
* @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
226-
This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
227-
Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
228-
* @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
229-
* @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
230-
* @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
224+
* or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
225+
* @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
226+
* This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
227+
* Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
228+
* @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
229+
* @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
230+
* @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
231231
*/
232232
public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null)
233233
{
@@ -239,13 +239,13 @@ public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence =
239239
*
240240
* @param string $cfgName The configuration name used for ini_get()
241241
* @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false,
242-
or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
243-
* @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
244-
This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
245-
Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
246-
* @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
247-
* @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
248-
* @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
242+
* or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
243+
* @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
244+
* This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
245+
* Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
246+
* @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
247+
* @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
248+
* @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
249249
*/
250250
public function addPhpIniRecommendation($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null)
251251
{
@@ -530,11 +530,22 @@ function_exists('simplexml_import_dom'),
530530

531531
/* optional recommendations follow */
532532

533-
$this->addRecommendation(
534-
file_get_contents(__FILE__) === file_get_contents(__DIR__.'/../vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/skeleton/app/SymfonyRequirements.php'),
535-
'Requirements file should be up-to-date',
536-
'Your requirements file is outdated. Run composer install and re-check your configuration.'
537-
);
533+
if (file_exists(__DIR__.'/../vendor/composer')) {
534+
require_once __DIR__.'/../vendor/autoload.php';
535+
536+
try {
537+
$r = new \ReflectionClass('Sensio\Bundle\DistributionBundle\SensioDistributionBundle');
538+
539+
$contents = file_get_contents(dirname($r->getFileName()).'/Resources/skeleton/app/SymfonyRequirements.php');
540+
} catch (\ReflectionException $e) {
541+
$contents = '';
542+
}
543+
$this->addRecommendation(
544+
file_get_contents(__FILE__) === $contents,
545+
'Requirements file should be up-to-date',
546+
'Your requirements file is outdated. Run composer install and re-check your configuration.'
547+
);
548+
}
538549

539550
$this->addRecommendation(
540551
version_compare($installedPhpVersion, '5.3.4', '>='),
@@ -614,15 +625,15 @@ class_exists('Locale'),
614625
'Install and enable the <strong>intl</strong> extension (used for validators).'
615626
);
616627

617-
if (class_exists('Collator')) {
628+
if (extension_loaded('intl')) {
629+
// in some WAMP server installations, new Collator() returns null
618630
$this->addRecommendation(
619631
null !== new Collator('fr_FR'),
620632
'intl extension should be correctly configured',
621633
'The intl extension does not behave properly. This problem is typical on PHP 5.3.X x64 WIN builds.'
622634
);
623-
}
624635

625-
if (class_exists('Locale')) {
636+
// check for compatible ICU versions (only done when you have the intl extension)
626637
if (defined('INTL_ICU_VERSION')) {
627638
$version = INTL_ICU_VERSION;
628639
} else {
@@ -641,6 +652,14 @@ class_exists('Locale'),
641652
'intl ICU version should be at least 4+',
642653
'Upgrade your <strong>intl</strong> extension with a newer ICU version (4+).'
643654
);
655+
656+
$this->addPhpIniRecommendation(
657+
'intl.error_level',
658+
create_function('$cfgValue', 'return (int) $cfgValue === 0;'),
659+
true,
660+
'intl.error_level should be 0 in php.ini',
661+
'Set "<strong>intl.error_level</strong>" to "<strong>0</strong>" in php.ini<a href="#phpini">*</a> to inhibit the messages when an error occurs in ICU functions.'
662+
);
644663
}
645664

646665
$accelerator =

0 commit comments

Comments
 (0)