Skip to content

Commit faaad43

Browse files
committed
Merge pull request #42 from codebendercc/php_5.5.9-ubuntu_14.04
Php 5.5.9 ubuntu 14.04 (based on #39)
2 parents 5679fec + a857683 commit faaad43

Some content is hidden

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

54 files changed

+2981
-2746
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ language: php
22
php:
33
- 5.5
44
- 5.4
5+
- 5.3
56

67
before_install:
78
- sudo apt-get update
@@ -14,7 +15,6 @@ script:
1415
- ../scripts/run_tests.sh
1516

1617
after_script:
17-
- php composer.phar update satooshi/php-coveralls --dev
1818
- php bin/coveralls -v
1919

2020
notifications:

Symfony/app/.htaccess

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
deny from all
1+
deny from all
2+

Symfony/app/AppKernel.php

-1
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/Resources/autocompletion/complete.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,4 @@ def __init__(self, fname, line, column, args):
141141
log_error(COMPL_TU_LOAD)
142142

143143
self.code_completion = \
144-
self.TU.codeComplete(self.fname, self.line, self.column)
144+
self.TU.codeComplete(self.fname, self.line, self.column, include_macros=True)

Symfony/app/SymfonyRequirements.php

+50-31
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 =

Symfony/app/config/parameters.yml.dist

-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
11
parameters:
2-
# database_driver: pdo_mysql
3-
# database_host: 127.0.0.1
4-
# database_port: ~
5-
# database_name: symfony
6-
# database_user: root
7-
# database_password: ~
8-
#
9-
# mailer_transport: smtp
10-
# mailer_host: 127.0.0.1
11-
# mailer_user: ~
12-
# mailer_password: ~
13-
142
locale: en
153
secret: CSRF-Token-Not-Really-Used
164

Symfony/app/config/routing_dev.yml

-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,3 @@ _configurator:
1212

1313
_main:
1414
resource: routing.yml
15-
16-
# AcmeDemoBundle routes (to be removed)
17-
_acme_demo:
18-
resource: "@AcmeDemoBundle/Resources/config/routing.yml"

Symfony/app/config/security.yml

+3-34
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,8 @@
11
security:
2-
encoders:
3-
Symfony\Component\Security\Core\User\User: plaintext
4-
5-
role_hierarchy:
6-
ROLE_ADMIN: ROLE_USER
7-
ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
2+
firewalls:
3+
anonymous:
4+
anonymous: ~
85

96
providers:
107
in_memory:
118
memory:
12-
users:
13-
user: { password: userpass, roles: [ 'ROLE_USER' ] }
14-
admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }
15-
16-
firewalls:
17-
dev:
18-
pattern: ^/(_(profiler|wdt)|css|images|js)/
19-
security: false
20-
21-
login:
22-
pattern: ^/demo/secured/login$
23-
security: false
24-
25-
secured_area:
26-
pattern: ^/demo/secured/
27-
form_login:
28-
check_path: _security_check
29-
login_path: _demo_login
30-
logout:
31-
path: _demo_logout
32-
target: _demo
33-
#anonymous: ~
34-
#http_basic:
35-
# realm: "Secured Demo Area"
36-
37-
access_control:
38-
- { path: ^/demo/secured/hello/admin/, roles: ROLE_ADMIN }
39-
#- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }

Symfony/composer.json

+11-8
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@
2020
"sensio/generator-bundle": "2.3.*",
2121
"incenteev/composer-parameter-handler": "~2.0"
2222
},
23-
"require-dev": {
24-
"phpunit/phpunit": "3.7.*",
25-
"satooshi/php-coveralls": "dev-master",
26-
"squizlabs/php_codesniffer": "1.*",
27-
"sebastian/phpcpd": "*",
28-
"phpmd/phpmd": "2.0.*"
29-
},
30-
"scripts": {
23+
"require-dev": {
24+
"phpunit/phpunit": "4.8.*",
25+
"satooshi/php-coveralls": "dev-master",
26+
"squizlabs/php_codesniffer": "1.*",
27+
"sebastian/phpcpd": "*",
28+
"phpmd/phpmd" : "2.0.*",
29+
"phpunit/php-code-coverage": "~2.1",
30+
"phpunit/php-token-stream": "~1.3",
31+
"phpunit/phpunit-mock-objects": "~2.3"
32+
},
33+
"scripts": {
3134
"post-install-cmd": [
3235
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
3336
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",

0 commit comments

Comments
 (0)