-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Databases endpoint broken in 3.3.1 #473
Comments
Hi I tried to replicate this on the latest stable (3.3.1) but wasn't able to. How are you calling the library - any additional context would be great thanks |
I am not doing anything interesting- just calling getDatabases($environment_id) function on AcquiaCloudApi\Endpoints\Databases class with a valid environment ID. The response I get back from Acquia for each database is a class with ID, name, db_host, flags, environment, and name. However, there is no $user_name. getDatabases, attempts to create a new AcquiaCloudApi\Response\DatabasesResponse, which attempts to create a new AcquiaCloudApi\Response\DatabaseResponse. The constructor of DatabaseResponse attempts to set the $user_name: $this->user_name = $database->user_name; Because my response has no username, and $this->user_name is typed as a string, the exception is thrown. I see the comment about having the permission, "View database connection details (username, password, or hostname)", but I have double and triple-checked, and I definitely have this permission, and am using my api key/secret. |
Please open an Acquia support request with details about your application and user account. This has always been a result of lacking the permission you mention, but possibly there are other permissions involved or problems with your application. I'm going to revert the commit that caused the typeerrors, but note that this won't fix the issue. Downstream clients (i.e. ACLI) will need to verify the connection details before attempting to use them. |
When attempting to use the Databases.php getAll() function, supplying a valid UUID, it produces an error:
TypeError: Cannot assign null to property AcquiaCloudApi\Response\DatabaseResponse::$user_name of type string in AcquiaCloudApi\Response\DatabaseResponse->__construct() (line 23 of /var/www/html/vendor/typhonius/acquia-php-sdk-v2/src/Response/DatabaseResponse.php).
The text was updated successfully, but these errors were encountered: