Skip to content

feat remove abandoned laminas json with native php functions#80

Open
mairo744 wants to merge 2 commits intolaminas:4.0.xfrom
mairo744:chore/laminas-json
Open

feat remove abandoned laminas json with native php functions#80
mairo744 wants to merge 2 commits intolaminas:4.0.xfrom
mairo744:chore/laminas-json

Conversation

@mairo744
Copy link

@mairo744 mairo744 commented Aug 9, 2025

Q A
Documentation no
Bugfix no
BC Break yes
New Feature no
RFC no
QA yes

Description

This change removes all usage of Laminas\Json in favor of PHP’s native json_encode() and json_decode() functions.

Reason for change:

  • laminas/laminas-json is abandoned and no longer maintained.

Changes made:

  • Replaced LaminasJson::encode() calls with json_encode() using JSON_THROW_ON_ERROR.
  • Replaced LaminasJson::decode() calls with json_decode() and $associative mapping from the configured object decode type.
  • Preserved existing cycle check logic and exception wrapping for backward-compatible error handling.

Impact:

  • Removes dependency on abandoned laminas/laminas-json package.
  • Potentially changes exception types internally (now using JsonException from PHP core), but they are wrapped to maintain public API compatibility.
  • This is a BC break

@fezfez
Copy link
Contributor

fezfez commented Mar 10, 2026

@froschdesign any news ?

@froschdesign froschdesign changed the base branch from 3.2.x to 4.0.x March 10, 2026 20:40
Signed-off-by: mmalac <mmalac@sygic.com>
@mairo744 mairo744 force-pushed the chore/laminas-json branch from 67d734e to 91692e9 Compare March 10, 2026 21:11
…ntation

- Replaced custom logic with native JSON functions, utilizing `JSON_UNESCAPED_UNICODE` and `JSON_UNESCAPED_SLASHES`.
- Removed unsupported options such as `cycle_check` and `enable_json_expr_finder`.
- Add tests for serialization and deserialization

Signed-off-by: mmalac <mmalac@sygic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants