Make all entities identifiable #59

Merged
c.fahner merged 6 commits from issues/46 into main 2026-09-17 08:40:12 +02:00
Owner

Resolves #46

Update Entity to add $id property
Remove Entity\Identifiable interface

Resolves #46 Update Entity to add $id property Remove Entity\Identifiable interface
c.fahner added this to the v0.2 milestone 2026-09-15 16:50:54 +02:00
src/Entity.php Outdated
@ -11,0 +8,4 @@
* Objects are not required to implement this interface to generate a {@see Schema}.
* In this case the schema won't contain an automatically generated primary key.
*
* Further configuration of the ID field requires adding the {@see Schema\IdOptions} attribute.
Author
Owner

Explain where to add this attribute

Explain where to add this attribute
c.fahner marked this conversation as resolved
@ -31,3 +21,1 @@
public function test_fromConstructorParameters_shouldSetDefaultIdGeneratorWithoutIdField_whenEntityIsIdentifiableAndDeclaresIdField(): void {
$sut = Schema::fromConstructorParameters(SchemaTest\EmptyIdentifiableEntity::class);
public function test_fromConstructorParameters_shouldSetDefaultIdGeneratorWithoutIdField(): void {
Author
Owner

Rename "shouldSetDefaultIdGeneratorWithoutIdField"

Rename "shouldSetDefaultIdGenerator~~WithoutIdField~~"
c.fahner marked this conversation as resolved
@ -11,4 +0,0 @@
* @author C. Fahner
* @copyright Slendium 2026
*/
final class NonEntity implements Entity\Identifiable {
Author
Owner

Check if the non-entity case (with fields) is still tested. From what I can tell only the EmptyObject case is tested.

Check if the non-entity case (with fields) is still tested. From what I can tell only the EmptyObject case is tested.
c.fahner marked this conversation as resolved
c.fahner stopped working 2026-09-17 07:56:54 +02:00
9 minutes 51 seconds
c.fahner deleted branch issues/46 2026-09-17 08:40:12 +02:00
c.fahner referenced this pull request from a commit 2026-09-17 08:40:14 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Total time spent: 9 minutes 51 seconds
c.fahner
9 minutes 51 seconds
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
slendium/ocd!59
No description provided.