Feature testing through Database::supports(Feature) #81
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Research
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No project
No assignees
1 participant
Notifications
Total time spent: 59 minutes 39 seconds
Due date
c.fahner
59 minutes 39 seconds
No due date set.
Dependencies
No dependencies set
Reference
slendium/ocd#81
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently the only feature that can be tested is schema enforcement using the
SchemaEnforceableinterface. However, there are many more schema-related features which databases can optionally support. Moreover, not all optional features are schema-related and in the future it might also become necessary to test for subfeatures. Which features are required or recommended also differs per application. A more general mechanism for feature testing needs to be made available.The
Databaseinterface should instead have a runtime methodsupports(Database\Feature):bool, whereFeatureis anenumto which features can be added progressively.Implementors may do a feature check during their regular database install/upgrade process.
This means
SchemaEnforceablecan be removed, to be replaced byDatabase::applySchema($collectionName, $schema):UpgradeCommandwhich just applies as many schema rules as it can.