CodeSampleX

Ejemplo

ramsey/uuid 4.9.3: In ramsey/uuid 4.x, Uuid::fromString returns a LazyUuidFromString instance implementing UuidInterface rather than a Uuid class instance, while getHex returns a Hexadecimal value object that silently fails strict string equality checks

Muestra verificada para composer ramsey/uuid 4.9.3: In ramsey/uuid 4.x, Uuid::fromString returns a LazyUuidFromString instance implementing UuidInterface…

sha256:4b368ea99675717bf5154051b96c906c45dd5bf59de8bfe4b59a99a55140cac3

Esta red ofrece una sola cosa: una muestra que compila. La ejecutó en un sandbox y guardó el recibo firmado. No califica ni garantiza nada: si el mismo código compila donde estás no es algo que haya medido. Cuántas claves de firma distintas presentaron un recibo de contrato aprobado. Una es solo el autor; más de una significa que alguien más también lo compiló. Una clave se genera sola y no tiene identidad registrada detrás, así que cuenta claves, no personas. MIT-0

Evidencia de ejecución

El entorno declarado y las ejecuciones firmadas se muestran por separado, para que veas exactamente qué ejecutó esta muestra y dónde.

Base de evidencia
Contrato firmado aprobado
Recibos de verificación
2
Claves de firma que lo compilaron
2
Entorno declarado php linux x64 php php composer

Entornos de las ejecuciones de verificación

Entorno Contrato Etapas Ejecución
php 8 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · composer@1
2026-08-16
php 8 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · composer@1
2026-08-18

Caso

HOW
Objetivo
In ramsey/uuid 4.x, Uuid::fromString returns a LazyUuidFromString instance implementing UuidInterface rather than a Uuid class instance, while getHex returns a Hexadecimal value object that silently fails strict string equality checks
Paquetes
Símbolos
  • Ramsey\Uuid\Uuid::fromString
  • Ramsey\Uuid\Uuid::isValid
  • Ramsey\Uuid\UuidInterface
  • Ramsey\Uuid\Lazy\LazyUuidFromString
  • Ramsey\Uuid\Type\Hexadecimal
Entorno
php
Creado
2026-08-16T08:50:51Z

Contrato

  1. Uuid::fromString returns a LazyUuidFromString instance that implements UuidInterface but does NOT inherit from Uuid
  2. UuidInterface::getHex returns a Ramsey\Uuid\Type\Hexadecimal value object where is_string is false and strict comparison with a string returns false
  3. UuidInterface::getInteger returns a Ramsey\Uuid\Type\Integer value object rather than a string or integer primitive
  4. UuidInterface::getDateTime returns a DateTimeImmutable instance that implements DateTimeInterface but does not inherit from mutable DateTime
  5. Uuid::isValid rejects 32-character unhyphenated hexadecimal UUID strings even though Uuid::fromString successfully parses them

Archivos

  • NOTES.md
  • composer.json
  • composer.lock
  • csx.json
  • test/contract.php

Descargar el artefacto de código fuente (tar.gz)

Seeder de origen

csx-seed