Add yakpro-po for code obfuscation and configuration for Laravel 5.0
Some checks failed
Deploy Development / deploy (push) Failing after 54s

This commit is contained in:
Frank John Begornia
2025-12-18 14:24:24 +08:00
parent e6ffc878dd
commit 89201a8432
2 changed files with 69 additions and 0 deletions

54
yakpro-po.cnf Normal file
View File

@@ -0,0 +1,54 @@
<?php
// yakpro-po configuration for Laravel 5.0
$conf = new StdClass;
// Directories to obfuscate (relative to project root)
$conf->t_directories = [
'app'
];
// Directories/files to skip
$conf->t_skip = [
'vendor',
'storage',
'bootstrap',
'config',
'database',
'public',
'resources',
'tests',
'.env',
'.env.example',
'artisan',
'server.php'
];
// Obfuscation options
$conf->obfuscate_string_literal = false; // Don't obfuscate strings (can break Laravel)
$conf->obfuscate_function_name = true; // Obfuscate function names
$conf->obfuscate_class_name = true; // Obfuscate class names (except Laravel core)
$conf->obfuscate_variable_name = true; // Obfuscate variable names
$conf->obfuscate_property_name = true; // Obfuscate property names
$conf->obfuscate_class_constant_name = true;
$conf->obfuscate_constant_name = true;
$conf->obfuscate_namespace_name = false; // Keep namespaces readable
$conf->obfuscate_label_name = true;
// Keep Laravel framework methods/classes readable
$conf->t_ignore_constants = ['APP_ENV', 'APP_DEBUG', 'APP_URL', 'APP_KEY'];
$conf->t_ignore_methods = [
'__construct', '__destruct', '__call', '__get', '__set',
'boot', 'register', 'handle', 'middleware', 'authorize'
];
// Scrambler mode
$conf->scrambler = true;
// Allow multiple PHP versions
$conf->allow_and_operator = true;
// Output directory (will be overridden in command)
$conf->t_dir = null;
return $conf;