Skip to content

PHP 5.5.9, Ubuntu 14.04, Symfony 2.3.33, PHPUnit 4.8.13, install scripts #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Nov 20, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8edcaa2
Initial changes for Ubuntu 14.04 and Apache 2.2.4
fpapadopou Oct 14, 2015
265f2ac
Put back cache/logs dirs creation
fpapadopou Oct 14, 2015
cd69b93
Updated parameters.yml generation commands
fpapadopou Oct 14, 2015
6a33b44
Remove existing compiler/libmgr parameters and append the right ones …
fpapadopou Oct 14, 2015
1330782
Apache 2.4.7 (default on Unbuntu 14.04) requires VirtualHost files to…
fpapadopou Oct 14, 2015
ae3d8ff
Updated vendors' versions
fpapadopou Oct 14, 2015
3443923
Updated PHPUnit to version 4.8.13
fpapadopou Oct 15, 2015
8328c3d
Updated user id & project id fetching
fpapadopou Oct 15, 2015
0cc74ac
Updated all test (PHPUnit 4.8 compatibility)
fpapadopou Oct 15, 2015
4d71b85
PHP 5.5 arrays, added TODO, updated outdated comment
fpapadopou Oct 15, 2015
ed61291
PHP 5.5 arrays in handler code
fpapadopou Oct 15, 2015
7c48ada
Add PHP XDebug ( needed for coverage generation)
fpapadopou Oct 15, 2015
1062d77
Removed unused symlink
fpapadopou Oct 22, 2015
fdf6d21
Removed OS X related if-else's
fpapadopou Oct 23, 2015
ab4e2b2
Updated the method that adds user- and project- ids to the request an…
fpapadopou Oct 23, 2015
02246b3
Renamed apache configuration file
fpapadopou Oct 23, 2015
34e641a
Added separate installation/configuration scripts for Travis (still P…
fpapadopou Oct 23, 2015
ee0a828
Merge branch 'php_5.5.9-ubuntu_trusty' of https://github.com/codebend…
fpapadopou Oct 23, 2015
856e78b
Updated scripts' execution permissions
fpapadopou Oct 23, 2015
c8327e9
Updated a unit test (coverage increase)
fpapadopou Oct 23, 2015
9d44773
Removed diff markers
fpapadopou Oct 24, 2015
32df3e1
Merge remote-tracking branch 'origin/master' into php_5.5.9-ubuntu_tr…
fpapadopou Nov 20, 2015
a63561e
Merge branch 'php_5.5.9-ubuntu_trusty' of https://github.com/codebend…
fpapadopou Nov 20, 2015
6f0b3a6
Updated library manager parameter in travis install script
fpapadopou Nov 20, 2015
82e703e
Updated compiler secure parameter for Travis CI
fpapadopou Nov 20, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 7 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
language: php
php:
# - 5.5
# - 5.4
- 5.3

#before_install:
# - sudo apt-get update
- 5.5.9

env:
global:
# eratosthenes library management system url (encrypted)
- secure: "ZYn4o229W7hq1uzj/Tii9h/a3iJlr9Li4TBaTNFXm6JY2H49lA57L1DIFUaTleTUx2Ibs2+kUrV3NFQ9Mo/ThO67gV5Q1XEMjxgFzAKt4AuWJ5TNbHxs3GBTjYc+129QCKSd0WdzrRDqEC2nZ9GjI+j7lS39DrjAMGg4wEp9b0U="
# codebender compiler url (encrypted)
- secure: "XRsqGDqdu5uhdj2lF4SZ6qv6Y0PdcRPcvE13XvVGnIYRZaITelP3eJNSvLPO+Q5k4mBmKCz8t+ws/OVRRwSAXYaKe0Z8ZXgEcNyo1nEwGekC35mTuG1FFfB/pbuBp5/OWjw6bgz2tEHhKuFIbHytpT9zJQYy+D07rzOYeUsZjOY="
- secure: "hzL7akuLe+HCsi6G7Z1UliNR8ekzGlWv1cS/iweeXnxjISYU5ALrvpeOHNcfiC/xTZJsJXq+KYwZpVa/Ps7AVwfLgnUkQGD8OA7AmXbqgIv/xao24u4NNd+xAEB9LSr/eWexQhRJniE+JHgZ53yrAefJBIwmeD0YhvU1IdrzMdE="

before_script:
- sudo chmod +x scripts/install.sh
- scripts/install.sh
- sudo chmod +x scripts/travis_install.sh
- scripts/travis_install.sh
- cd /opt/codebender/builder/Symfony
- sudo chmod -R 777 app/cache app/logs
- echo 'error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- echo 'error_reporting = E_ALL' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- cd /opt/codebender/builder
- sudo chmod +x scripts/apache_install.sh
- scripts/apache_install.sh
- sudo chmod +x scripts/travis_apache_install.sh
- scripts/travis_apache_install.sh
- cd /opt/codebender/builder/Symfony

script:
Expand All @@ -37,6 +32,3 @@ after_script:

notifications:
irc: "chat.freenode.net#codebender.cc"
# email:
# recipients:
# - [email protected]
85 changes: 52 additions & 33 deletions Symfony/app/SymfonyRequirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function getTestMessage()
}

