All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Add Drupal 10 compatibility PR#27
- Fix EntityTranslatorTrait not returning non-translatable entities PR#26
Check UPGRADING.md
for instructions.
- Rename module from
wmmodel
toentity_model
- Move module development to Drupal.org, changing the namespace from
wieni
todrupal
- Document 3.0.0 upgrade, add upgrade script
- Remove EntityBundleConverter
- Fix optional argument resolving of FormStateInterface
- Make overriding AccountProxy optional
- Make argument resolving of FormStateInterface optional
- Add PHP 8 support
- Increase minimum Drupal core version to 9.3 due to entity bundle class support
- Increase minimum PHP requirement to 7.3 due to Drupal core PHP requirement
- Remove
WmModelInterface
andWmModel
trait - Remove
ModelFactory
(wmmodel.factory.model
) andModelFactoryInterface
- Support overriding all entity type classes, except if the @Model annotation has a bundle. The motivation for this change is this issue.
- Set storage timezone before storing datetime fields using
FieldHelpers::setDateTime(s)
- Add
FieldHelpers::getMediaSource
method to get the source field item list of a referenced media entity.
- Add entity bundle route param converter
- Stop resolving null values for non-optional controller arguments
- Remove
self
return type fromFieldHelpers
methods
- Add back loaded entity to link item array
- Fix
ModelValueResolver::resolve()
must yield at least one value.
- Fix
formatLink
field helper with nonexistent internal links
- Fix
formatLink
field helper with links to fragments on the same page
- Fix Call to undefined method languageManager() when using
EntityTranslatorTrait
- Add getDateTimes & setDateTimes field helpers
- Fix controller methods with optional arguments
- Add support for EntityInterface::load
- Add support for timestamp fields to FieldHelpers methods
- Return Datetime in correct timezone
- Add docblocks to WmModel trait methods
- Add support for Drupal 9
- Add basic test coverage
- Add support for changing class of entities without bundles. The bundle annotation parameter is now no longer required
for entity types without bundles, e.g.
Drupal\user\Entity\User
- Change minimum required core version to 8.6
- Mention related core issue in ModelValueResolver
- Add composer.lock to .gitignore
- Update wmmodel.api.php
- Update
EntityTranslatorTrait::translateEntities
arguments.
- Fix
FieldHelpers::setDateTime
method not working whendatetime_type
equalsdate
.
- Change
ModelFactoryInterface::getEntityTypeAndBundle
to also consider entity type class
- Add argument resolving for FormState so we can typehint $formState instead of $form_state
- Add argument resolving for FormState so we can typehint $formState instead of $form_state
More information about breaking changes, removed functionality and their alternatives is provided in the Upgrade Guide.
- Add getDateTime, setDateTime, formatLinks & formatLink field helpers
- Add EntityTranslatorTrait to easily translate entities
- Add bundle-specific EntityInterface::loadMultiple implementation
- Remove removeReference & removeFromList field helpers
More information about breaking changes, removed functionality and their alternatives is provided in the Upgrade Guide.
- Add Drush 10 support
- Add php & drupal/core version requirements
- Add coding style fixers
- Add issue & pull request templates
- Add getEntityTypeAndBundle method to ModelFactoryInterface
- Replace manual class mapping with Drupal plugins
- Replace deprecated ControllerResolver with an ArgumentValueResolver (Drupal core issue)
- Normalize composer.json
- Update .gitignore
- Update README
- Apply code style related fixes
- Remove Drush 8 support
- Remove
wmmodel.entity_type.bundle.info
service - Remove eck & node dependencies
- Add rebuildMapping method to ModelFactory
- Fix issue where class file exists but is not loaded
- Add Drush services declaration to composer.json
- Fix code style
- Add Drush 9 compatibility
- Fix issue with controller argument resolver
- Store class mapping in state instead of in cache
- Remove optimization
- AccountProxy->getAccount() now returns a fully loaded user model
- Remove the singularizing of bundles
- Updated the drupal/core patch
- Fix Model::create() for Taxonomy terms
- Make getReferencedEntitiesCacheTags method public
- Remove override of getCacheTags on entity classes
- Call the correct model class on preCreate, postLoad, preDelete and postDelete
- Use custom controller resolver to inject models into controller method
- Add drupal/core patch
Initial release