awesome-repositories.com
Blog
awesome-repositories.com

Entdecke die besten Open-Source-Repositories mit KI-gestützter Suche.

EntdeckenKuratierte SuchenOpen-Source-AlternativenSelf-hosted SoftwareBlogSitemap
ProjektÜber unsRanking-MethodikPresseMCP-Server
RechtlichesDatenschutzAGB
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
webmozarts avatar

webmozarts/assert

0
View on GitHub↗
7,648 Stars·161 Forks·PHP·MIT·3 Aufrufe

Assert

This PHP assertion library is a runtime data validator used to verify method inputs and outputs. It provides a toolkit for validating data types, numeric ranges, and string patterns during program execution to prevent invalid states.

The project serves as a static analysis helper by providing type hints and annotations that improve the accuracy of formal verification tools. It includes a collection validation utility for applying rules across arrays or iterable collections, and a filesystem validation tool to verify path existence and read or write permissions.

The library covers a broad range of validation capabilities, including object structure inspection, function behavior verification, and array structure validation. It also supports custom assertion logic and deferred error message computation.

Features

  • Data Type Validation - Verifies that values match specific types or class instances and throws exceptions upon failure.
  • Input Validation - Provides comprehensive logic for validating that method arguments and return values meet specific correctness criteria.
  • Bulk Element Validation - Provides utilities to apply a single assertion logic across every element within arrays or iterable collections.
  • PHP Validation Libraries - Provides a comprehensive set of runtime validation and assertion tools specifically for the PHP runtime.
  • Runtime Data Validation - Verifies data types, numeric ranges, and string patterns during execution to prevent invalid application states.
  • Array Schema Validation - Includes checks to verify array keys, element counts, and whether collections are sequential or associative.
  • Defensive Programming Toolkits - Implements defensive programming workflows by validating types and numeric ranges before data processing.
  • Regex Pattern Validators - Provides utilities that use regular expressions to validate string formats such as emails and UUIDs.
  • Static Analysis Annotations - Provides type hints and annotations that improve the accuracy of external static analysis tools for formal verification.
  • Numeric Range Assertions - Provides assertions to confirm that integers fall within specific bounds, including positive and negative ranges.
  • Collection Condition Assertions - Enables running a single validation predicate against every individual element within an array or iterable collection.
  • Value Property Assertions - Provides a set of checks to verify conditions such as equality, nullability, and numeric range boundaries.
  • String Format Validators - Verifies that strings match standard formats like emails and UUIDs using regular expressions.
  • Object Inspection Tools - Confirms the existence of specific classes, interfaces, methods, or properties within an object definition.
  • Static Analysis Helpers - Offers assertions and annotations that provide accurate type hinting for static analysis tools.
  • Assertion Hierarchies - Uses a base assertion class hierarchy to provide reusable validation logic across various data types.
  • Validation Execution Guards - Provides execution guards that skip validation checks when inputs are null to support optional data fields.
  • Static Type Assertions - Provides type hints and assertions that assist static analysis tools in detecting type mismatches during development.
  • Runtime Contract Enforcement - Provides runtime verification to ensure incoming data structures and object properties match expected API formats.
  • Class Property Validation - Verifies the existence of specific methods or properties and checks if class properties have been initialized.
  • Bulk Element Validation - Includes a utility for applying the same validation logic to every element within an array or iterable collection.
  • Path Permission Validation - Ensures a filesystem path exists and possesses specific permissions, such as being a readable file or writable directory.
  • Optional Field Guards - Allows validation checks to be executed only when a provided value is not null, supporting optional fields.
  • Validation Error Customizations - Provides mechanisms for developers to define custom logic for reporting specific failure details during validation.
  • Custom Assertions - Allows the creation of specialized validation rules by extending the base assertion class.
  • Type Inference Support - Passes type inference and annotations to external tools to improve code safety and formal verification.

Star-Verlauf

Star-Verlauf für webmozarts/assertStar-Verlauf für webmozarts/assert

KI-Suche

