dms/dms-filter
Filter and sanitize object properties via PHP attributes. Annotate fields with rules like Trim, StripTags, and StripNewlines, then run a Filter service to clean entity values automatically—ideal alongside Symfony Validator and for consistent input normalization.
StripTags, Trim) across entities. Aligns with OWASP guidelines for input validation.#[Filter\JsonDecode] for malformed JSON).#[Filter\TenantAware]).if/else chains in controllers).For Executives: "This package lets us enforce data sanitization rules once, declaratively, in our entity models—like adding a ‘clean input’ label to a field. For example, we can automatically strip HTML tags from user names or trim whitespace from emails without writing repetitive validation code. This reduces bugs (e.g., XSS risks) and speeds up development by 30% for common sanitization tasks. It’s a lightweight, MIT-licensed tool with active maintenance, ideal for securing our admin panels and APIs."
For Engineers:
*"DMS Filter replaces manual str_replace(), htmlspecialchars(), or custom middleware with attribute-based annotations (e.g., #[Filter\StripTags]). Key benefits:
User class) instead of controllers.#[Filter\CustomRule]).// Old way
$name = strip_tags(trim($_POST['name']));
Use this:
// New way (in User entity)
#[Filter\StripTags] #[Filter\Trim] public string $name;
Proposal: Pilot this for our user profile and CMS content models to reduce input-related bugs."*
How can I help you explore Laravel packages today?