Skip to content

Conversation

@CySSoO
Copy link
Contributor

@CySSoO CySSoO commented Oct 19, 2025

Summary

  • add a Legacy\EverblockLegacyTools class and companion EverblockToolsService to expose tool helpers via dependency injection
  • update the module bootstrap, controllers, commands, and shortcode handlers to consume the new service instead of static EverblockTools calls
  • adjust Smarty templates, service configuration, and autoload metadata to register the service and remove the legacy model file

Testing

  • composer dump-autoload

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

@CySSoO CySSoO merged commit b0583a8 into master Oct 19, 2025
0 of 6 checks passed
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 "@codex address that feedback".

Comment on lines 214 to +216
if ($this->everBlockShortcodeProvider instanceof EverBlockShortcodeProvider) {
EverblockPrettyBlocks::setShortcodeProvider($this->everBlockShortcodeProvider);
EverblockTools::setShortcodeProvider($this->everBlockShortcodeProvider);
$this->getLegacyToolsService()->setShortcodeProvider($this->everBlockShortcodeProvider);

Choose a reason for hiding this comment

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

P0 Badge Avoid recursive bootstrap when resolving legacy tools service

Inside Everblock::bootstrapDependencies, the code invokes $this->getLegacyToolsService()->setShortcodeProvider(...) before setting $this->dependenciesBootstrapped to true. getLegacyToolsService() immediately calls bootstrapDependencies() again (lines 279‑281), so the initial bootstrap calls back into itself indefinitely and will exhaust the stack whenever the module is instantiated. Use the already resolved $this->legacyToolsService or mark the bootstrap as complete before calling back into getLegacyToolsService().

Useful? React with 👍 / 👎.

- { name: 'everblock.shortcode_handler' }

everblock.shortcode_handler.instagram:
class: Everblock\Tools\Shortcode\Handler\CallbackShortcodeHandler

Choose a reason for hiding this comment

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

P0 Badge Define service id for EverblockToolsService

Several service definitions inject @Everblock\Tools\Service\Legacy\EverblockToolsService, but this service id is never registered anywhere in services.yml. Because the container only knows about services declared in this file, building the module will fail with “You have requested a non-existent service” when compiling any handler that references the legacy tools service. Add an explicit definition such as Everblock\Tools\Service\Legacy\EverblockToolsService: ~ (or adjust references) so the container can instantiate and inject it.

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.

2 participants