PHPackages                             webeweb/traits-library - 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. webeweb/traits-library

Abandoned → [webeweb/core-library](/?search=webeweb%2Fcore-library)ArchivedLibrary

webeweb/traits-library
======================

Traits collection

v2.0.0(4y ago)11.8k11MITPHPPHP ^7.1|^8.0

Since Jun 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/webeweb/traits-library)[ Packagist](https://packagist.org/packages/webeweb/traits-library)[ Docs](https://github.com/webeweb/traits-library)[ RSS](/packages/webeweb-traits-library/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (1)

traits-library
==============

[](#traits-library)

[![Build Status](https://camo.githubusercontent.com/1eece90bbf7b3c68e0427f088144de6c0246fe26829f87bc93b505d38d73e087/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f776562657765622f7472616974732d6c6962726172792f6275696c643f7374796c653d666c61742d737175617265)](https://github.com/webeweb/traits-library/actions)[![Coverage Status](https://camo.githubusercontent.com/8b7faa604d6b72f3bf1583ac5257ada4a3c4bbee60b8effd863f84fa23936738/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6769746875622f776562657765622f7472616974732d6c6962726172792f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/github/webeweb/traits-library?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/1eb723c8dd976f43f7aa6375341ded099dabad3e3f6b2e3df25ed179ed5d23dc/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f776562657765622f7472616974732d6c6962726172792f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/webeweb/traits-library/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/522d1d55b7ef6bfef2037cca3f115422959e2fd84185ba23847cce47e253d900/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f776562657765622f7472616974732d6c6962726172792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/webeweb/traits-library)[![Latest Unstable Version](https://camo.githubusercontent.com/c69a7bcdb962055a2f2e7734ad02acb23f0e49573170a75fe3f90c69225f2a3b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f776562657765622f7472616974732d6c6962726172792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/webeweb/traits-library)[![License](https://camo.githubusercontent.com/0b462d50f943abd9f0b48e54fdb4e5b0445e2b7933f7f2d816e4960065e62107/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f776562657765622f7472616974732d6c6962726172792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/webeweb/traits-library)[![composer.lock](https://camo.githubusercontent.com/7de7a804bd6140ed9930c0194534e58bc53b1fcdc260d727baae460969a1f285/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2e6c6f636b2d756e636f6d6d697465642d696d706f7274616e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/webeweb/traits-library)

Traits library contains a useful traits collection

> IMPORTANT NOTICE: This package is no longer maintained and its classes have been migrated into package "core-library" (available into version up to 8.0.0 and more) [Core library](https://github.com/webeweb/core-library/)

If you like this package, pay me a beer (or a coffee) [![paypal.me](https://camo.githubusercontent.com/792daa86a939b21089cfef57177a6331ffe4bb93d6cb6f90cb8e42446cc30941/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70617970616c2e6d652d776562657765622d3030373062612e7376673f7374796c653d666c61742d737175617265266c6f676f3d70617970616c)](https://www.paypal.me/webeweb)

Compatibility
-------------

[](#compatibility)

[![PHP](https://camo.githubusercontent.com/16c3671e1c89cc0d1d0abe984448643acee7d49b55db094766e5a830e43665fd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f776562657765622f7472616974732d6c6962726172792e7376673f7374796c653d666c61742d737175617265)](http://php.net)

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

[](#installation)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this package:

```
$ composer require webeweb/traits-library
```

This command requires you to have Composer installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md) of the Composer documentation.

Usage
-----

[](#usage)

Read the [documentation](doc/index.md).

Testing
-------

[](#testing)

To test the package, is better to clone this repository on your computer. Open a command console and execute the following commands to download the latest stable version of this package:

```
$ git clone https://github.com/webeweb/traits-library.git
$ cd traits-library
$ composer install
```

Once all required libraries are installed then do:

```
$ vendor/bin/phpunit
```

License
-------

[](#license)

`traits-library` is released under the MIT License. See the bundled [LICENSE](LICENSE)file for details.

Donate
------

[](#donate)

If you like this work, please consider donating at [![paypal.me](https://camo.githubusercontent.com/792daa86a939b21089cfef57177a6331ffe4bb93d6cb6f90cb8e42446cc30941/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70617970616c2e6d652d776562657765622d3030373062612e7376673f7374796c653d666c61742d737175617265266c6f676f3d70617970616c)](https://www.paypal.me/webeweb)

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~14 days

Total

4

Last Release

1733d ago

Major Versions

v1.2.0 → v2.0.02021-08-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/3af0f8a26f2253921537f363ec984cd5a459cf3f0b3cec0bc70bdb8d8c723612?d=identicon)[webeweb](/maintainers/webeweb)

---

Top Contributors

[![webeweb](https://avatars.githubusercontent.com/u/32354830?v=4)](https://github.com/webeweb "webeweb (149 commits)")

---

Tags

libraryphptraitswebewebstringlibrarydatetimeintegertraitsfloatwebewebboolean

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/webeweb-traits-library/health.svg)

```
[![Health](https://phpackages.com/badges/webeweb-traits-library/health.svg)](https://phpackages.com/packages/webeweb-traits-library)
```

###  Alternatives

[nette/utils

🛠 Nette Utils: lightweight utilities for string &amp; array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.

2.1k394.3M1.5k](/packages/nette-utils)[cviebrock/eloquent-typecast

Trait for Eloquent models to force type-casting on retrieved values

2468.0k](/packages/cviebrock-eloquent-typecast)[danielstjules/php-pretty-datetime

Generates human-readable strings for PHP DateTime objects

5791.9k](/packages/danielstjules-php-pretty-datetime)[ionux/phactor

Phactor is a high-performance PHP implementation of the elliptic curve math functions required to generate &amp; verify private/public (asymmetric) EC keypairs and ECDSA signatures based on secp256k1 curve parameters. This library also includes a class to generate Service Identification Numbers (SINs) based on the published Identity Protocol v1 spec.

5275.0k30](/packages/ionux-phactor)[runz0rd/mapper-php

Model mapping, unmapping and validation

17451.9k2](/packages/runz0rd-mapper-php)[danog/phpstruct

PHP implementation of python's struct module.

1110.1k](/packages/danog-phpstruct)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
