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.
This release contains no BC break.
\Iterator objectsdefaultOptions()
defaultOptions() method return type is iterable but array is still validTo 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.
dimensions() method return type is iterablecanRetrieveOptions() method return type is boolmandatoryOptions() method return type is iterabledefaultOptions() method return type is arrayThis release contains BC breaks, but upgrade path is simple.
dimensions() method to RequiresConfig to make configuration depth flexible#26: vendorName() and packageName() method from RequiresConfig, replaced by dimensions() method
dimensions() to increase performancepublic function dimensions()
{
return [$this->vendorName(), $this->packageName()];
}
#26: RequiresContainerId interface is renamed to RequiresConfigId
options() method.canRetrieveOptions() to ConfigurationTrait to perform the options check without throwing an exceptionoptionsWithFallback() to ConfigurationTrait which uses default options if config can not be retrievedHasConfig interface, was renamed to RequiresConfigHasContainer interface, was renamed to RequiresContainerIdHasMandatoryOptions interface, was renamed to RequiresMandatoryOptionsHasDefaultOptions interface, was renamed to ProvidesDefaultOptionsObtainsOptions interface, was merged in RequiresConfigOptionalOptions interface, can be achieved via ProvidesDefaultOptionscomponentName function with packageName (PSR-4 standard)componentName function from HasConfig interface (BC break)How can I help you explore Laravel packages today?