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

Attempted to load class "ExitCode" for mautic:custom_items:scheduled_export command #302

Open
1 task done
kuzmany opened this issue Feb 17, 2023 · 2 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@kuzmany
Copy link

kuzmany commented Feb 17, 2023

Mautic Version

4.2.x series

PHP version

7.4

What browsers are you seeing the problem on?

No response

What happened?

During call mautic:custom_items:scheduled_export it retunr error. Should return 1, seems exitCode class missing

How can we reproduce this issue?

Step 1: Run mautic:custom_items:scheduled_export command

Relevant log output

Attempted to load class "ExitCode" from namespace "Mautic\CoreBundle\Helper".
Did you forget a "use" statement for another namespace?

Code of Conduct

  • I confirm that I have read and agree to follow this project's Code of Conduct
@kuzmany kuzmany added the bug Something isn't working label Feb 17, 2023
@escopecz
Copy link
Contributor

escopecz commented Feb 17, 2023

Sorry about that! The PR that introduces this class is blocked by the A/B testing PR that I was discussing with Norman yesterday. The class looks like this if you just want to quick-patch it:

<?php

declare(strict_types=1);

namespace Mautic\CoreBundle\Helper;

/**
 * Holds exit code constants for commands.
 */
final class ExitCode
{
    /**
     * The command completed successfully.
     */
    public const SUCCESS = 0;

    /**
     * The command exited with some kind of error.
     */
    public const FAILURE = 1;

    /**
     * Indicating something that is not really an error. This means that a mailer
     * (e.g.) could not create a connection, and the request should be reattempted later.
     */
    public const TEMPORARY_FAILURE = 75;
}

@escopecz
Copy link
Contributor

Available in mautic/mautic#11989

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants