Home » Configuration » Config
Your configuration's swiss-army knife.
This package is unmaintained.
Download latest release 1.10.12 (archived versions might be outdated)
License: PHP License
Description
The Config package provides methods for configuration manipulation.
* Creates configurations from scratch
* Parses and outputs different formats (XML, PHP, INI, Apache...)
* Edits existing configurations
* Converts configurations to other formats
* Allows manipulation of sections, comments, directives...
* Parses configurations into a tree structure
* Provides XPath like access to directives
Documentation
Maintainers
- Bertrand Mansion (mansion) — lead, inactive
- Ryan King (ryansking) — lead, inactive
- Adam Ashley (aashley) — lead, active
- Adam Harvey (aharvey) — lead, active
Dependencies
Required
- PHP (>= 4.3.0)
- PEAR Installer (>= 1.4.0b1)
Optional
Releases
- 1.10.12 (stable, 2010-12-24)
Release notes
License: PHP License
I believe we'll call this the "all hail Christian Weiske" release, since he's
been a very busy bee.Bugs fixed:
* Fixed Bug #11435: Fix IniCommented parsing of ~ ! | & ( ). (aashley)
* Fixed Bug #11807: Config can create invalid php for unknown values.
(cweiske)
* Fixed Bug #11827: notice when using arrays (directive[]=value) in inifiles.
(cweiske)
* Fixed Bug #12291: PEAR GenericConf newline shouldn't need a space. (cweiske)
* Fixed Bug #12387: GenericConf doesn't allow for hyphens on left-hand-side of
a directive. (cweiske)
* Fixed Bug #12388: GenericConf doesn't allow whitepace to left of directive
delimiter. (cweiske)
* Fixed Bug #13116: Syntax Strict notice for references on constructors.
(fjfnaranjo)
* Fixed Bug #15964: errors in test suite. (cweiske)
* Fixed Bug #16590: parseConfig phparray ignores named arrays that use numbers
as name. (cweiske)
* Fixed Bug #18124: Saving arrays back to ini file fails. (cweiske)Feature requests implemented:
* Request #13791: Options for the PHPConstants container. (cweiske)
* Request #16656: New 'linebreak' option for IniCommented container. (cweiske)
* Request #16724: PHPConstants container should have option lowercase.
(cweiske) - 1.10.11 (stable, 2007-06-12)
Release notes
License: PHP License
* Fixed Bug #11184: Knock on problems from fix for Bug #10185. Thanks to
Thomas Despoix and Carsten Wiedmann for helping me understand it properly. - 1.10.10 (stable, 2007-03-26)
Release notes
License: PHP License
* Fix Bug #10010: numeric index lost when parsing subarrays
* Fix Bug #10185: problem with addslashs in container "PHPArray" / method "toString" - 1.10.9 (stable, 2006-12-21)
Release notes
License: PHP License
* Fixed Bug #9632: PHPConstants container not registered. Thanks to
Clemens Lang <neverpanic at gmail dot com> - 1.10.8 (stable, 2006-11-09)
Release notes
License: PHP License
* Fixed Bug #7097: writeConfig incorrect when root has attributes
- 1.10.8RC1 (beta, 2006-10-19)
Release notes
License: PHP License
* Fixed Bug #7097: writeConfig incorrect when root has attributes
This fix has the potential to break other things as it is a big change to the
PHPArray backend. Please test. - 1.10.7 (stable, 2006-08-10)
Release notes
License: PHP License
Changelog:
* Fixed Bug #7544: Empty attributes in IniCommented are being discarded (Luis Correa d'Almeida)
* Fixed Bug #7652: wrong xml to phparray convert. Caused by counting position
of directives and sections seperately. While when converting to some containers
we want to count them together.
* Add tests to confirm behaviour of Bug #8357. Do not believe it is fixable without removing
features. - 1.10.6 (stable, 2006-02-13)
Release notes
License: PHP License
Changelog:
* More PHP 4.4 and 5.1 return by reference fixes
* Fixed bug #4477 fatal error when key of array is longer than 114 chars under PHP4.x
* Fixed bug #6385 Allow colon in directive name in IniCommented to match IniFile.
* Fixed bug #6441 true and false literals should be parsed appropriately. Booleans are now parsed the same as in parse_ini_file() - 1.10.5 (stable, 2006-01-03)
Release notes
License: PHP License
Changelog:
* Make what we add quotes around consistent between IniFile and IniCommented.
* Fixed bug #3137 Adding a comment caused problems outputing in phparray format.
* Fixed bug #3590 Handling phparray formats with implicit numeric keys.
* Fixed bug #4623 Rendering to Apache format a second time looses section attributes.
* Fixed bug #5598 Allow '=' in values and output it correctly in IniFile format.
* Fixed bugs #5033, #5835, #6294 Return only variables by reference as required by PHP 4.4 and 5.1.
* Partial Fix for #6385 Allow colon in directive name in IniCommented to match IniFile. - 1.10.4 (stable, 2005-02-12)
Release notes
License: PHP License
Changelog:
* Fixed bug #3298 which wouldn't parse arrays with numerical indexes correctly.
*Fixed bug #2742 which didn't trim variable names in Inicommented file
*changed XML_Parser and XML_Util dependencies to optional, since they're only needed
when parsing XML files (bug #2738)
*added a new container for editing files of php constants, courtesy of philip ortel [me@phillipoertel.com] (beta) - 1.10.3 (stable, 2004-10-20)
Release notes
License: PHP License
Changelog:
*Fixed bug #2179 which prevented URL's containting ~ in ini files to be parsed correctly
*Fixed bug #2439 which caused Config_Containter::countChildren() to return a PEAR_ERROR
object when called on a non-section Config_Container object. This change brings
the object's behavior inline with the documentation. Beware, if your code relies
on the previous behavior, this change may break your code. - 1.10.2 (stable, 2004-06-15)
Release notes
License: PHP License
* Fixed bug #1633 related to case-sensitivity of method names in PHP4.
causing PHPArray container not to work correctly. See also #1556.
Patch provided by m at tacker dotorg. - 1.10.1 (stable, 2004-06-04)
Release notes
License: PHP License
* Fixed problems with PHP5 case sensitivity on class and method names.
* Added possibility to actually replace the root container by using method
Config::setRoot() with a container of type 'section' and name 'root'.
* XML parser now makes use of the encoding specified in the options array.
* Fixed a warning with array_splice() on an unset $children. - 1.10 (stable, 2003-11-29)
Release notes
License: PHP License
* Added 'isFile' option to XML container
* Fix a bug when a directive has no content in XML configurations
* Fix slowdown caused by uniqid() on Linux
* Fix regular expression for directives in .ini files (Emil Biserov)
* Fix bug #132 concerning % in .ini files (Wagner netsols.de)
* Fix possible warning if text is empty in .ini commented (Dean Urmson)
* Small speed optimizations - 1.9 (stable, 2003-09-21)
Release notes
License: PHP License
* Added a new boolean option/parameter in XML, PHPArray and toArray() to set
whether attributes should be rendered.
* Added comments rendering in XML.
* Fix typo in PHPArray when setting the configuration array name (Laurent Laville) - 1.8.1 (stable, 2003-09-07)
Release notes
License: PHP License
* Fix a bug in XML container related to cdata handler read by chunk, reported by Stephan Wentz
- 1.8 (stable, 2003-08-16)
Release notes
License: PHP License
* Fix a bug in setRoot() for the XML generator
* Added new method searchPath() to Config_Container (taken from Alan Knowles for XML_Tree)
* Added float detection in Config_Container_PHPArray (Sylvinus Prodi)
* Uses XML_Util in xml container for special entities translation, customizable linebreaks, indents, xml declaration - 1.7 (stable, 2003-06-16)
Release notes
License: PHP License
* Added new method registerConfigType() (Greg Beaver)
* Root containers are not named 'root' anymore (Bertrand Mansion)
* IniCommented handles comma, quotes, slashes (Greg Beaver)
* IniFile and IniCommented take care of slashes (Greg Beaver)
* Method _parseArray() in PHPArray refactored and much faster (Bertrand Mansion)
* Fix bugs with certain type of arrays with PHPArray (Bertrand Mansion)
* PHPArray now returns values between single quotes (Jean-Marc Fontaine) - 1.6 (stable, 2003-05-20)
Release notes
License: PHP License
* Fix bug #23690 in toArray reported by Rob Halff
- 1.5 (stable, 2003-04-14)
Release notes
License: PHP License
* Added an id private property for each node
* Fix a bug in toArray when items are duplicates - 1.4 (stable, 2003-04-02)
Release notes
License: PHP License
* Fix setDirective method in Container
* Fix warnings in foreach loop when attributes are not set
* Added phpdoc comments - 1.3 (stable, 2003-03-26)
Release notes
License: PHP License
* Fixed missing quote in xml generation (Nicolas Guennoc)
* Fixed warning in xml container when no attributes (Nicolas Guennoc)
* Added methods getAttribute and updateAttributes to container.
* Added possibility to get item by looking at its attributes in getItem()
* PHPArray container automatically generates array name when not specified in options
* XML Container can accept a name too that will generate the global root entity if needed - 1.2 (stable, 2003-03-24)
Release notes
License: PHP License
First stable release.
* Added an XML container (uses XML_Parser),
* Possibility to convert from one format to another,
* Fixes in toArray(),
* Added attributes to containers,
* New methods for item manipulation. - 1.1 (beta, 2002-10-08)
Release notes
License: PHP License
Fix bug in toArray().
Thanks to Mark Polsen for noticing it. - 1.0 (beta, 2002-10-06)
Release notes
License: PHP License
Complete rewrite : API has changed.
The class now uses a tree structure of container objects.
As a consequence, backward compatibility is not provided !!!
Look at the Apache.php and IniCommented.php scripts in 'docs' for usage examples.
Some containers are still missing : XML and DB. - 0.3.1 (stable, 2002-07-02)
Release notes
License: PHP License
Documentation is in README.Config.
0.3.1
- E_ALL fixes
Bugs
| ID | Status | Type | Version | Date | Summary |
|---|---|---|---|---|---|
| #132 | Closed | Bug | 2003-10-21 | Config/Container/IniFile.php stumbles over directives containing % | |
| #370 | Bogus | Bug | 2003-12-06 | Numeric arrays in XML files generate Errors | |
| #378 | Closed | Bug | 2003-12-08 | INI files should not have root [] when writing config | |
| #860 | Closed | Bug | 2004-02-26 | PEAR QA: improvement for get_class()-usage | |
| #920 | Closed | Bug | 2004-02-27 | PHP warning about array_splice | |
| #1260 | Duplicate | Bug | 2004-04-22 | [patch] INI file without sections | |
| #1323 | Closed | Bug | 2004-05-01 | XML Config file parser doesn't use 'encoding' option | |
| #1450 | Duplicate | Bug | 2004-05-20 | case sensitive in_array() | |
| #1469 | Duplicate | Bug | 2004-05-22 | case sensetive get_class() | |
| #1503 | Wont fix | Bug | 2004-05-26 | XML parsing fail on complex element | |
| #1556 | Duplicate | Bug | 2004-06-04 | PHPArray Containers writes PHP Files without PHP Tags | |
| #1633 | Closed | Bug | 2004-06-14 | Container::writeDatasrc() - check for methods case-sensitive w/ Patch | |
| #1785 | Closed | Bug | 2004-07-04 | php notice in IniCommented | |
| #1865 | Closed | Req | 2004-07-13 | How about a Config_Container::getDirective() method? | |
| #1877 | Closed | Req | 2004-07-14 | XML not well formed | |
| #2013 | Closed | Bug | 2004-07-29 | Problems loading/saving XML | |
| #2014 | Closed | Req | 2004-07-29 | use CDATA | |
| #2049 | Closed | Bug | 2004-08-04 | static $deep in Config_Container_XML::toString() causes big indents | |
| #2065 | Closed | Bug | 2004-08-05 | Problems with ' when writing PHPArray config in file | |
| #2071 | Closed | Bug | 2004-08-05 | unexpected results when reading XML config file and then writing it as PHPArra | |
| #2179 | Closed | Bug | 2004-08-20 | parse_ini_file and tildes | |
| #2439 | Closed | Bug | 2004-10-04 | Config_Container countChildren() returns Object when 0 children exist | |
| #2738 | Closed | Bug | 2004-11-11 | Deps on XML package should be optional | |
| #2742 | Closed | Bug | 2004-11-12 | missing trim on result array key | |
| #2780 | Bogus | Bug | 2004-11-17 | Cannot re-assign $this in Container.php | |
| #2951 | Bogus | Bug | 2004-12-12 | segmentation fault caused by unnecesary require | |
| #2962 | Bogus | Bug | 2004-12-13 | test | |
| #3051 | Bogus | Bug | 2004-12-29 | trying to getItem('directive') always return the last one | |
| #3137 | Closed | Bug | 2005-01-08 | saving in phparray after adding a comment | |
| #3298 | Closed | Bug | 2005-01-26 | Processing XML to array and then back to XML | |
| #3329 | Closed | Bug | 2005-01-30 | RE: Bug 2742 - not fixed in CVS | |
| #3398 | Closed | Bug | 2005-02-07 | Bug in Quote and Comma Parser for IniCommented | |
| #3446 | Closed | Req | 2005-02-12 | Use better ini parser, please | |
| #3544 | Wont fix | Req | 2005-02-21 | Proper Container system usage | |
| #3561 | Bogus | Bug | 2005-02-23 | numeric keys in arrays | |
| #3590 | Closed | Bug | 2005-02-25 | Error when using config to load a php array | |
| #3780 | Closed | Bug | 2005-03-11 | PHPArray: no addslashes at array-keys | |
| #4477 | Closed | Bug | 2005-05-30 | fatal error when key of array is longer than 114 chars | |
| #4623 | Closed | Bug | 2005-06-18 | Apache container breaks on sections with arguments | |
| #4722 | Closed | Bug | 2005-07-01 | Missing config types in Config::parseConfig() | |
| #4761 | Closed | Bug | 2005-07-06 | Config broken in 5.1b2 | |
| #5033 | Closed | Bug | 2005-08-09 | notice in GenericConf.php | |
| #5367 | Closed | Bug | 2005-09-12 | XML Rootnode Attributes aren't exported | |
| #5598 | Closed | Bug | 2005-10-04 | '=' in value breaks ini file | |
| #5835 | Closed | Bug | 2005-10-31 | Only Variables can be passed by reference | |
| #6294 | Closed | Bug | 2005-12-19 | PHP4.4 and 5.1 return value fixes | |
| #6342 | Closed | Bug | 2005-12-23 | Add the Unit tests | |
| #6385 | Closed | Req | 2006-01-01 | Allow colon in ini file key | |
| #6441 | Closed | Bug | 2006-01-07 | true and false literals should be parsed appropriately | |
| #6647 | Closed | Bug | 1.10.5 | 2006-01-31 | Notice: Only variable references should be returned by reference |
| #6740 | Bogus | Bug | 1.10.5 | 2006-02-10 | Undefined offset: 1 in /usr/share/php/Config/Container.php on line 327 |
| #7097 | Closed | Bug | 1.10.6 | 2006-03-12 | writeConfig incorrect when root has attributes |
| #7354 | Bogus | Bug | 1.10.6 | 2006-04-10 | Recently upgraded my Pear::Config, and after all my applications are crashing.. |
| #7477 | Bogus | Req | 1.10.6 | 2006-04-24 | Config.php declaration conflicts with other apps |
| #7544 | Closed | Bug | 1.10.6 | 2006-05-02 | Empty attributes in ini file are being discarded |
| #7652 | Closed | Bug | 1.10.6 | 2006-05-17 | wrong xml to phparray convert |
| #7695 | Bogus | Bug | 2006-05-22 | Bug in ParseConfig | |
| #8168 | Wont fix | Bug | 1.10.6 | 2006-07-08 | Wrong phparray result when the $new_cfg_ary has numeric keys |
| #8169 | Wont fix | Req | 1.10.6 | 2006-07-08 | Need add php code in phparray result |
| #8357 | Closed | Bug | 1.10.6 | 2006-08-04 | Unexpected result from IniFile when comma in use |
| #8572 | Closed | Doc | 1.10.7 | 2006-08-28 | parse comments and blanks with phparray |
| #9099 | Closed | Bug | CVS | 2006-10-19 | bug3137.phpt fails |
| #9632 | Closed | Bug | CVS | 2006-12-15 | PHPConstants missing |
| #10010 | Closed | Bug | 1.10.9 | 2007-02-02 | numeric index lost when parsing subarrays |
| #10126 | Bogus | Bug | 1.10.9 | 2007-02-19 | Ini file writeConfig converts values |
| #10185 | Closed | Bug | 1.10.9 | 2007-02-25 | problem with addslashs in container "PHPArray" / method "toString" |
| #11184 | Closed | Bug | 1.10.10 | 2007-05-31 | PHPArray issue with backslashes |
| #11435 | Closed | Bug | 1.10.11 | 2007-06-25 | IniFile and IniCommented do not correctly quote some characters |
| #11827 | Closed | Bug | 1.10.11 | 2007-08-13 | notice when using arrays (directive[]=value) in inifiles |
| #11846 | Closed | Doc | 1.10.11 | 2007-08-15 | Config::parseConfig() Possible PEAR_Error values table unfinished |
| #12291 | Closed | Bug | 1.10.11 | 2007-10-22 | PEAR GenericConf newline shouldn't need a space |
| #12370 | No Feedback | Bug | 1.10.11 | 2007-11-01 | Adding unwanted slashes |
| #12387 | Closed | Bug | 1.10.11 | 2007-11-05 | GenericConf doesn't allow for hyphens on left-hand-side of a directive |
| #12388 | Closed | Bug | 1.10.11 | 2007-11-06 | GenericConf doesn't allow whitepace to left of directive delimiter |
| #12495 | Closed | Doc | 2007-11-21 | User note that is a documentation problem | |
| #13004 | Bogus | Bug | 1.10.11 | 2008-01-30 | PEAR::Config - Character encoding is wrongly "guessed" |
| #13116 | Closed | Bug | 1.10.11 | 2008-02-13 | Syntax Strict notice for references on constructors |
| #13669 | Duplicate | Req | 1.10.11 | 2008-04-14 | support for reading of multiple line comments defined with /* */ |
| #13670 | Duplicate | Req | 1.10.11 | 2008-04-14 | support for writing of multiple line comments defined with /* */ |
| #13791 | Closed | Req | CVS | 2008-04-28 | Options for the PHPConstants container |
| #14999 | Duplicate | Bug | 1.10.11 | 2008-11-12 | Tar-files not available on server |
| #15001 | Closed | Bug | 1.10.11 | 2008-11-12 | Package not found |
| #15964 | Closed | Bug | 2009-03-01 | errors in test suite | |
| #16590 | Closed | Bug | 1.10.11 | 2009-09-10 | parseConfig phparray ignores named arrays that use numbers as name |
| #16656 | Closed | Req | 1.10.11 | 2009-09-29 | New 'linebreak' option for IniCommented container |
| #16724 | Closed | Req | 1.10.11 | 2009-10-22 | PHPConstants container should have option lowercase |
| #17735 | Open | Req | 1.10.11 | 2010-08-18 | allow Include statements |
| #18124 | Closed | Bug | SVN | 2010-12-19 | Saving arrays back to ini file fails |
| #18348 | Open | Bug | 1.10.12 | 2011-03-08 | GenericConf serialization does not use newline option |
| #18357 | Open | Bug | 1.10.12 | 2011-03-10 | XML container generates invalid XML |
| #18565 | Closed | Bug | 1.10.12 | 2011-05-26 | Deprecated uses |
| #19078 | Feedback | Bug | Unknown | 2011-11-26 | Pear does not run - error message |
| #19292 | Bogus | Req | 1.10.12 | 2012-02-14 | mbiama@php.net |
| #19373 | Bogus | Bug | 1.10.12 | 2012-04-04 | Installation crashes und Xampp |
| #19376 | Duplicate | Bug | 1.10.12 | 2012-04-08 | Call to undefined method Config_Container_XML::XML_Parser() |
| #19377 | Closed | Bug | 1.10.12 | 2012-04-08 | Call to undefined method Config_Container_XML::XML_Parser() |
| #19429 | Closed | Bug | 1.10.12 | 2012-05-22 | Unit tests are failing, please patch |
| #19721 | Wont fix | Bug | 1.10.12 | 2012-11-26 | Update dependency |
| #19756 | Open | Req | 1.10.12 | 2012-12-17 | Add .properties support |
| #20120 | Open | Req | 1.10.12 | 2013-11-05 | Please upgrade XML_Parser to XML_Parser2 |
| #20187 | Feedback | Bug | 1.10.12 | 2014-01-25 | Error reading config |
| #20480 | Open | Bug | 1.10.12 | 2015-01-07 | Xml_Parser |
| #21172 | Open | Bug | 2017-01-26 | not working on PHP 7.1 | |
| #23754 | Open | Req | SVN | 2018-06-29 | Version Bump Config |