Skip to content

Update dependency nette/neon to v4 - #88

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/nette-neon-4.x
Open

renovate[bot] wants to merge 1 commit into
masterfrom
renovate/nette-neon-4.x

Conversation

@renovate

@renovate renovate Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
nette/neon (source) ^3.4.10 → ^4.0.0 age adoption passing confidence

Release Notes

nette/neon

v4.0.0: Released version 4.0.0

Compare Source

NEON 4 parses a file into a lossless syntax tree in which every comment and every space has its place, so you can edit a configuration and the diff shows only your change. Decoding and encoding stay as they were: Neon::decode() gives the same values as 3.4.

✨ New Features

  • Lossless parsing – Neon::parse($text)->print() === $text holds for any input NEON accepts
  • Format-preserving editing – setValue(), addItem() and removeItem() change only the tokens they edit: 0x0CEA stays hexadecimal, yes becomes no, a new key is indented like its siblings, and a removed item takes its comment along. A refused edit changes nothing at all, so installers, admin panels and AI agents can rewrite config.neon safely
  • A navigable tree – nodes know their parent, their comments and their position (line, column, offset); find(), findAncestor(), siblings, and a public Traverser that can replace and remove nodes on the walk
  • Evaluator – subclass it to turn literals, strings or entities into your own values, such as constants or parameters, the way the Nette DI container reads its configuration
  • Neon::encode() accepts a closure as $blockMode to decide per array whether it is written as a block, e.g. fn($v, $path) => !$path for the first level only, and writes floats in the shortest form that reads back exactly
  • Exception carries the position of the problem as an object and the bare message via getDescription()
  • neon-lint reports one line per finding, --json for tools and --check to verify that a file prints back byte for byte; an AI agent can run it after saving a .neon file
  • Runnable examples with their real output document the whole API
  • The format, the tree and the editing semantics follow a language-neutral specification shared with the JavaScript implementation @​nette/neon

💥 Breaking Changes

  • Requires PHP 8.4 or newer and the mbstring extension
  • The tree API is new: Neon::parse() returns a Nodes\DocumentNode, and the classes Decoder, Node\* and the old Traverser are gone. Code that walked the old nodes moves to the new tree, see examples/tree
  • Neon::encode() throws Nette\Neon\Exception for a string that is not valid UTF-8 instead of replacing it with U+FFFD; its errors now name the path to the value
  • Some error messages are more precise; code that matches their text may need an update
  • neon-lint has a new command-line contract: --debug is gone, and a failure of the tool itself exits with 2
  • Neon::BLOCK and Neon::CHAIN are deprecated, use blockMode: true and Neon::Chain

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

Config source: https://github.com/Slamdunk/.github/blob/main/renovate-config.json

@renovate renovate Bot added the renovate label Oct 26, 2026
@renovate
renovate Bot force-pushed the renovate/nette-neon-4.x branch from 4081d15 to 1626770 Compare October 26, 2026 06:28
| datasource | package    | from   | to    |
| ---------- | ---------- | ------ | ----- |
| packagist  | nette/neon | 3.4.10 | 4.0.0 |
@renovate
renovate Bot force-pushed the renovate/nette-neon-4.x branch from 1626770 to 17c1c4d Compare October 27, 2026 01:40
@codecov

codecov Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.92%. Comparing base (1999ae0) to head (17c1c4d).

Additional details and impacted files
@@            Coverage Diff            @@
##             master      #88   +/-   ##
=========================================
  Coverage     97.92%   97.92%           
  Complexity      149      149           
=========================================
  Files            15       15           
  Lines           337      337           
=========================================
  Hits            330      330           
  Misses            7        7           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants