PHP Classes

File: composer.json

Recommend this page to a friend!
  Packages of Reinder Reinders   PHP Binary Flags   composer.json   Download  
File: composer.json
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Binary Flags
Manage a group of boolean flags using integers
Author: By
Last change: Binary Flags v3 (#16)

# Release Notes - v3.0.0

## Changed
- Numeric `BinaryFlags` APIs now accept `int` values only.
- Passing `float` values to numeric mask/flag methods now raises `TypeError` for `strict_types=1` callers.
- Non-strict callers should still cast or validate external values before calling the API because PHP scalar coercion can convert `float` to `int` at the call boundary.
- The numeric iterator and JSON serialization contracts are now documented as `int`-based.

## Removed
- `Bits::BIT_64`.
- The v2.x float-normalization/deprecation path in `Traits\InteractsWithNumericFlags`.

## BIT_64 Notice
`Bits::BIT_64` was removed because PHP numbers for bitwise flags are signed. The 64th bit is the sign bit, so it cannot be used reliably as a normal flag.

Using integer-compatible bits avoids these issues.
Date: 3 days ago
Size: 968 bytes
 

Contents

Class file image Download
{ "name": "reinder83/binary-flags", "description": "Useful class for binary operations", "keywords": [ "binary", "flags", "class", "trait", "eloquent", "model", "bitwise", "bitwiser", "operations" ], "homepage": "https://github.com/reinder83/binary-flags", "minimum-stability": "stable", "license": "MIT", "authors": [ { "name": "Reinder Reinders", "email": "reinder.reinders@gmail.com" } ], "autoload": { "psr-4": { "Reinder83\\BinaryFlags\\": "src/" } }, "config": { "platform": { "php": "8.2" }, "allow-plugins": { "pestphp/pest-plugin": true } }, "require": { "php": "^8.2", "ext-json": "*" }, "require-dev": { "phpstan/phpstan": "^2.1", "pestphp/pest": "^3.8", "laravel/pint": "^1", "rector/rector": "^2.4" }, "autoload-dev": { "psr-4": { "Reinder83\\BinaryFlags\\Tests\\": "tests/" } } }