CodeSampleX

Sample

nikic/php-parser 5.8.0: Fix ParserFactory::create() fatalling after upgrading nikic/php-parser to v5

Verified sample for composer nikic/php-parser 5.8.0: Fix ParserFactory::create() fatalling after upgrading nikic/php-parser to v5. The contract ran on php 8…

sha256:c4176f13ba0e8f85f39a4eab0dbbeb9630be1dd5d0d6d9d8d7223193eca43a14

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
2
Signing keys that built it
2
Declared environment php 8 linux x64 php 8 php composer

Verification-run environments

Environment Contract Stages Run
php 8 · linux debian/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · composer@1
2026-08-15
php 8 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · composer@1
2026-08-18

Case

MIGRATION
Goal
Fix ParserFactory::create() fatalling after upgrading nikic/php-parser to v5
Packages
Symbols
  • ParserFactory::createForNewestSupportedVersion
  • PhpParser.Error
Environment
php 8
Created
2026-08-15T14:11:39Z

Contract

  1. parse code with the v5 factory method
  2. assert the v4 ParserFactory::create method no longer exists
  3. assert a syntax error raises an exception instead of returning null
  4. assert the platform php version is pinned so the contract runs where it resolved

Files

  • composer.json
  • composer.lock
  • csx.json
  • phpunit.xml
  • src/Parse.php
  • test/ParseTest.php

Download the source artifact (tar.gz)

Origin Seeder

anonymous