Skip to content

Commit ee0c9d0

Browse files
committed
Validation & Filtering Utilities (v1.0)
1 parent 13715ed commit ee0c9d0

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,42 @@ composer require maatify/common
5151
````
5252

5353
---
54+
55+
## 📦 Dependencies
56+
57+
This library directly relies on:
58+
59+
| Dependency | Purpose | Link |
60+
|-------------------------|-------------------------------------------|--------------------------------------------------------------------------|
61+
| **ezyang/htmlpurifier** | Secure HTML/XSS sanitization engine | [github.com/ezyang/htmlpurifier](https://github.com/ezyang/htmlpurifier) |
62+
| **psr/log** | Standardized PSR-3 logging interface | [www.php-fig.org/psr/psr-3](https://www.php-fig.org/psr/psr-3/) |
63+
| **phpunit/phpunit** | Unit testing framework (development only) | [phpunit.de](https://phpunit.de) |
64+
65+
> `maatify/common` integrates these open-source libraries to deliver
66+
> a consistent and secure foundation for all other Maatify components.
67+
68+
> 🧠 **Note:**
69+
> `maatify/common` automatically configures **HTMLPurifier** to use an internal cache directory at
70+
> `storage/purifier_cache` for optimized performance.
71+
> This ensures faster sanitization on subsequent calls without requiring manual setup.
72+
>
73+
> If you wish to override the cache path, set the environment variable:
74+
>
75+
> ```bash
76+
> HTMLPURIFIER_CACHE_PATH=/path/to/custom/cache
77+
> ```
78+
>
79+
> or modify it programmatically via:
80+
>
81+
> ```php
82+
> $config->set('Cache.SerializerPath', '/custom/cache/path');
83+
> ```
84+
85+
---
86+
87+
88+
---
89+
5490
## 🧠 SingletonTrait
5591

5692
A clean, PSR-friendly Singleton implementation to manage single-instance service classes safely.
@@ -602,6 +638,22 @@ src/
602638
| 8 | Testing & Release | ⏳ Pending || Final coverage, CI, tagging, and documentation polish |
603639

604640

641+
---
642+
643+
644+
## 📚 Built Upon
645+
646+
`maatify/common` proudly builds upon several mature and battle-tested open-source foundations:
647+
648+
| Library | Description | Usage in Project |
649+
|-------------------------------------------------------------------|--------------------------------------------|-----------------------------------------------------------------------------------------------------------|
650+
| **[ezyang/htmlpurifier](https://github.com/ezyang/htmlpurifier)** | Standards-compliant HTML filtering library | Powers `InputSanitizer` to ensure XSS-safe and standards-compliant HTML output with full Unicode support. |
651+
| **[psr/log](https://www.php-fig.org/psr/psr-3/)** | PSR-3 logging interface | Enables standardized logging across sanitization, lock, and validation components. |
652+
| **[phpunit/phpunit](https://phpunit.de)** | PHP unit testing framework | Provides automated testing with CI/CD GitHub workflow integration. |
653+
654+
> Huge thanks to the open-source community for their contributions,
655+
> making the Maatify ecosystem secure, reliable, and extensible. ❤️
656+
605657
---
606658

607659
## 🪪 License

0 commit comments

Comments
 (0)