Changelog
IniModifier::save()
: support of new flagFORMAT_SPACE_AROUND_EQUAL
to add spaces around the equal sign- new method
Utils::arrayToIniString()
- support of comments starting with
#
, with a new flagFORMAT_COMMENT_HASH
on constructors - Fix an issue when given
''
as a section name to methods ofIniModifier
. - The library is compatible with PHP 8.2 and 8.3.
Fix the add of an extra [0]
section, when saving an ini file that was
empty before adding some values.
- Fix compatibility with PHP 8.1
- support of a new flag FORMAT_NO_QUOTES as parameter for
IniModifier::save()
. Allow to generate an ini file without quotes in values. It can be useful to generate an ini file compatible with some software, like Postgresql.
- Fix setValue of an array item on an existing string value
- Fix return value of
IniModifierArray::isSection()
- fix
IniReader::getValue()
on associative array values
- Fix ini merge when base value is a string and new value is an array
- Fix
IniModifier::setValue()
when existing value and new values are ini booleans or php boolean. In some case the ini content is not modified even if booleans are different.
- Fix compatibility with PHP 7.3
Utils::read()
andUtils::readAndMergeObject()
are now using theINI_SCANNER_TYPED
mode ofparse_ini_file
.- Fix parsing to match results given by
parse_ini_file
with theINI_SCANNER_TYPED
mode. valuestrue
,on
,yes
are converted totrue
, valuesfalse
,no
,off
andnone
are converted tofalse
.
- Fix parsing of section names having strange characters or ";" character
- new parameter in Util::readAndMergeObject() and Utils::mergeIniObjectContents() to indicate a list of sections and top level parameters that will not be merged into the initial content
- IniReaderInterface declare new methods: isEmpty(), getFileName(), isSection(), getSectionList().
- New IniModifierReadOnly object. This is a decorator to any IniModifierInterface or IniReaderInterface, to expose only IniReaderInterface methods. So an IniModifierInterface object becomes read only.
- New method IniModifier::removeSection()
- Fix: modification flag was triggered although there was no changes
- Fix: jIniFile: chmod fix
- Fix serialization: false was not serialized correctly
- fix: IniModifierArray should accept IniReaderInterface objects
- new IniReader object, to read only files, to have "read only modifiers" in IniModifierArray
- Exceptions are now Exceptions from the library, IniInvalidArgumentException and IniException
- IniModifier does not require anymore an existing file, and can create a new file with a given content.
- New IniModifierArray object. It allows to work on a list of IniModifier objects as the same time
- setValue accepts now an array as value
- Fix
Util.mergeIniObjectContents()
andUtil::readAndMergeObject()
about the merge of array values with integer keys. - New flags for these methods have been added to change the behavior of merge
- Support of most of word characters in names
- Support of associative arrays like
foo[mykey]=bar
foo[otherkey]=baz
- fix merge of array values during import
- fix renaming of array values
- IniModifier and MultiInitModifier share the same interface
- No more parameter '$onMaster' on methods. Replace by methods
named
<something>OnMaster()
.