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

Interop Config Laravel Package

sandrokeil/interop-config

Framework-agnostic PHP library for configuration-driven factories. Validates config structure, merges defaults, enforces required options, reduces factory boilerplate, supports auto-discovery of factories, and can generate configuration files from factory classes.

View on GitHub
Deep Wiki
Context7
2.2.0

Added

  • PHP 8 support

Deprecated

  • Nothing

Removed

  • Nothing

Fixed

  • Nothing
2.1.0

Added

  • #36: Create console tools to generate/display config based on factories. Read more in the docs.
  • Composer suggestion of psr/container

Deprecated

  • Nothing

Removed

  • Composer suggestion of container-interop/container-interop

Fixed

  • Nothing
2.0.1

This release contains no BC break.

Added

  • More test cases for iterable return type and \Iterator objects

Deprecated

  • Nothing

Removed

  • Nothing

Fixed

  • #34: Inconsistent return type in defaultOptions()
    • defaultOptions() method return type is iterable but array is still valid
2.0.0

To upgrade from version 1.x to version 2.x you have to add the PHP scalar types of the interfaces to your implemented factory methods.

Added

  • #33: PHP 7.1 language features (return types, scalar type hints)
    • dimensions() method return type is iterable
    • canRetrieveOptions() method return type is bool
    • mandatoryOptions() method return type is iterable
    • defaultOptions() method return type is array
  • Minor performance improvements
  • More test cases

Deprecated

  • Nothing

Removed

  • PHP < 7.1 support

Fixed

  • Nothing
1.0.0

This release contains BC breaks, but upgrade path is simple.

Added

  • #26: dimensions() method to RequiresConfig to make configuration depth flexible

Deprecated

  • Nothing

Removed

  • #26: vendorName() and packageName() method from RequiresConfig, replaced by dimensions() method

    • It's recommended to remove the methods and use the values directly in dimensions() to increase performance
    public function dimensions()
    {
        return [$this->vendorName(), $this->packageName()];
    }
    
  • #26: RequiresContainerId interface is renamed to RequiresConfigId

    • use the container id as a second argument by options() method.

Fixed

  • #28: Throws exception if dimensions are set but default options are available and no mandatory options configured
0.3.1

Added

  • Nothing

Deprecated

  • Nothing

Removed

  • Nothing

Fixed

  • Fixed Illegal offset type in isset or empty if options are empty and recursive mandatory options are used
0.3.0

Added

  • #9: Introducing ProvidesDefaultOptions interface
  • #13: Support for recursive mandatory options check
  • canRetrieveOptions() to ConfigurationTrait to perform the options check without throwing an exception
  • optionsWithFallback() to ConfigurationTrait which uses default options if config can not be retrieved
  • OptionNotFoundException and MandatoryOptionNotFoundException extends OutOfBoundsException instead of RuntimeException
  • Check if retrieved options are an array or an instance of ArrayAccess
  • Benchmark suite
  • Updated documentation

Deprecated

  • Nothing

Removed

  • HasConfig interface, was renamed to RequiresConfig
  • HasContainer interface, was renamed to RequiresContainerId
  • HasMandatoryOptions interface, was renamed to RequiresMandatoryOptions
  • HasDefaultOptions interface, was renamed to ProvidesDefaultOptions
  • ObtainsOptions interface, was merged in RequiresConfig
  • OptionalOptions interface, can be achieved via ProvidesDefaultOptions

Fixed

  • fixed wrong function name in documentation
0.2.0

Added

Deprecated

  • Nothing

Removed

  • #5: componentName function from HasConfig interface (BC break)

Fixed

  • Nothing
0.1.0

Added

  • Initial release
  • Added interfaces
  • #2: Added trait implementation

Deprecated

  • Nothing

Removed

  • Nothing

Fixed

  • Nothing
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