Files
Coltura/src/Api/Shared/State/AppVersionProvider.php
Matthieu 85a6c0d795
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
refactor : reorganize codebase to DDD architecture
Backend:
- src/Api/Auth/State/ — MeProvider, UserPasswordHasherProcessor
- src/Api/Shared/Resource/ — AppVersion
- src/Api/Shared/State/ — AppVersionProvider
- src/Domain/, src/Application/, src/Infrastructure/ — skeleton ready
- User entity stays in src/Entity/ (framework, outside DDD)

Frontend:
- frontend/domains/ — skeleton ready for bounded contexts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 11:37:10 +02:00

27 lines
650 B
PHP

<?php
declare(strict_types=1);
namespace App\Api\Shared\State;
use ApiPlatform\Metadata\Operation;
use ApiPlatform\State\ProviderInterface;
use App\Api\Shared\Resource\AppVersion;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
/**
* @implements ProviderInterface<object>
*/
class AppVersionProvider implements ProviderInterface
{
public function __construct(
#[Autowire(param: 'app.version')]
private readonly string $appVersion,
) {}
public function provide(Operation $operation, array $uriVariables = [], array $context = []): object
{
return new AppVersion($this->appVersion);
}
}