docs: consolidate documentation into organized structure

- Move 12 markdown files from root to docs/ subdirectories
- Organize documentation by category:
  • docs/troubleshooting/ (1 file)  - Technical troubleshooting guides
  • docs/deployment/      (4 files) - Deployment and security documentation
  • docs/guides/          (3 files) - Feature-specific guides
  • docs/planning/        (4 files) - Planning and improvement proposals

Root directory cleanup:
- Reduced from 16 to 4 markdown files in root
- Only essential project files remain:
  • CLAUDE.md (AI instructions)
  • README.md (Main project readme)
  • CLEANUP_PLAN.md (Current cleanup plan)
  • SRC_STRUCTURE_IMPROVEMENTS.md (Structure improvements)

This improves:
 Documentation discoverability
 Logical organization by purpose
 Clean root directory
 Better maintainability
This commit is contained in:
2025-10-05 11:05:04 +02:00
parent 887847dde6
commit 5050c7d73a
36686 changed files with 196456 additions and 12398919 deletions

View File

@@ -0,0 +1,107 @@
<?php
declare(strict_types=1);
namespace App\Framework\Queue\ValueObjects;
/**
* Queue Priority Value Object
*
* Represents the priority of a job in the queue system.
* Higher values mean higher priority.
*/
final readonly class QueuePriority
{
public const CRITICAL = 1000;
public const HIGH = 100;
public const NORMAL = 0;
public const LOW = -100;
public const DEFERRED = -1000;
public function __construct(
public int $value
) {
if ($value < -1000 || $value > 1000) {
throw new \InvalidArgumentException(
sprintf('Priority must be between -1000 and 1000, got %d', $value)
);
}
}
public static function critical(): self
{
return new self(self::CRITICAL);
}
public static function high(): self
{
return new self(self::HIGH);
}
public static function normal(): self
{
return new self(self::NORMAL);
}
public static function low(): self
{
return new self(self::LOW);
}
public static function deferred(): self
{
return new self(self::DEFERRED);
}
public function isHigherThan(self $other): bool
{
return $this->value > $other->value;
}
public function isLowerThan(self $other): bool
{
return $this->value < $other->value;
}
public function equals(self $other): bool
{
return $this->value === $other->value;
}
public function isCritical(): bool
{
return $this->value >= self::CRITICAL;
}
public function isHigh(): bool
{
return $this->value >= self::HIGH && $this->value < self::CRITICAL;
}
public function isNormal(): bool
{
return $this->value > self::LOW && $this->value < self::HIGH;
}
public function isLow(): bool
{
return $this->value > self::DEFERRED && $this->value <= self::LOW;
}
public function isDeferred(): bool
{
return $this->value <= self::DEFERRED;
}
public function toString(): string
{
return match (true) {
$this->isCritical() => 'critical',
$this->isHigh() => 'high',
$this->isNormal() => 'normal',
$this->isLow() => 'low',
$this->isDeferred() => 'deferred',
default => sprintf('custom(%d)', $this->value)
};
}
}