- Add comprehensive health check system with multiple endpoints - Add Prometheus metrics endpoint - Add production logging configurations (5 strategies) - Add complete deployment documentation suite: * QUICKSTART.md - 30-minute deployment guide * DEPLOYMENT_CHECKLIST.md - Printable verification checklist * DEPLOYMENT_WORKFLOW.md - Complete deployment lifecycle * PRODUCTION_DEPLOYMENT.md - Comprehensive technical reference * production-logging.md - Logging configuration guide * ANSIBLE_DEPLOYMENT.md - Infrastructure as Code automation * README.md - Navigation hub * DEPLOYMENT_SUMMARY.md - Executive summary - Add deployment scripts and automation - Add DEPLOYMENT_PLAN.md - Concrete plan for immediate deployment - Update README with production-ready features All production infrastructure is now complete and ready for deployment.
66 lines
2.1 KiB
PHP
66 lines
2.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
require_once __DIR__ . '/../../vendor/autoload.php';
|
|
|
|
use App\Framework\QrCode\QrCodeGenerator;
|
|
use App\Framework\QrCode\ValueObjects\ErrorCorrectionLevel;
|
|
use App\Framework\QrCode\ValueObjects\QrCodeConfig;
|
|
use App\Framework\QrCode\ValueObjects\QrCodeVersion;
|
|
use App\Framework\QrCode\ValueObjects\EncodingMode;
|
|
|
|
echo "=== Format Information Pixel Check ===\n\n";
|
|
|
|
$data = "HELLO WORLD";
|
|
$config = new QrCodeConfig(
|
|
version: QrCodeVersion::fromNumber(1),
|
|
errorCorrectionLevel: ErrorCorrectionLevel::M,
|
|
encodingMode: EncodingMode::BYTE
|
|
);
|
|
|
|
$matrix = QrCodeGenerator::generate($data, $config);
|
|
$size = $matrix->getSize();
|
|
|
|
echo "Data: '{$data}'\n";
|
|
echo "Matrix Size: {$size}x{$size}\n\n";
|
|
|
|
echo "=== Format Information Pixels (Row 8) ===\n";
|
|
echo "Expected for Mask 5, Level M: 10000001 1001110\n";
|
|
echo "Actual:\n";
|
|
|
|
// Horizontal format info (row 8)
|
|
// Left: cols 0-5, 7-8 (8 bits, skip 6)
|
|
// Right: cols 20-14 (7 bits, no skip)
|
|
$formatRow8 = '';
|
|
$cols = [0, 1, 2, 3, 4, 5, 7, 8, 20, 19, 18, 17, 16, 15, 14];
|
|
foreach ($cols as $col) {
|
|
$isDark = $matrix->getModuleAt(8, $col)->isDark();
|
|
$formatRow8 .= $isDark ? '1' : '0';
|
|
echo " Row 8, Col {$col}: " . ($isDark ? '█' : '░') . " (" . ($isDark ? '1' : '0') . ")\n";
|
|
}
|
|
|
|
echo "\nCombined horizontal: {$formatRow8}\n";
|
|
|
|
echo "\n=== Format Information Pixels (Column 8) ===\n";
|
|
$formatCol8 = '';
|
|
// Bottom: rows 20-14 (7 bits)
|
|
// Top: rows 8, 7, 5, 4, 3, 2, 1, 0 (8 bits, skip 6)
|
|
$rows = [20, 19, 18, 17, 16, 15, 14, 8, 7, 5, 4, 3, 2, 1, 0];
|
|
foreach ($rows as $row) {
|
|
$isDark = $matrix->getModuleAt($row, 8)->isDark();
|
|
$formatCol8 .= $isDark ? '1' : '0';
|
|
echo " Row {$row}, Col 8: " . ($isDark ? '█' : '░') . " (" . ($isDark ? '1' : '0') . ")\n";
|
|
}
|
|
|
|
echo "\nCombined vertical: {$formatCol8}\n";
|
|
|
|
echo "\n=== Analysis ===\n";
|
|
$expectedHorizontal = '100000011001110';
|
|
$expectedFirstByte = substr($expectedHorizontal, 0, 8);
|
|
$actualFirstByte = substr($formatRow8, 0, 8);
|
|
|
|
echo "Expected first 8 bits: {$expectedFirstByte}\n";
|
|
echo "Actual first 8 bits: {$actualFirstByte}\n";
|
|
echo ($expectedFirstByte === $actualFirstByte ? "✅ MATCH!" : "❌ MISMATCH!") . "\n";
|