Repository navigation
Upgrading to StrObj 3
github-actions[bot] edited this page Oct 5, 2026
·
1 revision
The current version of Dalue requires uuur86/strobj 3.x and PHP 7.4 or later.
composer require uuur86/dalue uuur86/strobj:^3.0| Situation | Before (StrObj 2.x) | Now |
|---|---|---|
Stored false
|
Mapped as ''
|
Mapped as false
|
| Missing path | null |
null, or the new $default argument |
| Collection item without a field | Rows shifted; values from different items were combined |
null in that row; rows stay aligned |
| Columns of different length | Short columns left keys out of later rows | Missing cells are null
|
Schema key 0, "0" or ""
|
Mapping stopped at that key | Mapped like any other key |
Key like a[]b
|
Last two characters removed | Kept as is; only a trailing [] marks a collection |
| Return type | Not declared | array |
- Update the dependencies with Composer.
- Search your code for checks such as
=== ''on mapped values that could now befalseornull. - If you relied on misaligned collection rows or on columns being left out, review those schemas and add tests with your real payloads.
- If you extend
Mapperand overridemap()ormergeColumns(), add thearrayreturn type and the$defaultparameter to your overrides.
StrObj 3 can reproduce its old read rules:
use StrObj\Behavior;
$data = StringObjects::instance($payload, ['behavior' => Behavior::LEGACY]);Dalue still fixes the schema-key and collection-suffix problems in this mode,
but false values and wildcard reads follow the 2.x rules. See
Missing Values and Defaults.
Dalue is licensed under GPL-3.0-or-later. Source: uuur86/dalue · Edit these pages in docs/wiki.