Skip to content

Fix TypeError in pattern property validation with integer keys#880

Merged
DannyvdSluijs merged 2 commits intomainfrom
copilot/fix-preg-match-type-error
Feb 13, 2026
Merged

Fix TypeError in pattern property validation with integer keys#880
DannyvdSluijs merged 2 commits intomainfrom
copilot/fix-preg-match-type-error

Conversation

Copy link
Contributor

Copilot AI commented Feb 13, 2026

Problem

PHP 8+ with strict_types throws TypeError: preg_match(): Argument #2 ($subject) must be of type string, int given when validating schemas with patternProperties against data decoded with json_decode($json, true). Numeric keys (e.g., HTTP status codes 200, 404 in OpenAPI specs) become integers in associative arrays.

Changes

ObjectConstraint.php

  • Cast array keys to string before preg_match() in validatePatternProperties()
// Before
if (preg_match($fullRegex, $i)) {

// After  
if (preg_match($fullRegex, (string) $i)) {

PatternPropertiesTest.php

  • Added test case validating OpenAPI-like responses with numeric status codes using associative arrays

Impact

Resolves validation failures for any schema using patternProperties when data contains numeric keys. No behavior change for existing string keys.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/0ad2f84130e8fec8655682532e6d39553054831c
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/29dc0d507e838c4580d018bd8b5cb412474f7ec3
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/doctrine/annotations/zipball/253dca476f70808a5aeed3a47cc2cc88c5cab915
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/doctrine/deprecations/zipball/d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/doctrine/lexer/zipball/861c870e8b75f7c8f69c146c7f89cc1c0f1b49b6
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/marc-mabe/php-enum-phpstan/zipball/63d391c16e3a7753bb928f61d1989438ee63eebc
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/marc-mabe/php-enum/zipball/bb426fcdd65c60fb3638ef741e8782508fda7eef
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/WNIO3J /usr/bin/composer install --prefer-dist --no-dev com-sebastianbergit --global } git conf�� github.accesstoken git 73ccd3de053bdb377171d7b6^{commit} --local pull.rebase de/node/bin/git git (http block)
  • https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/5cee1d3dfc2d2aa6599834520911d246f656bcb8
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/92a98ada2b93d9b201a613cb5a33584dde25f195
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/phpspec/prophecy/zipball/7ab965042096282307992f1b9abff020095757f0
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/phpstan/phpdoc-parser/zipball/a004701b11273a26cd7955a61d67a7f1e525a45a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/phpstan/phpstan/zipball/2770dcdf5078d0b0d53f94317e06affe88419aa8
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/comparator/zipball/bc7d8ac2fe1cce229bff9b5fd4efe65918a1ff52
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/diff/zipball/98ff311ca519c3aa73ccd3de053bdb377171d7b6
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/environment/zipball/56932f6049a0482853056ffd617c91ffcc754205
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/exporter/zipball/64cfeaa341951ceb2019d7b98232399d57bb2296
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/global-state/zipball/800689427e3e8cf57a8fe38fcd1d4344c9b2f046
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/ac5b293dba925751b808e02923399fb44ff0d541
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/1d439c229e61f244ff1f211e5c99737f90c67def
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/40a4ed114a4aea5afd6df8d0f0c9cd3033097f66
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/69deeb8664f611f156a924154985fbd4911eb36b
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/php-timer/zipball/a691211e94ff39a34811abd521c31bd5b305b0bb
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1015741814413c156abb0f53d7db7bbd03c6e858
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/8fe7e75986a9d24b4cceae847314035df7703a5a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/72a7f7674d053d548003b16ff5a106e7e0e06eee
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/type/zipball/18f071c3a29892b037d35e6b20ddf3ea39b42874
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/console/zipball/c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/59eb412e93815df44f05f342958efa9f46b1e586
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/event-dispatcher/zipball/72982eb416f61003e9bb6e91f8b3213600dcf9e9
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/filesystem/zipball/57c8294ed37d4a055b77057827c67f9558c95c54
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/finder/zipball/63741784cd7b9967975eec610b256eed3ede022b
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/options-resolver/zipball/74e5b6f0db3e8589e6cfd5efb317a1fc2bb52fb6
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/process/zipball/467bfc56f18f5ef6d5ccb09324d7e988c1c0a98f
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/stopwatch/zipball/fb2c199cf302eb207f8c23e7ee174c1c31a5c004
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/string/zipball/50590a057841fa6bf69d12eceffce3465b9e32cb
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/theseer/tokenizer/zipball/b7489ce515e168639d17feec34b8847c326b0b3c
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/webmozarts/assert/zipball/ce6a2f100c404b2d32a1dd1270f9b59ad4f57649
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/r7M7Nc /usr/bin/composer install --no-interaction (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>TypeError: preg_match(): Argument #2 ($subject) must be of type string, int given</issue_title>
<issue_description>Seen in https://integration.wikimedia.org/ci/job/quibble-for-mediawiki-core-vendor-mysql-php83/4498/consoleFull trying to upgrade to 6.x (note link won't work forever)

04:02:00 1) MediaWiki\Tests\Rest\Handler\ModuleSpecHandlerTest::testGetInfoSpecSuccess with data set "module and version" ('/workspace/src/tests/phpunit/...e.json', array(array('mock', 'v1')), array(array('mock/v1 <message key="rest-mo...ssage>', '1.3-test', array('test@example.com')), array(array('https://example.com:1234/api/mock/v1')), array(array(array(array(array('q', 'query')), array(array('OK'))), array(array(true, array(array(array('object', array('b'), array(array('string')))))), array(array('OK'))))), array(array(array('boolean')), array(PHPUnit\Framework\Constraint\IsAnything Object (...)))))
04:02:00 TypeError: preg_match(): Argument jsonrainbow/json-schema#2 ($subject) must be of type string, int given
04:02:00 
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/ObjectConstraint.php:64
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/ObjectConstraint.php:40
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php:84
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:66
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:43
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php:116
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/ObjectConstraint.php:139
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/ObjectConstraint.php:45
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php:84
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:66
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:43
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php:116
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/ObjectConstraint.php:66
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/ObjectConstraint.php:40
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php:84
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:66
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:43
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php:116
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/ObjectConstraint.php:66
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/ObjectConstraint.php:40
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php:84
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:66
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:43
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php:116
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/ObjectConstraint.php:139
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/ObjectConstraint.php:45
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php:84
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:66
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:43
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php:116
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/SchemaConstraint.php:96
04:02:00 /workspace/src/vendor/justinrainbow/json-schema/src/JsonSchema/Validator.php:92
04:02:00 /workspace/src/tests/phpunit/JsonSchemaAssertionTrait.php:70
04:02:00 /workspace/src/tests/phpunit/integration/includes/Rest/Handler/ModuleSpecHandlerTest.php:85
04:02:00 /workspace/src/tests/phpunit/integration/includes/Rest/Handler/ModuleSpecHandlerTest.php:223
Logs generated by test
04:02:00 
04:02:00 2) MediaWiki\Tests\Rest\Handler\ModuleSpecHandlerTest::testGetInfoSpecSuccess with data set "prefix-less module" ('/workspace/src/tests/phpunit/...s.json', arra...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes jsonrainbow/json-schema#870

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

…erties

Co-authored-by: DannyvdSluijs <618940+DannyvdSluijs@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix TypeError in preg_match argument handling Fix TypeError in pattern property validation with integer keys Feb 13, 2026
Copilot AI requested a review from DannyvdSluijs February 13, 2026 15:32
@DannyvdSluijs DannyvdSluijs marked this pull request as ready for review February 13, 2026 15:39
@DannyvdSluijs DannyvdSluijs merged commit fd1fa4d into main Feb 13, 2026
18 checks passed
@DannyvdSluijs DannyvdSluijs deleted the copilot/fix-preg-match-type-error branch February 13, 2026 15:49
github-actions bot added a commit that referenced this pull request Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants