Skip to content

Snak hash should be stable and PHP independent #130

@JeroenDeDauw

Description

@JeroenDeDauw

Right now the hash of snaks is created as follows:

    public function getHash() {
        return sha1( serialize( $this ) );
    }

This lacks the following desired properties:

  • stability over multiple versions of the DataModel component (renaming of a private field will cause the serialization to change)
  • constructibility of the hash by users that do not use PHP (or the DataModel component)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions