Skip to content

Releases: locomotivemtl/charcoal-core

charcoal-core 0.6.3

03 Mar 23:21
Compare
Choose a tag to compare

Complete commits list: 0.6.2.1...0.6.3

Summary:

  • Fixed support for auto-incremented primary key for SQLite databases
  • Improved exception messages on AbstractModel::loadFromL10n()

charcoal-core 0.6.2

02 Mar 23:38
Compare
Choose a tag to compare

Complete commits list: 0.6.1...0.6.2

Summary:

  • Improved flow of operations in ExpressionFieldTrait
  • Fixed field name usage in ExpressionFieldTrait
  • Fixed metadata/config in service provider to improve logic processing module/classes

charcoal-core 0.6.1

02 Mar 23:38
Compare
Choose a tag to compare

Complete commits list: 0.6.0...0.6.1

Summary:

  • Improved exception messages for Source classes
  • Changed AbstractMetadata to retrieve property by camelized identifier
  • Changed AbstractModel::saveProperties() to skip non-storable properties
  • Added support for validatable flag on property to skip validation if value is false

charcoal-core 0.6.0

04 Nov 22:11
49c9f95
Compare
Choose a tag to compare

Complete commits list: 0.5.0...0.6.0

Requires:

Summary:

  • Changed method AbstractModel::setFlatData() to decouple flat-data processing for model properties
  • Added method AbstractModel::flatData()
  • Fixed various edge cases where SQL is expected
  • Improved field name usage in ExpressionFieldTrait

charcoal-core 0.5.0

04 Nov 21:19
b31cf49
Compare
Choose a tag to compare

Complete commits list: 0.4.7...0.5.0

Requires:

Changed:

  • Method signature for AbstractValidator::merge()
  • Class ModelValidator to only validate validatable properties
  • Moved validation levels from AbstractValidator to ValidatorInterface

Added:

  • Method AbstractValidator::camelize() with static caching

Fixed:

  • Camelizing of property validation methods
  • PHP syntax typo in AbstractValidator::merge() method

charcoal-core 0.4.7

04 Nov 14:23
Compare
Choose a tag to compare

Complete commits list: 0.4.6...0.4.7

Summary:

  • Added methods createModel() and createModelFromData() to CollectionLoader to improve the process of creating models
  • Added method DatabaseSource::dbPrepare() to prepare the SQL and bind parameters
  • Added LazyCollectionLoader to return Generator instead of processing all objects at once
  • Added caching for database table checks
  • Added support for "values" and "value" for creating a Filter
  • Cleanup SQL queries, collapsed whitespace for easier reading in logs

charcoal-core 0.4.5

02 Aug 17:26
Compare
Choose a tag to compare
  • Fix camel case properties.

charcoal-core 0.4.4.1

24 Jul 19:21
Compare
Choose a tag to compare
  • Fix a missing ArrayAccess use.

charcoal-core 0.4.4

23 Jul 19:45
Compare
Choose a tag to compare
  • Remove metadata loader from the interface.
  • Access properties with ArrayAccess.
  • Minor code improvements

charcoal-core 0.4.0

05 Jun 15:25
Compare
Choose a tag to compare

Key Features

New Metadata Loader Class

The MetadataLoader class suffered from design flaws which resulted in poor performance on large projects.

Metadata Caching

Previously, the MetadataLoader would store MetadataInterface instances into the cache pool with the belief the pool would return those same instances. Unfortunately, depending on the cache driver, the instances would be serialized when stored and unserialized into new objects when retrieved. This would cause the cache to miss every time.

This is resolved by storing MetadataInterface instances in a static class property (MetadataLoader::$metadataCache) and storing only the raw data in the cache pool.

Metadata Creation

Previously, the MetadataLoaderrequired a MetadataInterface instance every time the Loader was called upon to retrieve metadata from the cache (or from the file system). If the data was retrieved from the cache pool, the given instance would be ignored in favour of the instance returned by the pool. This lead to a lot of unnecessary object instantiations.

This is resolved by delegating the instantiation of the MetadataInterface class to the MetadataLoader.

New Metadata Config Class

The MetadataConfig allows one to customize the MetadataLoader service. The configset stores the Loader's settings, search paths, and cache pool preference.

For an example of a customized Loader, locomotivemtl/charcoal-admin v0.12.x takes advantage of this feature to append extra "admin-only" metadata paths and swap the cache pool.

BC Breaks

Describable Classes:

The DescribableTrait::loadMetadata() method uses a new DescribableTrait::metadataClass() method instead of DescribableTrait::createMetadata()

Renamed Methods:

Before After
MetadataLoader::classnameToIdent metaKeyFromClassName
MetadataLoader::identToClassname classNameFromMetaKey
MetadataLoader::filenameFromIdent filePathFromMetaKey
MetadataLoader::loadData loadMetadataByKey
MetadataLoader::loadDataArray loadMetadataByKeys
MetadataLoader::loadFileFromIdent loadMetadataFromSource

What's new in 0.4.0?

Dependencies

Added

  • Dependency to locomotivemtl/charcoal-cache
  • DescribableTrait::metadataClass() abstract method for defining the model's metadata class
  • AbstractModel::metadataClass() concrete method as per changes to DescribableTrait
  • Class MetadataConfig for handling config.metadata settings
  • Container entry metadata/config to model service provider for config.metadata settings
  • Container entry metadata/cache to model service provider for customizing the cache pool used by MetadataLoader

Changed

  • Synchronized operations between methods AbstractModel::objType() and DescribableTrait::generateMetadataIdent()
  • AbstractModel::createMetadata() method to use new ::metadataClass() method
  • Breaking: DescribableTrait::loadMetadata() method to use new ::metadataClass() method to delegate metadata class instantiation to MetadataLoader
  • Complete rewrite of MetadataLoader class [2fce5f0...d8c4145]

Fixed

  • Caching of instances of MetadataInterface in MetadataLoader
  • Caching of metadata, loaded from filesystem, in MetadataLoader cache pool