- Create AnsibleDeployStage using framework's Process module for secure command execution - Integrate AnsibleDeployStage into DeploymentPipelineCommands for production deployments - Add force_deploy flag support in Ansible playbook to override stale locks - Use PHP deployment module as orchestrator (php console.php deploy:production) - Fix ErrorAggregationInitializer to use Environment class instead of $_ENV superglobal Architecture: - BuildStage → AnsibleDeployStage → HealthCheckStage for production - Process module provides timeout, error handling, and output capture - Ansible playbook supports rollback via rollback-git-based.yml - Zero-downtime deployments with health checks
46 lines
1021 B
PHP
46 lines
1021 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Framework\Notification\Channels\WhatsApp\ValueObjects;
|
|
|
|
/**
|
|
* WhatsApp Business Account ID value object
|
|
*
|
|
* Identifies a WhatsApp Business Account in the WhatsApp Business API
|
|
*/
|
|
final readonly class WhatsAppBusinessAccountId
|
|
{
|
|
public function __construct(
|
|
public string $value
|
|
) {
|
|
if (empty($value)) {
|
|
throw new \InvalidArgumentException('WhatsApp Business Account ID cannot be empty');
|
|
}
|
|
|
|
if (!ctype_digit($value)) {
|
|
throw new \InvalidArgumentException("Invalid WhatsApp Business Account ID format: {$value}");
|
|
}
|
|
}
|
|
|
|
public static function fromString(string $value): self
|
|
{
|
|
return new self($value);
|
|
}
|
|
|
|
public function toString(): string
|
|
{
|
|
return $this->value;
|
|
}
|
|
|
|
public function __toString(): string
|
|
{
|
|
return $this->value;
|
|
}
|
|
|
|
public function equals(self $other): bool
|
|
{
|
|
return $this->value === $other->value;
|
|
}
|
|
}
|