Skip to content

[6.x] Refactor Element functionality to traits#18368

Merged
brandonkelly merged 35 commits into6.xfrom
feature/element-traits
Feb 10, 2026
Merged

[6.x] Refactor Element functionality to traits#18368
brandonkelly merged 35 commits into6.xfrom
feature/element-traits

Conversation

@riasvdv
Copy link
Contributor

@riasvdv riasvdv commented Feb 2, 2026

Description

Adds the following feature traits to the Element class to separate logic:

  • Cacheable
  • DisplayedInIndex
  • Draftable
  • Eagerloadable
  • Exportable
  • HasActions
  • HasAuthorization
  • HasCanonical
  • HasControlPanelUI
  • HasCustomFields
  • HasGqlType
  • HasLifecycleHooks
  • HasPreviewTargets
  • HasRoutesAndUrls
  • HasSources
  • HasStatuses
  • HasThumbnails
  • Localizable
  • Queryable
  • Renderable
  • Revisionable
  • Searchable
  • Structurable
  • TracksChanges

Each concern now also has at least 70% test coverage.

image

@riasvdv riasvdv force-pushed the feature/element-traits branch from b319b6d to 04c10d6 Compare February 2, 2026 22:23
@riasvdv riasvdv marked this pull request as ready for review February 3, 2026 12:36
@riasvdv riasvdv requested a review from brandonkelly February 3, 2026 12:36
# Conflicts:
#	src/Element/Element.php
@riasvdv riasvdv force-pushed the feature/element-traits branch from 97870a9 to 20b2efc Compare February 8, 2026 19:13
@brandonkelly brandonkelly merged commit 7f6e895 into 6.x Feb 10, 2026
12 checks passed
@brandonkelly brandonkelly deleted the feature/element-traits branch February 10, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants