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

[Task] Codebase should pass linting checks #971

Open
eddr opened this issue Aug 1, 2023 · 5 comments
Open

[Task] Codebase should pass linting checks #971

eddr opened this issue Aug 1, 2023 · 5 comments
Labels
priority: normal The issue/PR is normal priority—not many people are affected or there’s a workaround, etc. type: enhancement The issue is a request for an enhancement. type: task The issue is an internally driven task (e.g. from another A8c team).

Comments

@eddr
Copy link

eddr commented Aug 1, 2023

Improve coding standards across Action Scheduler. We should pass our own linting tests, and ideally those should intersect with the WPCS checks implemented by the WooCommerce Marketplace.

  • This accommodates a scenario where a plugin wishes to be listed in the marketplace, but also functions in a standalone capacity (ie, it cannot depend on the version of Action Scheduler bundled with WooCommerce). See discussion in the comments for more context.
  • Irrespective of the above, this should result in improved code hygiene for Action Scheduler and less noise when linting locally.
  • This is probably best handled incrementally; I advise against anyone submitting a monolithic fixes-everything style PR.

Original title:

Action Scheduler shows phpcs errors using wpcs : can't submit new extension to WC marketplace

Original description:

Hi and thanks for excellent and useful plugin!

I'm facing issues when trying to submit a new extension to the WC marketplace.
The plugin uses Action Scheduler library and it causes the automatic tests to not pass WC own phpcs checks

Any clue what can be done?

Thanks

@barryhughes
Copy link
Member

Internal discussion: p1690905319416299-slack-C3L7CFBRV

@barryhughes
Copy link
Member

@eddr since you are creating a WooCommerce extension, you can presumably depend on WooCommerce being present (or can test for it). WooCommerce includes its own copy of Action Scheduler, and it should therefore be possible to use that from your extension (or else you can use WC()->queue() which effectively wraps it).

I acknowledge this comes with some trade-offs (ie, you may not be able to take advantage of the very latest functionality)—but it is probably the most practical path forward at present.

@eddr
Copy link
Author

eddr commented Aug 3, 2023

Hi! Thank you very much!

I am aware that the AS included in WC, yes
The biggest problem for me is that the extension in mind should work even if WC if not active..

@barryhughes barryhughes changed the title Action Scheduler shows phpcs errors using wpcs : can't submit new extension to WC marketplace [Task] Codebase should pass linting checks Aug 3, 2023
@barryhughes barryhughes added type: enhancement The issue is a request for an enhancement. priority: normal The issue/PR is normal priority—not many people are affected or there’s a workaround, etc. type: task The issue is an internally driven task (e.g. from another A8c team). labels Aug 3, 2023
@barryhughes
Copy link
Member

Gotcha ... in that case, I don't have an easy workaround I can share. I've updated the issue title and description, though, to create a task for cleaning things up within the Action Scheduler codebase (on our end, it is not likely something we can prioritize straight away, however).

@eddr
Copy link
Author

eddr commented Aug 3, 2023

Thanks

I really think it's mostly a problem with the WC extension submitting system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: normal The issue/PR is normal priority—not many people are affected or there’s a workaround, etc. type: enhancement The issue is a request for an enhancement. type: task The issue is an internally driven task (e.g. from another A8c team).
Projects
None yet
Development

No branches or pull requests

2 participants