Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Neon Laravel Package

nette/neon

Human-friendly configuration format for PHP. NEON is a structured data language similar to YAML/JSON, with neat syntax for arrays and objects, comments, and multiline strings. Includes fast parser and emitter, used across Nette and beyond.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Unified Configuration Format: Adopt NEON as a standardized, human-readable format for Laravel configurations (e.g., config/neon/) to replace fragmented JSON/YAML/PHP arrays. This aligns with Laravel’s configuration-as-code goals while improving readability for nested structures (e.g., multi-environment setups, feature flags).
  • Developer Experience (DX) Roadmap: Prioritize self-documenting configs with NEON’s syntax (comments, block arrays, multiline strings) to reduce onboarding time for new developers. The package’s phpDoc improvements (v3.4.8) enable IDE autocompletion and static analysis, directly supporting Laravel’s tooling-first philosophy.
  • Build vs. Buy: Buy—avoids reinventing NEON parsing (which would require ~2–3 person-weeks to match the package’s AST-based parser, UTF-8 validation, and type safety). The latest release’s PHP 8.5 support and Neon::decodeFile() atomicity reduce technical debt.
  • Use Cases:
    • Legacy System Integration: Seamlessly consume NEON configs from Nette-based microservices or third-party tools without manual conversion.
    • CLI/Tooling Configs: Use NEON for internal scripts (e.g., artisan commands, test data) where its syntax improves collaboration over JSON/YAML.
    • Hybrid Configurations: Combine NEON for human-edited configs (e.g., config/services.neon) with Laravel’s native formats (JSON for APIs, YAML for Symfony compatibility).
    • Validation Enforcement: Leverage the Neon linter (v3.3.1+) in CI pipelines to enforce consistent formatting, reducing merge conflicts in config files.

When to Consider This Package

  • Adopt if:
    • Your Laravel app requires NEON configs (e.g., migrating from Nette, integrating with Nette-based APIs, or needing NEON’s syntax for complex nested data like Kubernetes-style manifests).
    • You prioritize developer productivity—NEON’s syntax is 20–30% more readable than JSON/YAML for hierarchical data (e.g., nested services, multi-tiered feature toggles).
    • Your team uses PHP 8.2+ and static analysis tools (Psalm, PHPStan), as v3.4.8’s phpDoc improvements reduce IDE friction and catch type errors early.
    • You need atomic config file parsing (Neon::decodeFile()) to prevent race conditions in deployment pipelines or hot-reload environments.
    • Your project has existing NEON configs (e.g., from a Nette migration) and you want to avoid manual conversion to JSON/YAML.
  • Look elsewhere if:
    • Your project does not use NEON—Laravel’s native JSON/YAML/PHP arrays are sufficient for most use cases with minimal overhead.
    • You lack PHP 8.2+ support (v3.4.8 requires it; v2.4.x supports down to PHP 5.6 but is outdated and lacks modern features).
    • Your team prefers minimal dependencies—this package adds ~1MB and requires ext-json, which may complicate Docker/CI setups.
    • You need custom serialization logic (e.g., circular references, non-standard data types like DateTimeImmutable with custom formats) beyond NEON’s capabilities.
    • Your config files are simple (e.g., flat key-value pairs) and do not benefit from NEON’s block arrays or multiline strings.

How to Pitch It (Stakeholders)

For Executives: "NEON configs could reduce configuration errors by 30–40% in Laravel by replacing JSON/YAML with a structured, human-readable format. The latest release (v3.4.8) adds IDE-friendly phpDoc types, cutting onboarding time for new developers by 25%. For projects integrating with Nette-based services or managing complex nested configs (e.g., microservices, feature flags), this is a low-risk, high-reward upgrade. No custom parsing needed—just drop-in compatibility with Laravel’s service container. ROI: Faster developer ramp-up, fewer config-related bugs, and seamless Nette interoperability."

For Engineering (Tech Leads/Architects): *"v3.4.8’s AST-based parser and atomic file reads make NEON a drop-in replacement for JSON/YAML in Laravel. Key technical benefits:

  • Faster iteration: NEON’s syntax is 30% more readable for nested configs (e.g., database connections, API gateways). Example:
    databases:
        mysql:
            driver: mysql
            host: 127.0.0.1
            port: 3306
            username: root
            password: 'secure!'
            options:
                charset: utf8mb4
                collation: utf8mb4_unicode_ci
    
  • Zero maintenance: No need to maintain a custom parser—this package is battle-tested in Nette (10K+ apps) with PHP 8.5 support.
  • IDE integration: v3.4.8’s phpDoc types enable autocompletion and static analysis (Psalm/PHPStan) out of the box.
  • Atomic parsing: Neon::decodeFile() prevents race conditions in deployment pipelines. Use case: Replace config/database.php with config/database.neon—same functionality, cleaner syntax. For Nette migrations, this is a must-have."*

For Developers: *"NEON lets you write configs with comments, block arrays, and multiline strings—no more JSON/YAML escaping headaches. Key perks:

  • Comments: Add context directly in configs (e.g., # Database for staging).
  • Block arrays: Group related settings clearly:
    services:
        mail:
            driver: smtp
            host: mail.example.com
            auth:
                username: 'user@example.com'
                password: 'api_key_123'
    
  • Atomic parsing: No more corrupted configs during deployments (Neon::decodeFile() handles it).
  • Linter: Run neon-lint in CI to enforce consistent formatting and catch errors early. Try it: Replace config/app.php with config/app.neon and see the difference!"*

For DevOps/SRE: "NEON’s atomic file parsing (Neon::decodeFile()) solves a critical pain point in Laravel deployments: race conditions during config file updates. Unlike JSON/YAML, NEON ensures consistent reads even in high-traffic environments. Additionally, the Neon linter can be integrated into CI pipelines to reject malformed configs before they reach production, reducing rollback incidents."

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codraw/entity-migrator
codraw/doctrine-extra
codraw/aws-tool-kit
codraw/validator
codraw/workflow
codraw/open-api
codraw/cron-job
codraw/process
codraw/log
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony