Skip to content

Commit

Permalink
Disable token caching (in PHP_TokenStream, used by PHP_CodeCoverage) …
Browse files Browse the repository at this point in the history
…by default (to reduce memory footprint).
  • Loading branch information
sebastianbergmann committed Oct 2, 2012
1 parent 81ab540 commit 50a5460
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions ChangeLog.md
Expand Up @@ -7,6 +7,7 @@ PHPUnit 3.7.2
-------------

* Implemented #656: Always clean up mock objects (and free up memory).
* Disable token caching (in PHP_TokenStream, used by PHP_CodeCoverage) by default (to reduce memory footprint).

PHPUnit 3.7.1
-------------
Expand Down
2 changes: 1 addition & 1 deletion PHPUnit/TextUI/TestRunner.php
Expand Up @@ -754,7 +754,7 @@ protected function handleConfiguration(array &$arguments)
$arguments['processUncoveredFilesFromWhitelist'] = isset($arguments['processUncoveredFilesFromWhitelist']) ? $arguments['processUncoveredFilesFromWhitelist'] : FALSE;
$arguments['backupGlobals'] = isset($arguments['backupGlobals']) ? $arguments['backupGlobals'] : NULL;
$arguments['backupStaticAttributes'] = isset($arguments['backupStaticAttributes']) ? $arguments['backupStaticAttributes'] : NULL;
$arguments['cacheTokens'] = isset($arguments['cacheTokens']) ? $arguments['cacheTokens'] : TRUE;
$arguments['cacheTokens'] = isset($arguments['cacheTokens']) ? $arguments['cacheTokens'] : FALSE;
$arguments['colors'] = isset($arguments['colors']) ? $arguments['colors'] : FALSE;
$arguments['convertErrorsToExceptions'] = isset($arguments['convertErrorsToExceptions']) ? $arguments['convertErrorsToExceptions'] : TRUE;
$arguments['convertNoticesToExceptions'] = isset($arguments['convertNoticesToExceptions']) ? $arguments['convertNoticesToExceptions'] : TRUE;
Expand Down
4 changes: 2 additions & 2 deletions PHPUnit/Util/Configuration.php
Expand Up @@ -53,7 +53,7 @@
* <phpunit backupGlobals="true"
* backupStaticAttributes="false"
* bootstrap="/path/to/bootstrap.php"
* cacheTokens="true"
* cacheTokens="false"
* colors="false"
* convertErrorsToExceptions="true"
* convertNoticesToExceptions="true"
Expand Down Expand Up @@ -551,7 +551,7 @@ public function getPHPUnitConfiguration()

if ($root->hasAttribute('cacheTokens')) {
$result['cacheTokens'] = $this->getBoolean(
(string)$root->getAttribute('cacheTokens'), TRUE
(string)$root->getAttribute('cacheTokens'), FALSE
);
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/Util/ConfigurationTest.php
Expand Up @@ -295,7 +295,7 @@ public function testPHPUnitConfigurationIsReadCorrectly()
'backupGlobals' => TRUE,
'backupStaticAttributes' => FALSE,
'bootstrap' => '/path/to/bootstrap.php',
'cacheTokens' => TRUE,
'cacheTokens' => FALSE,
'colors' => FALSE,
'convertErrorsToExceptions' => TRUE,
'convertNoticesToExceptions' => TRUE,
Expand Down
2 changes: 1 addition & 1 deletion Tests/_files/configuration.xml
Expand Up @@ -3,7 +3,7 @@
<phpunit backupGlobals="true"
backupStaticAttributes="false"
bootstrap="/path/to/bootstrap.php"
cacheTokens="true"
cacheTokens="false"
colors="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
Expand Down

1 comment on commit 50a5460

@edorian
Copy link
Contributor

@edorian edorian commented on 50a5460 Oct 2, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :)

Please sign in to comment.