Skip to content

Commit

Permalink
[travis-ci] Zend Garbage Collection only for PHP5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
pborreli authored and fabpot committed Nov 19, 2012
1 parent 4860e75 commit d3d8ff4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@ before_script:
- COMPOSER_ROOT_VERSION=dev-master composer --prefer-source --dev install
- php src/Symfony/Component/Locale/Resources/data/build-data.php
- export USE_INTL_ICU_DATA_VERSION=1

script: phpunit -dzend.enable_gc=0
6 changes: 6 additions & 0 deletions autoload.php.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?php

if (version_compare(PHP_VERSION, '5.4', '>=') && gc_enabled()) {
// Disabling Zend Garbage Collection to prevent segfaults with PHP5.4+
// https://bugs.php.net/bug.php?id=53976
gc_disable();
}

$loader = require_once __DIR__.'/vendor/autoload.php';

use Doctrine\Common\Annotations\AnnotationRegistry;
Expand Down
1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<php>
<ini name="intl.default_locale" value="en"/>
<ini name="intl.error_level" value="0"/>
<ini name="memory_limit" value="-1"/>
</php>

<testsuites>
Expand Down

0 comments on commit d3d8ff4

Please sign in to comment.