PHPackages                             ilham/sql-error-masker - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ilham/sql-error-masker

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ilham/sql-error-masker
======================

Framework-agnostic SQL error masking and classification.

v0.0.1(9mo ago)12MITPHPPHP &gt;=8.1

Since Aug 12Pushed 9mo agoCompare

[ Source](https://github.com/ilhammmaulana/sql-error-masker)[ Packagist](https://packagist.org/packages/ilham/sql-error-masker)[ RSS](/packages/ilham-sql-error-masker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

SQL Error Masker
================

[](#sql-error-masker)

A framework-agnostic PHP library to detect, classify, and **mask** SQL error messages protecting logs and users while preserving useful debug context.

Features
--------

[](#features)

- Identify SQLSTATE &amp; vendor-specific error codes
- Classify errors by type (schema/data/query/connection) and severity
- Mask sensitive data (table names, column values, UUIDs, file paths)
- Boolean helpers (`isDuplicateData`, `isResourceNotFound`, etc.)
- Multiple log levels (`debug`, `info`, `warning`, `error`)
- Works in **any PHP project** and integrates easily with **Laravel** or **CodeIgniter**

Installation
------------

[](#installation)

```
composer require ilham/sql-error-masker
```

Usage
-----

[](#usage)

### 1. PHP Native Example

[](#1-php-native-example)

```
