Skip to content

validator/livr dev-master@abbe57e (PHP) fails LIVR test suite cases #33

Closed

Description

@koorchik

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

  • negative/17-equal_to_field

    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_objects

    exception: TypeError: Cannot access offset of type array in isset or empty
    
  • negative/28-variable_object

    exception: TypeError: Cannot access offset of type array in isset or empty
    
  • negative/29-or

    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_suite

What'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

  1. added
    test suiteAn implementation fails the LIVR test suite (managed by CI)
    on Oct 23, 2026
  2. koorchik commented on Oct 26, 2026

    @koorchik
    MemberAuthor

    An update: the failures listed here are already fixed on master (#31). The last run tested dev-master@abbe57e, an older Packagist snapshot. Packagist now serves the current master (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:

    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 only dev-master now, so users can't pin a stable version.

  3. koorchik commented on Oct 26, 2026

    @koorchik
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    test suiteAn implementation fails the LIVR test suite (managed by CI)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions