Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The value 'Vendor\Xxx5\Model\Queue\Consumer::processMessage' is not accepted by the pattern '[a-zA-Z\\]+::[a-zA-Z]+'. #16168

Closed
weverson83 opened this issue Jun 15, 2018 · 2 comments
Labels
Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed

Comments

@weverson83
Copy link

The xml validator fail when you pass a class with numeric value in it's namespace.

Preconditions

Magento 2.2.2
magento/framework-message-queue

Steps to reproduce

  1. Create etc/queue.xml file
<broker topic="xxxx" type="amqp" exchange="magento">
       <queue consumer="yyyy" name="zzzz" handler="Vendor\Xxx5\Model\Consumer::processMessage" consumerInstance="Magento\Framework\MessageQueue\Consumer"/>
    </broker>
  1. Run bin/magento setup:upgrade

Actual result

The value 'Vendor\Xxx5\Model\Queue\Consumer::processMessage' is not accepted by the pattern '[a-zA-Z\]+::[a-zA-Z]+'.

Work arround

Created a virtualType for my class without a number in it's namespace

Solution

At vendor/magento/framework-message-queue/etc/queue_base.xsd

<xs:simpleType name="handlerType">
        <xs:annotation>
            <xs:documentation>
                @deprecated
                Handler is expected in a format "Vendor\Module\Api\ServiceName::methodName".
            </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:pattern value="[a-zA-Z\\]+::[a-zA-Z]+" />
            <xs:minLength value="5" />
        </xs:restriction>
    </xs:simpleType>

Fix the pattern to accept numbers (Make sure it doesn't allow start with number)
[a-zA-Z]+[a-zA-Z0-9\\]+::[a-zA-Z0-9]+ should work

@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Jun 15, 2018
@orlangur orlangur self-assigned this Jun 15, 2018
@engcom-backlog-nickolas

@weverson83, thank you for your report. Please follow these guidelines for proper tracking of your issue. You can report Commerce-related issues in one of two ways:
You can use the Support portal associated with your account
or
If you are a Partner reporting on behalf of a merchant, use the Partner portal.

GitHub is intended for Magento Open Source users to report on issues related to Open Source only. There are no account management services associated with GitHub.

@domeglic
Copy link

domeglic commented Nov 21, 2019

@magento-engcom-team Can we reopen this issue because message queues are now in Open source, the issue still exists and was not fixed.
Magento: 2.3.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed
Projects
None yet
Development

No branches or pull requests

5 participants