{
  "target_php": "8.3.36",
  "changed_baseline_files": 1037,
  "changes": [
    "Removed and deprecated PHP calls replaced in application code and bundled libraries",
    "8530 short PHP opening tags normalized",
    "Legacy constructors, array offsets, interface return signatures and properties updated",
    "Legacy text encodings preserved with mb_convert_encoding",
    "GD images and integer coordinates updated for PHP 8",
    "PHP 7.2-specific session directory override removed",
    "Composer PHP platform pinned to 8.3.36",
    "Quote rows normalize missing credit-note and internal-comment collections",
    "Nested carrier arrays and nullable shipping aggregates corrected in six invoice/document templates",
    "Menu/customer runtime failures corrected across 45 application/support sources; full details in MENU_PHP83_AUDIT.json",
    "Root-only intranet reset/nullable-row audit: 82 pointer call sites corrected or guarded in 23 application files; subdirectories excluded.",
    "Quality Assurance date handling corrected in the main, QA and legacy root pages: parse source dates directly, reject missing/invalid dates and guard legacy calendar differences."
  ],
  "validation": {
    "php_version_used": "8.3.36",
    "syntax": {
      "sources_checked": 6103,
      "errors": 0,
      "notes": "Full scan of 6101 files plus targeted rechecks of subsequent fixes and the two added quote/shipping regression tests."
    },
    "compatibility": {
      "standard": ".phpcs-php83.xml",
      "full_scan_files": 6094,
      "function_deprecations_or_removals_remaining": 0,
      "notes": "HTML-only/empty .php files, hidden files and the last changed files were checked in the supplemental audit. Narrow false-positive exclusions are documented in the ruleset."
    },
    "smoke_tests": {
      "passed": 10,
      "cases": [
        "text/date formats",
        "spreadsheet calculations and iterators",
        "mPDF",
        "legacy mPDF",
        "TCPDF",
        "legacy TCPDF",
        "QR rendering and decoding",
        "Dompdf",
        "JpGraph",
        "XAJAX"
      ]
    },
    "existing_suites": {
      "passed": 24,
      "blocked": 1,
      "blocked_test": "intranet/prowinch-portal-php/tests/import_excel_test.php",
      "reason": "Missing fixture: intranet/prowinch-portal-php/Prowinch_Portal_V2_TEST.xlsx"
    },
    "quote_regression": {
      "passed": true,
      "test": "intranet/tests/quotes_nullable_collections_test.php",
      "cases": [
        "missing collections",
        "null collections",
        "empty collections",
        "populated credit notes and escaped private comments",
        "empty result set"
      ]
    },
    "login": {
      "url": "http://20.106.174.56/intranet/",
      "http_status": 200,
      "username_password_form_present": true,
      "header_spacing_preserved": true
    },
    "limitations": [
      "Authenticated workflows that mutate live database records were not executed."
    ],
    "shipping_regression": {
      "passed": true,
      "php_version": "8.3.36",
      "test": "intranet/tests/invoice_shipping_fields_test.php",
      "cases_passed": 30,
      "templates_checked": 6,
      "notes": "Carrier lists remain flat; null shipping aggregates are normalized before CSV parsing. Database connections were replaced with test doubles."
    },
    "quote_16241_pdf": {
      "http_status": 200,
      "content_type": "application/pdf",
      "pdf_header_and_eof_valid": true,
      "notes": "Live document verified after initializing item quantity accumulators to numeric zero in six document templates."
    },
    "menu_audit": {
      "report": "MENU_PHP83_AUDIT.json",
      "application_sources_reviewed": 480,
      "syntax_files_checked": 484,
      "target_php": "8.3.36",
      "syntax_errors": 0,
      "compatibility_errors": 0,
      "remaining_legacy_references_require_functional_review": true
    },
    "root_array_pointer_audit": {
      "report": "INTRANET_ROOT_ARRAY_AUDIT.json",
      "php_files_reviewed": 886,
      "reset_calls_reviewed": 127,
      "changed_application_files": 23,
      "syntax_files_checked": 887,
      "syntax_errors": 0,
      "compatibility_errors": 0,
      "compatibility_warnings": 0,
      "regression_cases_passed": 223,
      "php_version": "8.3.36"
    },
    "quality_assurance_dates": {
      "php_version": "8.3.36",
      "test": "intranet/tests/quality_assurance_dates_regression_test.php",
      "main_and_qa_render_cases_passed": 24,
      "legacy_checks": [
        "invalid and missing dates",
        "latest-issue ordering",
        "calendar-day difference across daylight saving time"
      ],
      "syntax_files_checked": 5,
      "syntax_errors": 0,
      "php_compatibility_errors": 0,
      "php_compatibility_warnings": 0,
      "scope": "Review confined to loose intranet PHP source files; subdirectories excluded.",
      "notes": "DateTime::diff was receiving false because an already formatted D, M j, Y date was parsed as m/d/y. Main/QA pages now format parsed source dates once. Missing last-update dates fall back to the valid creation date; unavailable creation dates display N/A. Tests use page fragments and fixtures without loading database-backed entry points."
    }
  },
  "reproduce": {
    "compatibility_tools": [
      "phpcompatibility/php-compatibility:10.0.0-alpha2",
      "squizlabs/php_codesniffer:3.13.6",
      "phpcsstandards/phpcsutils:1.2.3"
    ],
    "compatibility_command": "php -d short_open_tag=1 /path/to/phpcs --standard=.phpcs-php83.xml --runtime-set installed_paths /path/to/php-compatibility,/path/to/phpcsutils",
    "syntax_requirement": "Use PHP 8.3.36 with short_open_tag=0 and error_reporting=-1.",
    "smoke_command": "php intranet/tests/php83_compatibility_test.php <mode>",
    "quote_regression_command": "php intranet/tests/quotes_nullable_collections_test.php",
    "bundled_library_patch": "patches/php83-bundled-libraries.patch",
    "bundled_library_patch_validation": "Reverse dry run with --fuzz=0 passed on every patched library file.",
    "bundled_library_patch_restore": "When restoring the same original bundled library versions, apply: patch -p1 --forward --input=patches/php83-bundled-libraries.patch",
    "menu_regression_commands": [
      "php intranet/tests/customers_page_regression_test.php",
      "php intranet/tests/menu_php83_regression_test.php",
      "php intranet/tests/json_request_php83_test.php",
      "php intranet/tests/mail_signing_php83_test.php mailer",
      "php intranet/tests/mail_signing_php83_test.php mailer2"
    ],
    "root_array_pointer_regression_command": "php intranet/tests/root_array_pointer_regression_test.php",
    "quality_assurance_dates_regression_command": "php intranet/tests/quality_assurance_dates_regression_test.php"
  }
}
