mozart
mozart copied to clipboard
woocommerce/action-scheduler package is not processed
See my composer.json
here: https://github.com/coenjacobs/mozart/issues/106
woocommerce/action-scheduler
is not processed and stay in the vendor
directory.
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 https://github.com/coenjacobs/mozart/issues/106#issuecomment-750959991 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?
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/