PHPackages                             yd-shomer/php-shomer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. yd-shomer/php-shomer

ActiveLibrary[Database &amp; ORM](/categories/database)

yd-shomer/php-shomer
====================

SQL Query Guardian (שומר) - Runtime validation and security for PHP development

v1.0.0(6mo ago)10MITPHPPHP &gt;=7.4

Since Dec 22Pushed 6mo agoCompare

[ Source](https://github.com/yd-shomer/php-shomer)[ Packagist](https://packagist.org/packages/yd-shomer/php-shomer)[ Docs](https://github.com/yd-shomer/php-shomer)[ RSS](/packages/yd-shomer-php-shomer/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

🛡️ PHP Shomer (שומר)
====================

[](#️-php-shomer-שומר)

 [![](https://camo.githubusercontent.com/b003158929a48c71a550717bfd77b9e994352d0c34e1bb48e5e2e96d5b801269/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f79642d73686f6d65722f7068702d73686f6d65723f7374796c653d736f6369616c)](https://camo.githubusercontent.com/b003158929a48c71a550717bfd77b9e994352d0c34e1bb48e5e2e96d5b801269/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f79642d73686f6d65722f7068702d73686f6d65723f7374796c653d736f6369616c) [![Version](https://camo.githubusercontent.com/f2b640c061cb7c400a0b82bf3bbccb33f9a3018031f0359cf998d8b80339c230/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f79642d73686f6d65722f7068702d73686f6d65722e737667)](https://camo.githubusercontent.com/f2b640c061cb7c400a0b82bf3bbccb33f9a3018031f0359cf998d8b80339c230/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f79642d73686f6d65722f7068702d73686f6d65722e737667) [![Downloads](https://camo.githubusercontent.com/ad8d72faaa24bafbc292214d85d3b811ea4434d8e67b230f35fe566c9240e4ce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f79642d73686f6d65722f7068702d73686f6d65722e737667)](https://camo.githubusercontent.com/ad8d72faaa24bafbc292214d85d3b811ea4434d8e67b230f35fe566c9240e4ce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f79642d73686f6d65722f7068702d73686f6d65722e737667) [![License](https://camo.githubusercontent.com/f289cd4c5dfbc2833916cd5554661fe02b8111c21f8cc9cd6aff91ffce195f6e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f79642d73686f6d65722f7068702d73686f6d65722e737667)](https://camo.githubusercontent.com/f289cd4c5dfbc2833916cd5554661fe02b8111c21f8cc9cd6aff91ffce195f6e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f79642d73686f6d65722f7068702d73686f6d65722e737667) [![](https://camo.githubusercontent.com/d8b48b4f8fa760fd92a16339b9be728f51c8b5c9933fad4e8c890a26a5a23aa9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636c6f6e65732d34302b2d677265656e)](https://camo.githubusercontent.com/d8b48b4f8fa760fd92a16339b9be728f51c8b5c9933fad4e8c890a26a5a23aa9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636c6f6e65732d34302b2d677265656e) [![PHP Version](https://camo.githubusercontent.com/b43c9d6cd8939c4868f963284928566c4c35dd2da0725c027f95a3d62f2f0329/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e342532422d626c75652e737667)](https://camo.githubusercontent.com/b43c9d6cd8939c4868f963284928566c4c35dd2da0725c027f95a3d62f2f0329/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e342532422d626c75652e737667)

> **Shomer** (שומר) means "Guardian" in Hebrew

**Your SQL Query Guardian** - Runtime validation and security for PHP development. Catch SQL errors and security issues before they reach production.

🎯 Why "Shomer"?
---------------

[](#-why-shomer)

French citation : "Il ne dort ni ne sommeille le Gardien ..."

Just as a guardian protects and watches over, **Shomer** vigilantly protects your application by validating SQL queries during development, catching errors and security issues before they reach production.

In the Hebrew tradition, a *Shomer* (שומר) is a vigilant guardian who watches and protects. PHP Shomer applies this same vigilance to your SQL queries, acting as a silent guardian during development, ready to alert you at the slightest danger.

✨ Features
----------

[](#-features)

- 🛡️ **Guards** against SQL injection patterns
- 👁️ **Watches** for syntax errors
- ⚔️ **Protects** with prepared statement validation
- 📧 **Alerts** via email for critical issues
- 🎓 **Teaches** best practices
- 💡 **Suggests** secure query fixes (verbose mode)
- 🚀 **Zero performance impact** in production
- 💯 **100% compatible** with PDO and MySQLi
- 📍 **Auto-captures execution context** (file, line, URL, function) for instant debugging

📦 Installation
--------------

[](#-installation)

```
composer require yd-shomer/php-shomer
```

🚀 Quick Start
-------------

[](#-quick-start)

```
