Skip to content

unrecognized node type PhpParser\Node\Expr\FuncCall #743

@staabm

Description

@staabm

using Nyholm/roave-bc-check-docker we run a github action on a codebase which contains a lib/RegexFormats.php file:

<?php

if (!defined('VALIDATOR_REGEXES_LOADED')) {
    // in case you change the EMAIL regex, make sure you also update it in rocket.js; see CLX6-272
    define('REGEX_MAIL_OLD', '^[-A-Za-z0-9~!$%^&*_=+\}\{\'?]+(\.[-A-Za-z0-9~!$%^&*_=+\}\{\'?]+)*@(?!\-)(?:[\d\-\pL]{0,62}[\pL\d]\.){1,126}(?!\d+)[a-zA-Z\d]{2,63}$');
    define('REGEX_MAIL_UTF8', "^[-A-Za-z0-9~!$%^&*_=+\}\{\'?]+(\.[-A-Za-z0-9~!$%^&*_=+\}\{\'?]+)*@(?!\-)(?:[\d\-A-Za-z\x{00C0}-\x{017F}]{0,62}[A-Za-z\x{00C0}-\x{017F}\d]\.){1,126}(?!\d+)[a-zA-Z\d]{2,63}$");
    defined('REGEX_EMAIL') ?: define('REGEX_EMAIL', defined('ENCODING_CHARSET') && (false !== stripos(ENCODING_CHARSET, StringConverter::UTF_8)) ? REGEX_MAIL_UTF8 : REGEX_MAIL_OLD);

    defined('REGEX_PLZ') ?: define('REGEX_PLZ', '^[0-9]{4,}$');
    defined('REGEX_HAUSNR') ?: define('REGEX_HAUSNR', '^[0-9a-zA-Z\.\-\s]{1,}$');
    defined('REGEX_GEBURTSORT') ?: define('REGEX_GEBURTSORT', '^[\pL\- ]+$'); // \pL means all letters, also umlauts
    defined('REGEX_NR') ?: define('REGEX_NR', '^[0-9]+$');
    defined('REGEX_BLZ') ?: define('REGEX_BLZ', '^[a-zA-Z0-9]{8}$');
    defined('REGEX_TEL') ?: define('REGEX_TEL', '^[0|+][0-9\/\-\s\+]{4,}$');
    defined('REGEX_URL') ?: define('REGEX_URL', '^[a-zA-Z0-9./?:@\-_=#%]+\.[a-zA-Z0-9./?:@\-+_=#%&]*$');
    defined('REGEX_LINK') ?: define('REGEX_LINK', '^(http:\/\/|https:\/\/|clx:\/\/|\/)[a-zA-Z0-9./?:@\-+_=#%&]+$');
    defined('REGEX_NUMBER') ?: define('REGEX_NUMBER', '^[0-9/]+$');
    defined('REGEX_UST_NUMBER') ?: define('REGEX_UST_NUMBER', '^[a-zA-Z0-9/]+$');

    define('VALIDATOR_REGEXES_LOADED', true);
}

roave/backward-compatibility-check reports

[BC] SKIPPED: Unable to compile expression in global namespace: unrecognized node type PhpParser\Node\Expr\FuncCall in file /lib/RegexFormats.php (line 7)

and I don't know what this error is trying to tell me ;)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions