Download the PHP package maatify/common without Composer

On this page you can find all versions of the php package maatify/common. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package common

**Maatify.dev**


๐Ÿ“ฆ maatify/common

Version PHP

Build PHPStan Code Quality

Monthly Downloads Total Downloads Stars


๐Ÿ Stable Release v2.0.0 โ€” Architectural Cleanup & Scope Stabilization

The core foundational library of the Maatify.dev ecosystem providing standardized DTOs, validation, sanitization, date/time, text utilities, and shared core helpers.

๐Ÿ“ฆ This is the stable version (v1.0.10) of maatify/common, released on 2025-12-09. ๐Ÿ”— ุจุงู„ุนุฑุจูŠ ๐Ÿ‡ธ๐Ÿ‡ฆ


๐Ÿงญ Version Information

Key Value
Version 2.0.0 Stable
Release Date 2025-12-17
PHP Requirement โ‰ฅ 8.2
License MIT
Coverage 98 %
Tests Passed 70+ (160+ Assertions)

๐Ÿงฉ Overview

This library provides reusable, framework-agnostic building blocks (DTOs, helpers, traits, enums, validators) shared across the Maatify ecosystem.


๐Ÿ“˜ Documentation & Release Files

File Description
/docs/README.full.md Full documentation (Phases 1โ€“13)
/docs/enums.md Enums & constants reference
CHANGELOG.md Version history (updated to 2.0.0)
CONTRIBUTING.md Contribution guidelines
VERSION Current version โ†’ 2.0.0

Core Modules:


โš ๏ธ Design Scope Notice

maatify/common is intentionally limited to pure helpers, DTOs, traits, enums, and shared utilities.

It contains no adapters, repositories, drivers, storage contracts, or IO-related abstractions. Any such responsibilities belong to dedicated infrastructure packages.

โš™๏ธ Installation

`


๐Ÿ“ฆ Dependencies

This library directly relies on:

Dependency Purpose Link
ezyang/htmlpurifier Secure HTML/XSS sanitization engine github.com/ezyang/htmlpurifier
psr/log Standardized PSR-3 logging interface www.php-fig.org/psr/psr-3
phpunit/phpunit Unit testing framework (development only) phpunit.de

maatify/common integrates these open-source libraries to deliver a consistent and secure foundation for all other Maatify components.

๐Ÿง  Note: maatify/common automatically configures HTMLPurifier to use an internal cache directory at storage/purifier_cache for optimized performance. This ensures faster sanitization on subsequent calls without requiring manual setup.

If you wish to override the cache path, set the environment variable:

or modify it programmatically via:


๐Ÿง  SingletonTrait

A clean, PSR-friendly Singleton implementation to manage single-instance service classes safely.

๐Ÿ”น Example Usage

โœ… Features


๐Ÿ“š Example Usage

๐Ÿ”น Paginate Array Data

Output:


๐Ÿ”น Working with PaginationDTO


๐Ÿงฉ Helpers

๐Ÿงฑ TapHelper

A lightweight, fluent utility for executing a callback on a given value (usually an object) and returning that same value unchanged โ€”
perfect for cleaner object initialization and inline setup.


โš™๏ธ Class

Maatify\Common\Helpers\TapHelper

โœ… Features


๐Ÿง  Example Usage

`


๐Ÿงพ Functional Philosophy

TapHelper follows a simple, expressive pattern inspired by functional programming:

Principle Description
๐Ÿงฉ Isolation The callback runs in isolation, returning no value.
๐Ÿ” Immutability The original object/value is returned unchanged.
๐Ÿงผ Clarity Reduces boilerplate for setup code.
๐Ÿง  Testability Simple to reason about and unit-test (see TapHelperTest).

๐Ÿงช Unit Test Reference

tests/Helpers/TapHelperTest.php

Covers:


๐Ÿงฑ Code Reference

Executes $callback($value) then returns $value.


๐Ÿงฉ Architectural Benefits within the Maatify Ecosystem

