Repository navigation
validator/livr dev-master@abbe57e (PHP) fails LIVR test suite cases #33
Description
Hi @WebbyLab!
The LIVR test suite was extended, and validator/livr dev-master@abbe57e fails some of its cases. This is not a regression in your release: the test suite became stricter and found bugs in the implementation that need fixing.
The test suite results of all implementations are published on the official LIVR site, livr-spec.org/introduction/implementations.html, and updated automatically every week and whenever the specification changes.
Failing cases
-
expected errors {"field1":"FIELDS_NOT_EQUAL","field2":"FIELDS_NOT_EQUAL","field3":"FIELDS_NOT_EQUAL","same_number_exponent":"FIELDS_NOT_EQUAL","same_number_leading_zero":"FIELDS_NOT_EQUAL","same_number_space":"FIELDS_NOT_EQUAL","missing_other_field":"FIELDS_NOT_EQUAL","value_is_hash":"FORMAT_ERROR","value_is_empty_..., got {"field1":"FIELDS_NOT_EQUAL","field2":"FIELDS_NOT_EQUAL","field3":"FIELDS_NOT_EQUAL","missing_other_field":"FIELDS_NOT_EQUAL","value_is_hash":"FORMAT_ERROR","value_is_empty_hash":"FORMAT_ERROR","value_is_array":"FORMAT_ERROR","value_is_empty_array":"FORMAT_ERROR"} -
negative/21-list_of_different_objectsexception: TypeError: Cannot access offset of type array in isset or empty -
exception: TypeError: Cannot access offset of type array in isset or empty -
expected errors {"id1-1":"NOT_POSITIVE_INTEGER","id2-1":"NOT_POSITIVE_INTEGER","id3-1":"WRONG_EMAIL","id4-1":"CANNOT_BE_EMPTY","id4-2":"REQUIRED","products":[{"name":"REQUIRED","product_type":"NOT_ALLOWED_VALUE"},{"name":"REQUIRED"}]}, got {"id1-1":"NOT_POSITIVE_INTEGER","id2-1":"NOT_POSITIVE_INTEGER","id3-1":"WRONG_EMAIL","products":[{"product_type":"NOT_ALLOWED_VALUE","name":"REQUIRED"},{"name":"REQUIRED"}]}
2 more cases fail for documented reasons (platform limitations) and aren't counted, see the test suite results.
How it was tested
conformance/php/ installs validator/livr dev-master@abbe57e from packagist the way a user would and runs every test suite case against it. conformance/run.sh php repeats the run locally (needs Docker).
Get the test suite
The cases are in the test_suite/ directory of the LIVR repository; the format is described in Test suite. To replace your copy with the current one, run this in the directory that contains it:
rm -rf test_suite
curl -fsSL https://github.com/koorchik/LIVR/archive/refs/heads/master.tar.gz | tar -xz --strip-components=1 LIVR-master/test_suiteWhat's next
This issue is updated after every test suite run and closes by itself once all cases pass. If you think a case is wrong, please comment here.
If validator/livr is no longer maintained, please open an issue to remove it from the implementations list on livr-spec.org.
Updated by the test suite run of koorchik/LIVR on 2026-10-23.
Activity
koorchik commentedon Oct 26, 2026
An update: the failures listed here are already fixed on
master(#31). The last run testeddev-master@abbe57e, an older Packagist snapshot. Packagist now serves the currentmaster(93e31c9). The LIVR conformance harness gives 68/70 on it, and the two remaining cases are the documented PHP limitation ({}vs[]). So this issue should close by itself after the next conformance run, and nothing needs to change in the code for it.Two pull requests are open and would be good to merge:
master. It was merged into theupdate-test-suitebranch after that branch had already landed, so it never reachedmaster(see Packagist doesn't update validator/livr, and the Travis CI webhook is dead #35). Behaviour doesn't change, and validation gets 1.2–1.8 times faster.actions/checkout@v7.Both were prepared with the help of an LLM (Claude Code) and tested (PHPUnit, phpcs, the conformance harness), but please review them before merging. After merging, tagging a first release (for example
1.0.0) would be a nice extra: Packagist has onlydev-masternow, so users can't pin a stable version.koorchik commentedon Oct 26, 2026
All test suite cases pass in validator/livr dev-master@93e31c9 now, closing.
The test suite results of all implementations are published on the official LIVR site, livr-spec.org/introduction/implementations.html, and updated automatically every week and whenever the specification changes.