Skip to content

Refactor link scan scheduling through dedicated controller classes#237

Closed
JLG-WOCFR-DEV wants to merge 1 commit intomainfrom
codex/create-linkscancontroller-and-related-classes
Closed

Refactor link scan scheduling through dedicated controller classes#237
JLG-WOCFR-DEV wants to merge 1 commit intomainfrom
codex/create-linkscancontroller-and-related-classes

Conversation

@JLG-WOCFR-DEV
Copy link
Owner

Summary

  • extract the link scan orchestration into a LinkScanController that manages locking, rest windows, and queue scheduling
  • introduce RemoteRequestClient and ScanQueue helpers to encapsulate remote throttling and batch retrieval logic
  • wire blc_perform_check to the new classes and register the namespace with Composer autoloading

Testing

  • php -l liens-morts-detector-jlg/includes/blc-scanner.php

https://chatgpt.com/codex/tasks/task_e_68de450b41a0832e8a2cec272f3698f3

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +1248 to +1252
$controller = new LinkScanController(
$wpdb,
$scan_queue,
[
'debug_mode' => $debug_mode,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 Badge Require newly introduced scanner classes before use

The refactor instantiates new LinkScanController (and RemoteRequestClient/ScanQueue) directly inside blc_perform_check, but the plugin never loads these class files or a Composer autoloader. The main plugin bootstrap still only require_once’s the older procedural includes, so in a normal WordPress installation blc_perform_check() will now throw Class "JLG\BrokenLinks\Scanner\LinkScanController" not found as soon as a scan runs. Either add explicit require statements for the new files or ensure the Composer autoloader is loaded during plugin initialization.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant