awesome-repositories.com
Blog
awesome-repositories.com

Descubre los mejores repositorios open-source con nuestra búsqueda potenciada por IA.

ExplorarBúsquedas curadasAlternativas open-sourceSoftware autohospedableBlogMapa del sitio
ProyectoAcerca deCómo clasificamosPrensaServidor MCP
Aviso legalPrivacidadTérminos
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
webmozarts avatar

webmozarts/assert

0
View on GitHub↗
7,648 estrellas·161 forks·PHP·MIT·5 vistas

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.

Historial de estrellas

Gráfico del historial de estrellas de webmozarts/assertGráfico del historial de estrellas de webmozarts/assert

Búsqueda con IA

Explora más repositorios increíbles

Describe lo que necesitas en lenguaje sencillo: la IA clasifica miles de proyectos open-source curados por relevancia.

Start searching with AI

Alternativas open-source a Assert

Proyectos open-source similares, clasificados según cuántas características comparten con Assert.
  • open-circle/valibotAvatar de open-circle

    open-circle/valibot

    8,769Ver en GitHub↗

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

    TypeScriptbundle-sizemodularparsing
    Ver en GitHub↗8,769
  • arasatasaygin/is.jsAvatar de arasatasaygin

    arasatasaygin/is.js

    9,078Ver en GitHub↗

    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
    Ver en GitHub↗9,078
  • arktypeio/arktypeAvatar de arktypeio

    arktypeio/arktype

    7,780Ver en GitHub↗

    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
    Ver en GitHub↗7,780
  • julian/jsonschemaAvatar de Julian

    Julian/jsonschema

    4,951Ver en GitHub↗

    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
    Ver en GitHub↗4,951
Ver las 30 alternativas a Assert→

Preguntas frecuentes

¿Qué hace 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.

¿Cuáles son las características principales de webmozarts/assert?

Las características principales de webmozarts/assert son: Data Type Validation, Input Validation, Bulk Element Validation, PHP Validation Libraries, Runtime Data Validation, Array Schema Validation, Defensive Programming Toolkits, Regex Pattern Validators.

¿Qué alternativas de código abierto existen para webmozarts/assert?

Las alternativas de código abierto para webmozarts/assert incluyen: 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…