Entdecke weitere awesome Repositories

Beschreibe in einfachen Worten, was du brauchst — die KI bewertet tausende kuratierte Open-Source-Projekte nach Relevanz.

Start searching with AI

Häufig gestellte Fragen

Was macht webmozarts/assert?

This PHP assertion library is a runtime data validator used to verify method inputs and outputs. It provides a toolkit for validating data types, numeric ranges, and string patterns during program execution to prevent invalid states.

Was sind die Hauptfunktionen von webmozarts/assert?

Die Hauptfunktionen von webmozarts/assert sind: Data Type Validation, Input Validation, Bulk Element Validation, PHP Validation Libraries, Runtime Data Validation, Array Schema Validation, Defensive Programming Toolkits, Regex Pattern Validators.

Welche Open-Source-Alternativen gibt es zu webmozarts/assert?

Open-Source-Alternativen zu webmozarts/assert sind unter anderem: open-circle/valibot — Valibot is a modular, type-safe schema library for validating and parsing structural data in TypeScript environments. arasatasaygin/is.js — is.js is a JavaScript validation library and data type checker. It provides a suite of utilities to verify whether… julian/jsonschema — This project is a Python implementation of the JSON Schema specification, providing a library for verifying that data… arktypeio/arktype — Arktype is a TypeScript runtime validation library and schema orchestrator. It synchronizes TypeScript types with… thomhurst/tunit — TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source… aws-powertools/powertools-lambda-python — AWS Powertools for Python is a utility framework designed for building production-ready Python functions on AWS…

Open-Source-Alternativen zu Assert

Ähnliche Open-Source-Projekte, sortiert nach der Anzahl der gemeinsamen Funktionen mit Assert.
  • open-circle/valibotAvatar von open-circle

    open-circle/valibot

    8,769Auf GitHub ansehen↗

    Valibot is a modular, type-safe schema library for validating and parsing structural data in TypeScript environments.

    TypeScriptbundle-sizemodularparsing
    Auf GitHub ansehen↗8,769
  • arasatasaygin/is.jsAvatar von arasatasaygin

    arasatasaygin/is.js

    9,078Auf GitHub ansehen↗

    is.js is a JavaScript validation library and data type checker. It provides a suite of utilities to verify whether variables are primitives, arrays, functions, or specific object types. The project allows for the implementation of custom validation logic and the use of naming namespaces to override default rules and regular expressions. It covers a broad range of validation capabilities, including numeric arithmetic properties, date and time analysis for relative and absolute ranges, and string format verification for patterns such as emails, URLs, and IP addresses. The library also includes

    JavaScript
    Auf GitHub ansehen↗9,078
  • arktypeio/arktypeAvatar von arktypeio

    arktypeio/arktype

    7,780Auf GitHub ansehen↗

    Arktype is a TypeScript runtime validation library and schema orchestrator. It synchronizes TypeScript types with runtime data validation, allowing users to define type-safe schemas that ensure unknown data adheres to specific structures during application execution. The project distinguishes itself by using set-theory type analysis to determine intersections and subtype compatibility, alongside JIT-compiled validation functions for optimized performance. It supports advanced type modeling through branded type constraints, recursive alias resolution, and the ability to generate runtime valida

    TypeScriptjavascriptparsingruntime-typechecking
    Auf GitHub ansehen↗7,780
  • julian/jsonschemaAvatar von Julian

    Julian/jsonschema

    4,951Auf GitHub ansehen↗

    This project is a Python implementation of the JSON Schema specification, providing a library for verifying that data instances conform to defined schemas. It serves as a data validation framework capable of validating both the data itself and the schemas against official meta-schemas to ensure structural correctness. The library features a schema reference resolver that maps URIs to definitions, enabling the resolution of internal and remote references for modular schema management. It is designed for extensibility, allowing for the definition of custom keywords, custom type-checking logic,

    Python
    Auf GitHub ansehen↗4,951
  • Alle 30 Alternativen zu Assert anzeigen→