Aspect Benefit
โ™ป๏ธ Fluent Initialization Enables building adapters and services in one clean line.
๐Ÿง  Ecosystem Consistency Aligns with other helpers like PathHelper, EnumHelper, and TimeHelper.
๐Ÿงผ Reduced Boilerplate Replaces multiple setup lines with a single expressive call.
๐Ÿงฉ Universal Reusability Works seamlessly across all Maatify libraries (bootstrap, data-adapters, rate-limiter, redis-cache, etc.).

๐Ÿ“˜ Full Documentation: docs/enums.md


๐Ÿ—‚ Directory Structure


๐Ÿ“š Built Upon

maatify/common proudly builds upon several mature and battle-tested open-source foundations:

Library Description Usage in Project
ezyang/htmlpurifier Standards-compliant HTML filtering library Powers InputSanitizer to ensure XSS-safe and standards-compliant HTML output with full Unicode support.
psr/log PSR-3 logging interface Enables standardized logging across sanitization, and validation components.
phpunit/phpunit PHP unit testing framework Provides automated testing with CI/CD GitHub workflow integration.

Huge thanks to the open-source community for their contributions, making the Maatify ecosystem secure, reliable, and extensible. โค๏ธ


โœ… ๐Ÿ“Š Updated Phase Summary Table (Phases 1 โ†’ 18)

Phase Title Status Files Created Notes
1 Pagination Module โœ… Completed 3 Pagination DTOs & helpers
3 Security & Input Sanitization โœ… Completed 3 InputCleaner, HTMLPurifier wrapper, XSS-safe normalizers
3b Core Traits โ€” Singleton System โœ… Completed 1 SingletonTrait implementation
4 Text & Placeholder Utilities โœ… Completed 8 PlaceholderRenderer, TextFormatter, RegexHelper, SecureCompare
5 Date & Time Utilities โœ… Completed 4 HumanizeDifference, LocalizedDateFormatter, Timestamp helpers
6 Validation & Filtering Tools โœ… Completed 3 Validator, Filter, ArrayHelper + full PHPUnit suite
7 Enums & Constants Standardization โœ… Completed 10 + 5 tests Unified Enum system, EnumHelper, JSONSerializableTrait, ValueEnum base
8 Testing & Release (v1.0.0) โœ… Completed 6 CHANGELOG, CONTRIBUTING, VERSION, README.full.md, CI integration, initial stable release
10 TapHelper Utility โœ… Completed 1 Introduced TapHelper + full test coverage
12 Version Hotfix โœ… Completed 1 Fixed version mismatch and updated VERSION file

โœ… Verified Test Results

PHPUnit 10.5.58 โ€” PHP 8.4.4
โ€ข Tests: 66 โ€ข Assertions: 150 โ€ข Coverage: ~98 %
โ€ข Runtime: 0.076 s โ€ข Memory: 12 MB
โ€ข Warnings: 1 (No coverage driver available โ€” safe to ignore)


All files have been verified and finalized as part of v2.0.0 Stable Release.


๐Ÿ”— Full documentation & release notes: see /docs/README.full.md

๐Ÿชช License

Maatify.dev
Youโ€™re free to use, modify, and distribute this library with attribution.


๐Ÿงฑ Authors & Credits

This library is part of the Maatify.dev Core Ecosystem, designed and maintained under the technical supervision of:

๐Ÿ‘ค Mohamed Abdulalim โ€” Backend Lead & Technical Architect
Lead architect of the Maatify Backend Infrastructure, responsible for the overall architecture, core library design,
and technical standardization across all backend modules within the Maatify ecosystem.
๐Ÿ”— www.Maatify.dev | โœ‰๏ธ [email protected]

๐Ÿค Contributors:
The Maatify.dev Engineering Team and open-source collaborators who continuously help refine, test, and extend
the capabilities of this library across multiple Maatify projects.

๐Ÿงฉ This project represents a unified engineering effort led by Mohamed Abdulalim, ensuring every Maatify backend component
shares a consistent, secure, and maintainable foundation.


Built with โค๏ธ by Maatify.dev โ€” Unified Ecosystem for Modern PHP Libraries



All versions of common with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-mbstring Version *
ext-intl Version *
ezyang/htmlpurifier Version ^4.19
maatify/psr-logger Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package maatify/common contains the following files

Loading the files please wait ...