Skip to content

[Bug]: Failed to load "Unleash\Client\Helper\EventDispatcher" #44

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

Closed
1 task done
anke-lutz opened this issue Nov 28, 2023 · 1 comment
Closed
1 task done

[Bug]: Failed to load "Unleash\Client\Helper\EventDispatcher" #44

anke-lutz opened this issue Nov 28, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@anke-lutz
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I have symfony 6.3 and php 8.2. I run composer require unleash/symfony-client-bundle:0.10.0 and after that I registered the bundle as stated in the documentation. Then I generated the config.
Then if I try php bin/console cache:clear or use Unleash\Client\Unleash I get the following error:

 Attempted to load class "EventDispatcher" from namespace "Unleash\Client\Helper".
  Did you forget a "use" statement for e.g. "Symfony\Component\EventDispatcher\EventDispatcher" or "JMS\Serializer\EventDispatche
  r\EventDispatcher"?

To reproduce

  1. Run composer require unleash/symfony-client-bundle:0.10.0
  2. Add Unleash\Client\Bundle\UnleashSymfonyClientBundle to config/bundles.php
  3. Run php bin/console config:dump unleash_symfony_client > config/packages/unleash_symfony_client.yaml
  4. Run php bin/console cache:clear

Sample code (optional)

No response

Version

0.10.0

Expected behavior

Running the command php bin/console cache:clear should not report an error.

Logs (optional)

app.WARNING: Failed to generate ConfigBuilder for extension Unleash\Client\Bundle\DependencyInjection\UnleashSymfonyClientExtension: Impossible to call set() on a frozen ParameterBag. {"exception":"[object] (Symfony\\Component\\DependencyInjection\\Exception\\LogicException(code: 0): Impossible to call set() on a frozen ParameterBag. at /home/somebody/projects/my-app/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php:58)","extensionClass":"Unleash\\Client\\Bundle\\DependencyInjection\\UnleashSymfonyClientExtension"} []
11:03:31 WARNING   [app] Failed to generate ConfigBuilder for extension Unleash\Client\Bundle\DependencyInjection\UnleashSymfonyClientExtension: Impossible to call set() on a frozen ParameterBag. ["exception" => Symfony\Component\DependencyInjection\Exception\LogicException^ { …},"extensionClass" => "Unleash\Client\Bundle\DependencyInjection\UnleashSymfonyClientExtension"]
[2023-11-28T11:03:31.795406+00:00] php.CRITICAL: Uncaught Error: Class "Unleash\Client\Helper\EventDispatcher" not found {"exception":"[object] (Error(code: 0): Class \"Unleash\\Client\\Helper\\EventDispatcher\" not found at /home/somebody/projects/my-app/var/cache/dev/ContainerVjTV1Xw/My_App_KernelDevDebugContainer.php:1841)"} []
11:03:31 CRITICAL  [php] Uncaught Error: Class "Unleash\Client\Helper\EventDispatcher" not found ["exception" => Error { …}]

In My_App_KernelDevDebugContainer.php line 1841:

  Attempted to load class "EventDispatcher" from namespace "Unleash\Client\Helper".
  Did you forget a "use" statement for e.g. "Symfony\Component\EventDispatcher\EventDispatcher" or "JMS\Serializer\EventDispatche
  r\EventDispatcher"?

Additional context (optional)

No response

@RikudouSage
Copy link
Collaborator

Fixed by #43 and #47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants