🛡️ Introducing YD Shomer - The Guardian's Hand for PHP
I just released YD Shomer, a runtime SQL validator that catches security issues during development and teaches developers secure coding practices.
🔤 The Name
- YD (י) - Yod, the Hebrew letter symbolizing divine protection
- Shomer (שומר) - Guardian in Hebrew
- The Guardian's Hand - Protection through vigilance
⚡ Quick Example
use Shomer\QueryValidator;
define('SHOMER_ENABLED', true);
// This will trigger a warning
$report = QueryValidator::validate([
'sql' => "DELETE FROM users", // Missing WHERE!
'params' => []
], $verbose = true);
// Shomer provides:
// ❌ Error detected
// 📍 Exact location: file.php line 42
// 💡 Suggested fix: "DELETE FROM users WHERE id = ?"
// 📧 Email alert sent
✨ Key Features
Security First:
- Detects SQL injection vulnerabilities
- Validates prepared statements
- Checks parameter counts and types
Developer Experience:
- Auto-captures execution context (file, line, URL)
- Provides secure query suggestions
- Educational approach
Production Ready:
- Zero overhead when disabled
- Instant bypass
- No performance impact
🎯 Perfect For
- Learning secure SQL practices
- Code reviews
- Onboarding junior developers
- Refactoring legacy code
- Development environments
📦 Installation
composer require yd-shomer/php-shomer
🔗 Links
- GitHub: yd-shomer/php-shomer
- Packagist: yd-shomer/php-shomer
- Website: yd-shomer.com
💬 Feedback Welcome!
This is my first open-source project. I'd love to hear your thoughts, suggestions, and contributions!
Protected by the Guardian's Hand 🛡️
Top comments (0)