\PHPUnit_Util_GlobalState
- Author: Sebastian Bergmann <sebastian@phpunit.de>
- Copyright: 2001-2014 Sebastian Bergmann <sebastian@phpunit.de>
- License: http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
Synopsis
- // members
- protected array $globals;
- protected array $staticAttributes;
- protected array $superGlobalArrays;
- protected array $superGlobalArraysLong;
- // methods
- public static void backupGlobals()
- public static void restoreGlobals()
- protected static void backupSuperGlobalArray()
- protected static void restoreSuperGlobalArray()
- public static void getIncludedFilesAsString()
- public static void getIniSettingsAsString()
- public static void getConstantsAsString()
- public static void getGlobalsAsString()
- protected static void getSuperGlobalArrays()
- public static void backupStaticAttributes()
- public static void restoreStaticAttributes()
- protected static void exportVariable()
- protected static void arrayOnlyContainsScalars()
Violations
PHPMessDetector
Line | Rule | Message |
---|---|---|
296 - 346 | CyclomaticComplexity | The method backupStaticAttributes() has a Cyclomatic Complexity of 20. The configured cyclomatic complexity threshold is 10. |
Checkstyle
Line | Column | Severity | Message |
---|---|---|---|
119 | 43 | error | Only one argument is allowed per line in a multi-line function call |
167 | 50 | error | Only one argument is allowed per line in a multi-line function call |
289 | 43 | error | Only one argument is allowed per line in a multi-line function call |
Members
protected
- $globals — array
- $staticAttributes — array
- $superGlobalArrays — array
- $superGlobalArraysLong — array
Methods
protected
- arrayOnlyContainsScalars()
- backupSuperGlobalArray()
- exportVariable()
- getSuperGlobalArrays()
- restoreSuperGlobalArray()
public
History
-
2014-08-12T06:43:31+02:00 (commit #50dfaba)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
phpcbf --standard=PSR2 src tests
-
2014-07-21T04:21:02+02:00 (commit #35addd9)
Author: shabbyrobe (code@shabbyrobe.org) / Commiter: shabbyrobe (code@shabbyrobe.org)
Fixed multiple backslash global with @runTestsInSeparateProcesses and @preserveGlobalState
-
2014-06-24T08:29:25+02:00 (commit #89d7430)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Sync with https://github.com/sebastianbergmann/phpunit-mock-objects/commit/84b27568405dca29de30bc2cdf457e25f5bede7e
-
2014-04-24T09:35:22+02:00 (commit #4a216c7)
Author: majkel89 (maf.michal@gmail.com) / Commiter: Sebastian Bergmann (maf.michal@gmail.com)
fixed compatibility issue with PHP 5.3.3 is_a in PHP 5.3.3 does not support third parameter (allow_string) thus $object parameter cannot be string.
-
2014-04-24T09:35:15+02:00 (commit #45a5574)
Author: majkel89 (maf.michal@gmail.com) / Commiter: Sebastian Bergmann (maf.michal@gmail.com)
Fix: serialization of test suits static properties When --backupStaticAttributes switch is set static properties of classes derived from PHPUnit_Framework_Test are also backed up due to wrong use of instanceof. <string> instanceof <object>|<class>|<string> is always false. One should use is_a(<stringClassName>, <stringClassName>, true). This bug affect all versions of PHPUnit that uses PHPUnit_Util_GlobalState class.
-
2014-01-22T19:43:07+01:00 (commit #02b42d7)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Initial work on formatting code according to PSR-2
-
2014-01-20T17:21:13+01:00 (commit #3a5808f)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Cleanup
-
2014-01-19T21:43:38+01:00 (commit #f61717d)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Leftover
-
2014-01-09T08:11:47+01:00 (commit #205e008)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump copyright year
-
2013-12-27T11:42:06+01:00 (commit #3f486c8)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Refactor handling of blacklisted files
-
2013-10-13T08:50:47+02:00 (commit #18c69c0)
Author: Jeff Welch (whatthejeff@gmail.com) / Commiter: Jeff Welch (whatthejeff@gmail.com)
Fixes #1004 * Copy template files when making the PHPUnit Phar. * Account for the fact that `File_Iterator_Facade::getFilesAsArray()` does not support the `phar://` stream wrapper.
-
2013-07-29T15:44:36+02:00 (commit #76e6572)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Fix issue reported as part of #958
-
2013-06-27T11:02:01+02:00 (commit #37d6cda)
Author: Jeff Welch (whatthejeff@gmail.com) / Commiter: Jeff Welch (whatthejeff@gmail.com)
Suppress warnings when setting INI values. See: zendtech/ZendOptimizerPlus@7fca6b9.
-
2013-02-16T12:26:43+01:00 (commit #b8b3e1f)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Replace PHPUnit_Util_Type with SebastianBergmann\Exporter
-
2013-02-16T11:29:21+01:00 (commit #9d83233)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Replace PHPUnit_Util_Diff with SebastianBergmann\Diff
-
2013-02-06T10:30:25+01:00 (commit #8477bb2)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Ignore SebastianBergmann\Version
-
2013-01-25T09:14:14+01:00 (commit #21f620f)
Author: Jeff Welch (whatthejeff@gmail.com) / Commiter: Jeff Welch (whatthejeff@gmail.com)
Fixes #789 * Maintain INI values during process isolation.
-
2013-01-07T11:37:52+01:00 (commit #c517984)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump copyright year
-
2012-11-22T12:25:31+01:00 (commit #c7a0c51)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Make detection of whether PHPUnit is run from a PHAR more robust.
-
2012-10-07T01:06:35+02:00 (commit #4c5545c)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Use realpath() on SCRIPT_NAME as Composer invokes PHPUnit through a symlinked script.
-
2012-10-06T11:29:43+02:00 (commit #aa7bc36)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Use $_SERVER['SCRIPT_NAME'] instead of $_SERVER['_'] for filtering the phpunit script.
-
2012-10-05T20:26:13+02:00 (commit #18bcc7c)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Make getIncludedFilesAsString() work when running PHPUnit from a PHAR.
-
2012-10-04T09:03:10+02:00 (commit #c2ad154)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Add the source files for DbUnit, PHPUnit_MockObject, PHPUnit_Selenium, and PHPUnit_Story also to the blacklist when they are not inside the PHPUnit directory.
-
2012-10-03T08:59:26+02:00 (commit #8941060)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Do not rely on autoloader class map to populate blacklist. Closes #664.
-
2012-09-24T06:47:44+02:00 (commit #81ab540)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Do not perform string replacement for @package_version@ anymore.
-
2012-04-30T12:02:38+02:00 (commit #5786e50)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
List The BSD 3-Clause License correctly and consistently. Thanks to Christian Aistleitner <christian@quelltextlich.at> for bringing this issue to my attention.
-
2012-02-15T17:24:56+01:00 (commit #d1fe14e)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Replace pear.symfony-project.com/YAML with pear.symfony.com/Yaml.
-
2012-01-03T08:32:53+01:00 (commit #3d472e1)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Fix whitespace.
-
2012-01-02T19:04:30+01:00 (commit #4bd1010)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Fix whitespace.
-
2012-01-01T11:21:16+01:00 (commit #aae6c38)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump copyright year.
-
2011-12-20T17:08:34+01:00 (commit #ea0f300)
Author: Volker Dusch (github@wallbash.com) / Commiter: Volker Dusch (github@wallbash.com)
Fix phpcs issues
-
2011-12-20T16:57:15+01:00 (commit #3fd1439)
Author: Volker Dusch (github@wallbash.com) / Commiter: Volker Dusch (github@wallbash.com)
Fixed backtrace filtering not working on Windows due to the pathes of the PHPUnit files not matching the pathes in the backtraces.
-
2011-12-19T13:56:47+01:00 (commit #11f84b1)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
More work on the PHAR.
-
2011-09-26T10:06:58+02:00 (commit #147387a)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Simplify.
-
2011-09-25T23:35:46+02:00 (commit #304b43e)
Author: Kendall Hopkins (softwareelves@gmail.com) / Commiter: Kendall Hopkins (softwareelves@gmail.com)
Protect from serializing a closure object. Instead of preventing the serialization of all callable values (such as names of functions or those created by create_function), it's better to only prevent the serialization of the Closure object.
-
2011-09-07T08:30:42+02:00 (commit #f8e4c76)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Do not unconditionally invoke autoload method to collect files of optional packages.
-
2011-08-24T16:32:22+02:00 (commit #01aa347)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Do not try to serialize() anonymous functions.
-
2011-04-10T16:42:13+02:00 (commit #a6b9993)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Initial work on test execution timeouts.
-
2011-01-27T08:45:14+01:00 (commit #99cd0d9)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Use PHP_Timer autoloader.
-
2011-01-25T17:51:48+01:00 (commit #2db6a7f)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Simplify.
-
2011-01-25T08:24:47+01:00 (commit #2b7f44f)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Do not use PHP_CodeCoverage blacklist for PHPUnit stacktrace filtering.
-
2011-01-07T07:50:39+01:00 (commit #bc9526d)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Also exclude classes from File_Iterator, Text_Template, and sfYaml.
-
2011-01-07T01:24:38+01:00 (commit #3e34c9f)
Author: Nils Adermann (naderman@naderman.de) / Commiter: Nils Adermann (naderman@naderman.de)
Skip CodeCoverage, TokenStream and Timer classes when backing up static attributes.
-
2010-12-31T11:45:34+01:00 (commit #bee3344)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump copyright year.
-
2010-08-14T10:26:06+02:00 (commit #841dc2c)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Escape single quotes.
-
2010-07-07T12:42:23+02:00 (commit #f0d9cdd)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Change email address.
-
2010-06-12T23:41:07+02:00 (commit #28ad146)
Author: Geoffrey Sneddon (geoffers@gmail.com) / Commiter: Geoffrey Sneddon (geoffers@gmail.com)
Fix other missing cases of is_array() in GlobalState shown up by TRAC-1062 (both of these cases given a superglobal being set to an infinite iterator will cause an infinite loop).
-
2010-06-12T20:25:54+02:00 (commit #d19a737)
Author: Mark Story (mark@mark-story.com) / Commiter: Mark Story (mark@mark-story.com)
Removing trailing whitespace from files. Refs #1063
-
2010-06-12T11:08:31+02:00 (commit #451399c)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Remove unused local variable.
-
2010-06-11T14:41:44+02:00 (commit #a8e5396)
Author: Sean Coates (sean@seancoates.com) / Commiter: Sebastian Bergmann (sean@seancoates.com)
avoid invalid assumption that the Superglobals are always arrays
-
2010-04-05T17:41:26+02:00 (commit #471d69e)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Add @subpackage annotation.
-
2010-03-17T06:17:32+01:00 (commit #b5a059a)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Fix TRAC-1013.
-
2010-02-06T16:05:58+01:00 (commit #aa23ed4)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Cleanup.
-
2010-02-06T15:51:46+01:00 (commit #f078401)
Author: Matt B (matthew@sigswitch.com) / Commiter: Matt B (matthew@sigswitch.com)
Fixed problem where superglobals whose values are removed by tests aren't restored properly.
-
2010-02-02T14:14:29+01:00 (commit #bc1aaaa)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Remove closing PHP tags.
-
2010-01-19T09:39:03+01:00 (commit #fb48a69)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Initial work on autoloading.
-
2009-12-31T09:26:09+01:00 (commit #37f75ff)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump copyright year.
-
2009-12-31T09:25:53+01:00 (commit #bddcc5f)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump copyright year.
-
2009-12-31T09:23:37+01:00 (commit #7a7d0b7)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump copyright year.
-
2009-12-25T10:32:26+01:00 (commit #60e7125)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Remove Subversion keywords.
-
2009-12-25T10:30:57+01:00 (commit #42294ad)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Remove Subversion keywords.
-
2009-12-25T10:26:35+01:00 (commit #8617133)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Remove Subversion keywords.
-
2009-11-23T09:39:24+01:00 (commit #1503412)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [5389].
-
2009-11-23T09:29:23+01:00 (commit #4c9cf4e)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Initial work on PHP_CodeCoverage migration.
-
2009-11-13T09:57:15+01:00 (commit #0948548)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [5322].
-
2009-11-13T09:55:45+01:00 (commit #37334c5)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Fix #932.
-
2009-11-13T08:18:23+01:00 (commit #17bf34d)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Fix bad merge.
-
2009-11-13T07:55:33+01:00 (commit #dbdeac9)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Fix declaration of arrayOnlyContainsScalars().
-
2009-11-13T06:26:54+01:00 (commit #5c25958)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [5316].
-
2009-11-13T06:25:51+01:00 (commit #1c2aa9d)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Fix #933.
-
2009-08-29T10:49:43+02:00 (commit #f144a51)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [5161].
-
2009-08-29T10:24:37+02:00 (commit #86e29fa)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Fix CS/WS issues.
-
2009-08-27T12:45:10+02:00 (commit #54fcd64)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [5142].
-
2009-08-27T12:44:44+02:00 (commit #fd09213)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Revert [5140].
-
2009-08-27T12:30:16+02:00 (commit #757e324)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [5140].
-
2009-08-27T12:28:42+02:00 (commit #64219f2)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Only exclude PHPUnit source files.
-
2009-08-10T09:58:18+02:00 (commit #f493003)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [4890:4891] and [5016].
-
2009-07-31T10:01:08+02:00 (commit #be0764c)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [5054].
-
2009-07-31T10:00:32+02:00 (commit #14789c2)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Add blacklist for variables that cannot be var_export()ed.
-
2009-07-31T08:06:56+02:00 (commit #4cf930c)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [5051:5052].
-
2009-07-31T07:54:29+02:00 (commit #4852807)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Make included files available in the child process.
-
2009-07-31T06:39:39+02:00 (commit #1ff554f)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [5049].
-
2009-07-31T06:37:14+02:00 (commit #cc19877)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Make constants available in the child process.
-
2009-05-20T13:01:32+02:00 (commit #deb084c)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Cleanup.
-
2009-03-02T09:18:27+01:00 (commit #1ec585f)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [4702].
-
2009-03-02T09:16:36+01:00 (commit #0cd9d6e)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Refactor global state backup/restore.