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

woocommerce/action-scheduler package is not processed #108

Open
olegabr opened this issue Dec 21, 2020 · 2 comments
Open

woocommerce/action-scheduler package is not processed #108

olegabr opened this issue Dec 21, 2020 · 2 comments

Comments

@olegabr
Copy link

olegabr commented Dec 21, 2020

See my composer.json here: #106

woocommerce/action-scheduler is not processed and stay in the vendor directory.

@BrianHenryIE
Copy link
Contributor

BrianHenryIE commented Dec 24, 2020

The problem is that Action Scheduler has no autoload key in its composer.json.

You can fix this by adding this to Mozart's config:

"override_autoload": {
    "woocommerce/action-scheduler": {
        "classmap": [
            "classes/",
            "deprecated/",
            "lib/"
        ]
    }
}

But needs PR #91 applied which you can do with

"require-dev": {
...
    "cweagans/composer-patches": "*"
},
"extra": {
    "patches": {
        "coenjacobs/mozart": {
            "Move each file only once (classmap)":"https://github.com/coenjacobs/mozart/pull/91.patch"
        }
    },

lib has mtdowling/cron-expression v1.2.3 and WP Async Request from deliciousbrains/wp-background-processing which you could require normally instead of the lib folder.

There are issues with replacements (e.g. in WP Background Processing 0 is replaced with Classmap_Prefix_3) some of which which are fixed with the updated ClassmapReplacer.php in #106 (comment) but some remain, e.g. ActionScheduler_ListTable.php has a loop's for keyword prefixed. This is issue #86 with a draft PR #102 which unfortunately causes other problems here (un-prefixed classes). I'll have to take Action Scheduler and update #102 with some tests against it.

Why are you including Action Scheduler like this and not just using the WooCommerce instance?

@olegabr
Copy link
Author

olegabr commented Dec 25, 2020

Thank you for help!
I'm using it because not all of my plugins require WooCommerce for their work. This one for example: https://wordpress.org/plugins/ethereum-wallet/

BrianHenryIE added a commit to BrianHenryIE/strauss that referenced this issue May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants