rackspace / php-opencloud

The PHP SDK for OpenStack clouds
developer.rackspace.com
Other
451 stars 250 forks source link

Class 'Symfony\Component\EventDispatcher\Event' not found When making call to dnsService() #751

Open logan-christensen opened 3 years ago

logan-christensen commented 3 years ago

In a fresh install of Laravel, running the following code:

    $client = new Rackspace(Rackspace::US_IDENTITY_ENDPOINT, [
        'username' => '{username}',
        'apiKey' => '{api_key}'
    ]);
    $dnsService = $client->dnsService();

Causes the error: Class 'Symfony\Component\EventDispatcher\Event' not found

I'm using Laravel Version 8.12 PHP 7.4 I have symfony/event-dispatcher: ^5.1

I'm sure if it's related but when installing php-opencloud via composer I got the warning:

Package guzzle/guzzle is abandoned, you should avoid using it. Use guzzlehttp/guzzle instead.

To Reproduce

  1. Install a new Laravel Project
  2. Run composer require rackspace/php-opencloud:dev-master
  3. Copy the code at the top of this issue into the route closure in /routes/web.php
  4. Try to visit that route in the browser

I've shared the exception on flare: https://flareapp.io/share/pPvl0AY5#F55

rsaylor-strivven commented 3 years ago

This also fails on Lumen

Lumen (8.2.4) (Laravel Components ^8.0) Tried with composer 2 and composer 1 PHP 7.3

Class 'Symfony\Component\EventDispatcher\Event' not found (500 Internal Server Error)

johnboy4809 commented 7 months ago

@logan-christensen I know this was raised a few years ago but did you manage to resolve the issue as ive just tried it to connect to our rackspace and getting the same error

rsaylor73 commented 7 months ago

We actually engaged their engineering team and it was pointless. We since moved to AWS. However, I was able to get curl commands to work creating DNS A records, etc.