Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Statamic Identity Contracts

Statamic Identity Contracts Laravel Package

goldnead/statamic-identity-contracts

A lightweight set of identity contracts for Statamic, offering interfaces that standardize user identity and authentication abstractions so addons and custom code can integrate consistently. Keeps identity logic decoupled, predictable, and reusable across projects.

View on GitHub
Deep Wiki
Context7

Identity foundation for the Statamic addon family: stable Identity value object and resolver contracts.

Frequently asked questions about Statamic Identity Contracts
What is goldnead/statamic-identity-contracts used for?
It provides a small set of PHP interfaces and contracts for modelling identities in Statamic. Use it when you want addons or application code to depend on stable abstractions for resolving, comparing, and representing identity values instead of concrete classes. It is a shared foundation for identity-related features, not a complete authentication system.
How do I install goldnead/statamic-identity-contracts?
Install it with Composer using composer require goldnead/statamic-identity-contracts. The package uses PSR-4 autoloading, so the contracts are available once Composer's autoloader is loaded. You then bind the interfaces to your own implementations in your Laravel or Statamic application as needed.
Does this package work with Laravel and Statamic?
Yes. The contracts are designed for modelling identities in Statamic and integrate with Laravel service container bindings. The package itself is framework-agnostic PHP, so Laravel provides the dependency injection and binding layer while Statamic supplies the identity context.
Do I need to bind these identity contracts in Laravel's service container?
You only need container bindings if your code resolves the identity contracts from Laravel's service container. Bind each interface to a concrete implementation in a service provider so your addon or application can inject the contract. If you instantiate implementations directly, container bindings are not required.
Does this package include a concrete identity implementation?
No, it provides interfaces and contracts rather than a ready-made identity model or resolver. You implement the contracts yourself or use another package that implements them. This keeps your identity logic decoupled and lets you swap implementations without changing dependent code.
How do these contracts help with testing Statamic addons?
Because your addon depends on interfaces instead of concrete classes, you can replace identity resolvers and comparators with test doubles in unit tests. The contracts have no runtime dependencies, which keeps tests lightweight. You can assert identity resolution and comparison behavior without booting a full Statamic or Laravel stack.
Can I use these identity contracts outside Statamic?
The package is framework-agnostic and contains lightweight PHP contracts with no runtime dependencies. You can autoload and use the interfaces in other PHP projects, although they are primarily intended for Statamic identity modelling. In non-Laravel projects you would wire up implementations manually or with your own container.
What PHP or Laravel versions are supported by goldnead/statamic-identity-contracts?
The provided package information does not list specific PHP or Laravel version constraints. Check the package composer.json for its exact PHP requirement before installing. Laravel compatibility also depends on your application's Laravel and Statamic versions, so verify those constraints together.
How does identity comparison work with these contracts?
The contracts define abstractions for comparing identity values, but your implementation decides the actual comparison rules. That means you can handle normalization, case sensitivity, external identifiers, or provider-specific equality logic behind the interface. Dependent code only relies on the contract, not on a specific comparison strategy.
Is goldnead/statamic-identity-contracts a replacement for Statamic authentication or user management?
No. It is a set of identity contracts, not an authentication addon or a full user management solution. It is meant to sit underneath authentication, profile, or user-resolution features so those features can share consistent identity abstractions. You still need Statamic's user system or your own implementation for the actual authentication flow.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core