/**
* Returns the help text for resolving the problem
* Returns the help text for resolving the problem.
*
* @return string The help text
*/
Expand Down Expand Up @@ -119,14 +119,14 @@ class PhpIniRequirement extends Requirement
*
* @param string $cfgName The configuration name used for ini_get()
* @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false,
or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
* @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
* @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
* @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)
* @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
* @param Boolean $optional Whether this is only an optional recommendation not a mandatory requirement
* or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
* @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
* This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
* Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
* @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
* @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)
* @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
* @param Boolean $optional Whether this is only an optional recommendation not a mandatory requirement
*/
public function __construct($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null, $optional = false)
{
Expand Down Expand Up @@ -221,13 +221,13 @@ public function addRecommendation($fulfilled, $testMessage, $helpHtml, $helpText
*
* @param string $cfgName The configuration name used for ini_get()
* @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false,
or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
* @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
* @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
* @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)
* @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
* or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
* @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
* This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
* Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
* @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
* @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)
* @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
*/
public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null)
{
Expand All @@ -239,13 +239,13 @@ public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence =
*
* @param string $cfgName The configuration name used for ini_get()
* @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false,
or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
* @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
* @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
* @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)
* @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
* or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
* @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
* This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
* Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
* @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
* @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)
* @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
*/
public function addPhpIniRecommendation($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null)
{
Expand Down Expand Up @@ -530,11 +530,22 @@ function_exists('simplexml_import_dom'),

/* optional recommendations follow */

$this->addRecommendation(
file_get_contents(__FILE__) === file_get_contents(__DIR__.'/../vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/skeleton/app/SymfonyRequirements.php'),
'Requirements file should be up-to-date',
'Your requirements file is outdated. Run composer install and re-check your configuration.'
);
if (file_exists(__DIR__.'/../vendor/composer')) {
require_once __DIR__.'/../vendor/autoload.php';

try {
$r = new \ReflectionClass('Sensio\Bundle\DistributionBundle\SensioDistributionBundle');

$contents = file_get_contents(dirname($r->getFileName()).'/Resources/skeleton/app/SymfonyRequirements.php');
} catch (\ReflectionException $e) {
$contents = '';
}
$this->addRecommendation(
file_get_contents(__FILE__) === $contents,
'Requirements file should be up-to-date',
'Your requirements file is outdated. Run composer install and re-check your configuration.'
);
}

$this->addRecommendation(
version_compare($installedPhpVersion, '5.3.4', '>='),
Expand Down Expand Up @@ -578,8 +589,8 @@ function_exists('simplexml_import_dom'),

$this->addRecommendation(
class_exists('DomDocument'),
'PHP-XML module should be installed',
'Install and enable the <strong>PHP-XML</strong> module.'
'PHP-DOM and PHP-XML modules should be installed',
'Install and enable the <strong>PHP-DOM</strong> and the <strong>PHP-XML</strong> modules.'
);

$this->addRecommendation(
Expand Down Expand Up @@ -614,15 +625,15 @@ class_exists('Locale'),
'Install and enable the <strong>intl</strong> extension (used for validators).'
);

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

if (class_exists('Locale')) {
// check for compatible ICU versions (only done when you have the intl extension)
if (defined('INTL_ICU_VERSION')) {
$version = INTL_ICU_VERSION;
} else {
Expand All @@ -641,6 +652,14 @@ class_exists('Locale'),
'intl ICU version should be at least 4+',
'Upgrade your <strong>intl</strong> extension with a newer ICU version (4+).'
);

$this->addPhpIniRecommendation(
'intl.error_level',
create_function('$cfgValue', 'return (int) $cfgValue === 0;'),
true,
'intl.error_level should be 0 in php.ini',
'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.'
);
}

$accelerator =
Expand Down
7 changes: 5 additions & 2 deletions Symfony/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@
"incenteev/composer-parameter-handler": "~2.0"
},
"require-dev": {
"phpunit/phpunit": "3.7.*",
"phpunit/phpunit": "4.8.*",
"satooshi/php-coveralls": "dev-master",
"sebastian/phpcpd": "*",
"phpmd/phpmd" : "2.0.*"
"phpmd/phpmd" : "2.0.*",
"phpunit/php-token-stream": "~1.3",
"phpunit/php-code-coverage": "~2.1",
"phpunit/phpunit-mock-objects": "~2.3"
},
"scripts": {
"post-install-cmd": [
Expand Down
Loading