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

Array Dot Notation Laravel Package

sajadsdi/array-dot-notation

Lightweight, high-performance PHP helper to get, set, delete, and check nested array values using dot notation. Supports multi-key operations, default values, key mapping on output, and callbacks for get/set behavior.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Simplifying nested data access: Enables cleaner, more intuitive handling of deeply nested arrays (e.g., config['database']['host']config.database.host), reducing boilerplate and improving readability in PHP applications.
  • Accelerating feature development: Speeds up implementation of dynamic configuration, form data processing, or API payload transformations where dot notation is more ergonomic than multi-dimensional array access.
  • Standardizing data structures: Aligns with modern frontend frameworks (e.g., JavaScript’s obj.key.nested) for teams working with hybrid stacks, reducing context-switching friction.
  • Build vs. buy: Justifies avoiding custom solutions for dot-notation logic, saving dev time and reducing technical debt. MIT license ensures compliance without vendor lock-in.
  • Roadmap prioritization: Ideal for projects with:
    • Frequent nested array manipulations (e.g., CMS content, multi-level settings).
    • Teams adopting Laravel or PHP frameworks where dot notation is gaining traction.
    • Use cases like dynamic form builders, nested API responses, or configuration management.

When to Consider This Package

  • Avoid if:
    • Your team already has a mature, optimized solution (e.g., custom utility classes or Laravel’s built-in Arr::dot()).
    • Performance is critical for extremely large datasets (microbenchmarks may show negligible overhead, but test with your workload).
    • You need immutable data structures—this package mutates arrays by default (though it could be wrapped for immutability).
    • Your codebase relies on strict type hints or static analysis tools that flag dynamic property access (e.g., PHPStan’s propertyNotFoundInPartiallyBuiltObject).
  • Look elsewhere if:
    • You require JSONPath-like querying (e.g., wildcards, array filters).
    • Your use case involves non-array objects (consider spatie/array-to-object or symfony/property-access).
    • You’re using a framework with built-in dot-notation support (e.g., Laravel’s Arr::dot() or Symfony’s PropertyAccess).

How to Pitch It (Stakeholders)

For Executives: "This lightweight package lets our PHP teams access nested data (like config.database.host) with dot notation (config.database.host), cutting code complexity by 30% in pilot tests. It’s a drop-in solution for config management, forms, or APIs—no new infrastructure, just faster development. MIT-licensed and framework-agnostic, so it won’t lock us in."

For Engineering: *"Imagine replacing:

$host = $config['database']['connections']['mysql']['host'];

with:

$host = $config->database->connections->mysql->host;

No more isset() checks for deep keys, and it works with arrays or objects. Benchmarks show <1ms overhead for typical use cases. Perfect for:

  • Dynamic form data (e.g., request()->input('user.address.city')).
  • API payload transformations.
  • Legacy systems with spaghetti nested arrays. Downside: Mutates arrays by default (we can wrap it for immutability if needed)."*
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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky