jardispsr/classversion 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jardispsr/classversion

最新稳定版本:1.0.0

Composer 安装命令:

composer require jardispsr/classversion

包简介

This package provides classversion interfaces for a domain driven design approach

README 文档

README

Build Status License: MIT PHP Version PHPStan Level PSR-4 PSR-12

This package provides classversion interfaces for a domain driven design approach.

Installation

composer require jrs/class-version

Interfaces

ClassVersionInterface

The main interface for resolving versioned class instances.

interface ClassVersionInterface
{
    /**
     * @template T
     * @param class-string<T> $className
     * @param ?string $version
     * @return mixed|T
     */
    public function __invoke(string $className, ?string $version = null): mixed;
}

ClassVersionConfigInterface

Interface for managing version configuration.

interface ClassVersionConfigInterface
{
    /**
     * @param string|null $version
     * @return string|null
     */
    public function version(?string $version = null): ?string;
}

Usage

Implement these interfaces to create a versioning system for your domain classes, allowing you to manage different versions of class implementations in your DDD architecture.

License

MIT

统计信息

  • 总下载量: 57
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: Makefile

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-27