Releases: luads/php-xbase
Releases · luads/php-xbase
2.2.0
What's Changed
- Create encoder: MbConvertEncodingEncoder by @honginho in #120
- add AllowDynamicProperties for XBase\Header\Column::* properties to fix deprecation warnings by @Haehnchen in #127
New Contributors
- @honginho made their first contribution in #120
- @Haehnchen made their first contribution in #127
Full Changelog: 2.1.3...2.2.0
2.1.0
2.0.0 TableCreator
New features
TableCreatorallows you to create DBF table files.
Breaking changes
Tablereplaced byTableReaderWritableTablereplaced byTableEditor- removed all Record methods like get*() except
getand getDateTimeObject. - removed all Record methods like set*() except
set
1.4.0
1.3.4
1.3.2 WritableTable `editMode` option
- Table::__constructor accepts second argument as an options array. Available options:
encoding,columns.
use XBase\Table;
// before 1.3.2
$table = new Table(
__DIR__.'/Resources/foxpro/1.dbf',
['column1', 'column2'],
'cp852'
);
// since 1.3.2
$table = new Table(
__DIR__.'/Resources/foxpro/1.dbf',
[
'columns' => ['column1', 'column2'],
'encoding' => 'cp852'
]
);- WritableTable
editModeoption.cloneDefault. Creates a clone of original file and applies all changes to it. To save changes you need to callsavemethod.realtimeImmediately apply changes for original table file. Changes cannot be undone.
use XBase\WritableTable;
// clone edit mode
$tableWrite = new WritableTable(
'file.dbf',
[
'encoding' => 'cp866',
'editMode' => WritableTable::EDIT_MODE_CLONE,
]
);
// do edits
$tableWrite
->save()
->close();
// realtime edit mode
$tableWrite = new WritableTable(
'file.dbf',
[
'encoding' => 'cp866',
'editMode' => WritableTable::EDIT_MODE_REALTIME,
]
);
// do edits
$tableWrite->close();1.3.1
1.3.0
Features
add
declare(strict_types=1);for all files- Ability to add, edit and delete memo entries for VFP, Foxpro and DBase7.
- All setters return $this.
RecordInterface::get('name')is main getterRecordInterface::set('name', $value)is main setterWritableTable::saveyou should use it to save table changes.
changes
- Getter for type
D(Date) returns date string in 'Ymd' format instead of timestamp. VisualFoxproRecord::getDateTimereturns object of\DateTimeInterfaceinstead of timestamp.
deprecations
RecordInterface::getObjectRecordInterface::setObject- Setters like
Record::setType. Useset('name', $value)method instead. - Getters like
Record::getType. Useget('name')method instead. WritableTable::openWrite. Method is no longer needed.