loreal-global-kickoff/test-process2.php
DJP 5fb6e1957d Add debug logging and fix test files
- Added error_log debugging to process-csv.php
- Fixed test-csv.php syntax (removed use statements in code)
- Created test-process2.php for step-by-step class loading test
- All service classes load successfully in tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 17:16:21 -05:00

51 lines
1.3 KiB
PHP

<?php
session_start();
error_reporting(E_ALL);
ini_set('display_errors', 1);
header('Content-Type: application/json');
try {
require_once __DIR__ . '/vendor/autoload.php';
echo json_encode(['step' => 1, 'message' => 'Autoload OK']) . "\n";
flush();
require_once __DIR__ . '/CSVTransformer.php';
echo json_encode(['step' => 2, 'message' => 'CSVTransformer required']) . "\n";
flush();
$transformer = new CSVTransformer();
echo json_encode(['step' => 3, 'message' => 'CSVTransformer instantiated']) . "\n";
flush();
require_once __DIR__ . '/OMGService.php';
echo json_encode(['step' => 4, 'message' => 'OMGService required']) . "\n";
flush();
$omg = new OMGService();
echo json_encode(['step' => 5, 'message' => 'OMGService instantiated']) . "\n";
flush();
require_once __DIR__ . '/EmailService.php';
echo json_encode(['step' => 6, 'message' => 'EmailService required']) . "\n";
flush();
$email = new EmailService();
echo json_encode([
'success' => true,
'message' => 'All services loaded successfully'
]);
} catch (Exception $e) {
http_response_code(500);
echo json_encode([
'success' => false,
'error' => $e->getMessage(),
'file' => $e->getFile(),
'line' => $e->getLine(),
'trace' => $e->getTraceAsString()
]);
}