Giter Site home page Giter Site logo

apigee / apigee-edge-drupal Goto Github PK

View Code? Open in Web Editor NEW
32.0 24.0 44.0 3.97 MB

The Apigee Edge module enables you to integrate a Drupal 9 or 8 site with Apigee.

Home Page: https://www.drupal.org/project/apigee_edge

License: GNU General Public License v2.0

CSS 0.57% JavaScript 0.86% PHP 97.53% Twig 1.05%
drupal drupal8 apigee api-client drupal-8 composer drupal-9

apigee-edge-drupal's Introduction

Apigee Drupal module

The Apigee module enables you to integrate Drupal 10 with Apigee Edge or Apigee X.

  • Users that register or are added to the Drupal site will be added as developers in Apigee.
  • Click on "Apps" in user menu to get keys for the APIs exposed in Apigee.

This module includes the following submodules:

  • API product RBAC: enables administrators to configure access permissions to API products.
  • Debug: enables administrators to configure and manage Apigee debug logs.
  • Teams: enables developers to be organized into teams.

For more details read the Apigee module documentation.

Support for Apigee Hybrid Cloud and Apigee X

Support for Apigee hybrid API and Apigee X API is now considered production ready.

Apigee X Team APIs is supported by AppGroups, For more details see viewing and managing AppGroups.

If you run into any problems, add an issue to our GitHub issue queue. Please note that the Monetization APIs are not currently supported on Apigee hybrid/ X.

Requirements

  • The Apigee module requires Drupal 10.1.x or higher and PHP 8.1, Drupal 10.x is recommended due to Drupal 9's EOL timeline.
  • Drupal's minimum requirement is phpdocumentor/reflection-docblock:2.0.4 but at least 3.0 is required by this module. If you get the error "Your requirements could not be resolved to an installable set of packages" it may be because you are running reflection-docblock version 2. You can update phpdocumentor/reflection-docblock with the following command: composer update phpdocumentor/reflection-docblock --with-dependencies.
  • Check composer.json for any required patches. Patches prefixed with "(For testing)" are only required for running tests. Those are not necessary for using this module. Patches can be applied with the cweagans/composer-patches plugin automatically or manually. See Applying Patches section below.
  • (For developers) The locked commit from behat/mink library is required otherwise tests may fail. This caused by a Drupal core bug. See the related pull request for behat/mink here.

Installing

  1. Install the Apigee module using Composer. Composer will download the Apigee module and all its dependencies. Note: Composer must be executed at the root of your Drupal installation. For example:

    cd /path/to/drupal/root
    composer require drupal/apigee_edge
    

    For more information about installing contributed modules using composer, see the official documentation.

  2. Click Extend in the Drupal administration menu.

  3. Select the Apigee module.

  4. Click Install.

  5. Configure the connection to your Apigee org

Notes

  • If you do not configure the connection between Drupal and Apigee, you will not be able to register developers on the site and may cause other issues with Drupal core functions. If you do not plan to configure the connection between Drupal and Apigee, you should uninstall the Apigee module.
  • When you first install the module, existing users in the Drupal site may not have a developer account in Apigee. You can run developer synchronization to make sure Drupal users and Apigee developers are synchronized.
  • For migrating Apigee hybrid/ X Teams members in Drupal, you can run Team synchronization to get the Team members information.

Applying Patches

The Apigee module may require Drupal core or contributed module patches to be able to work properly. These patches can be applied automatically when Apigee module gets installed but for that your Drupal installation must fulfill the following requirements:

  1. cweagans/composer-patches >= 1.6.5 has to be installed.
  2. "Allowing patches to be applied from dependencies " has to be enabled in Drupal's composer.json.
  3. Proper patch level for drupal/core has to be set in Drupal's composer.json.

You can find the currently required patches, if any, in the Apigee module's composer.json and in the Apigee PHP API Client's composer.json.

If you do not have all required patches applied in your Drupal installation you may experience some problems with the Apigee module.

Troubleshooting

  • File entity module. If you installed the File entity module then you are going to need the latest patch from this issue otherwise you can run into some problems.

Development

Development is coordinated in our GitHub repository. The drupal.org issue queue is disabled; we use the GitHub issue queue to coordinate development.

Support

This project, which integrates Drupal with Apigee, is supported by Google.

apigee-edge-drupal's People

Contributors

arlina-espinoza avatar boobaa avatar cnovak avatar dawehner avatar divya-intelli avatar earth2marsh avatar fcsongradi avatar giteshk avatar heykarthikwithu avatar jacine avatar jaesin avatar jbennett13 avatar kbrinner avatar kedarkhaire avatar kscheirer avatar minnur avatar mxr576 avatar ngonendi avatar peterserfozo avatar phdhiren avatar raakesh-blokhra avatar rakeshjames avatar shadcn avatar shishir-intelli avatar spooky063 avatar tamasd avatar tokapeb avatar vitalie-cracan avatar vladimiraus avatar zakiya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apigee-edge-drupal's Issues

cURL error 77: error setting certificate verify locations

Q A
Bug? yes
New Feature? no
Module Version 1.0.0-beta1
PHP Client version 2.0.0
Requires PHP client fix no

Actual Behavior

The following error occurs when testing the connection to our Apigee Edge from my local windows 10 env.

Failed to connect to Apigee Edge. Check the debug information below for more details. Error message: cURL error 77: error setting certificate verify locations: CAfile: C:/certs/apigeemgtui.dev.testinternal.site.pem CApath: /etc/ssl/certs (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

Expected Behavior

Expecting Connection Successful message.

Steps to Reproduce the behavior

Added this entry to my php.ini file:
curl.cainfo = "c:/certs/apigeemgtui.dev.testinternal.site.pem"
Navigated to Configuration | Apigee Edge | General to specify connection settings.
Clicked on Test Connection | Send Request.
The error occurs.

Proposed Solution

If you have already ideas how to solve the issue please describe it here.
(Remove this section if it is not needed.)

Clearing the cache with drush without the private file system being configured produces a warning.

Q A
Bug? yes

Actual Behavior

Clearing the cache without a private file system configured can cause a warning.

See; #103 (comment)

Expected Behavior

Clearing the cache without a private file system configured should not cause a warning and should not create a token storage file in a private: directory in the web root.

Steps to Reproduce the behavior

Configure the Apigee edge connections settings using something other than apigee_edge_private_file. Clear the cache using drush. You should see:

...
 [warning] file_exists(): Unable to find the wrapper "private" - did you forget to enable it when you configured PHP? OauthTokenFileStorage.php:204
...

Proposed Solution

Check that the private file system is configure before saving token data.
Add a tests for this user case.

CpsNotEnabledException

I'm getting

Apigee\Edge\Exception\CpsNotEnabledException: in Apigee\Edge\Api\Management\Controller\AppByOwnerController->createPager() (line 45 of /app/vendor/apigee/apigee-client-php/src/Controller/PaginationHelperTrait.php)

when clicking My Apps after I created a user.

Does CPS have to be enabled in order to use this drupal 8 module?

Originally posted by @rodvina in #120 (comment)

Add an issue template for support requests

This issue is not a feature request, therefore, it should not be tagged by "enhancement" automatically. It would be benefical if support requests could be clearly separated from bugs and feature request.

#223

Don't require integraton tests for PR.

Q A
Bug? No
New Feature? yes
Module Version 8.x-1.x
PHP Client version any
Requires PHP client fix no

Actual Behavior

Integration tests are required for a pull request to be considered.

Expected Behavior

Integration tests are NOT required for a pull request to be considered.

Proposed Solution

For development of the monetization module. We have been mocking API responses. We are planning to move the solution to the apigee_edge module at some point. From the point of view of an API library consumer, we should be trusting that the integration testing is happening at the client library level before releases are created.

Running Tests on docker: run-test.sh: not found

Q A
Bug? yes
New Feature? no
Module Version 8047214
PHP Client version 2.0.0-alpha2
Requires PHP client fix no

Summary

The CONTRIBUTING.md explains how to run tests on docker, but I am seeing an error.

Steps to Reproduce the behavior

$ docker-compose run php /opt/drupal-module/run-test.sh
WARNING: The DRUPAL_CORE variable is not set. Defaulting to a blank string.
WARNING: The DEPENDENCIES variable is not set. Defaulting to a blank string.
/usr/local/bin/docker-php-entrypoint: exec: line 9: /opt/drupal-module/run-test.sh: not found

Error while configuring OAuth for SAML enabled Orgs

Q A
Bug? yes
New Feature? no
Module Version 1.0.0-alpha3
PHP Client version 2.0.0-alpha2
Requires PHP client fix don't know

Actual Behavior

Trying to configure Edge module to connect to a SAML enabled organization. Documentation only explains Basic Auth. (https://www.drupal.org/docs/8/modules/apigee-edge/configure-the-connection-to-apigee-edge). We have set up a new OAuth (SAML) key using the devadmin credentials, key and secret. We then created to set up a new OAuth (SAML) token key of key type "Apigee Edge OAUTh token with "Key Provider" of "Private File". There were not values under "value". When clicking "Save" we saw a few errors and warnings from Drupal about not being able to handle request, as shown below -

Warning: Illegal string offset 'submitted' in Drupal\key\Form\KeyFormBase->validateForm() (line 252 of /app/web/modules/contrib/key/src/Form/KeyFormBase.php) #0 /app/web/core/includes/bootstrap.inc(582): _drupal_error_handler_real(2, 'Illegal string ...', '/app/web/module...', 252, Array) #1 /app/web/modules/contrib/key/src/Form/KeyFormBase.php(252): _drupal_error_handler(2, 'Illegal string ...', '/app/web/module...', 252, Array) #2 [internal function]: Drupal\key\Form\KeyFormBase->validateForm(Array, Object(Drupal\Core\Form\FormState)) #3 /app/web/core/lib/Drupal/Core/Form/FormValidator.php(83): call_user_func_array(Array, Array) #4 /app/web/core/lib/Drupal/Core/Form/FormValidator.php(276): Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object(Drupal\Core\Form\FormState)) #5 /app/web/core/lib/Drupal/Core/Form/FormValidator.php(119): Drupal\Core\Form\FormValidator->doValidateForm(Array, Object(Drupal\Core\Form\FormState), 'key_add_form') #6 /app/web/core/lib/Drupal/Core/Form/FormBuilder.php(575): Drupal\Core\Form\FormValidator->validateForm('key_add_form', Array, Object(Drupal\Core\Form\FormState)) #7 /app/web/core/lib/Drupal/Core/Form/FormBuilder.php(318): Drupal\Core\Form\FormBuilder->processForm('key_add_form', Array, Object(Drupal\Core\Form\FormState)) #8 /app/web/core/lib/Drupal/Core/Controller/FormController.php(74): Drupal\Core\Form\FormBuilder->buildForm('key_add_form', Object(Drupal\Core\Form\FormState)) #9 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch)) #10 /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #11 /app/web/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #12 /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #13 /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #14 /app/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #15 /app/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #16 /app/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /app/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /app/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /app/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /app/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /app/web/core/lib/Drupal/Core/DrupalKernel.php(666): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /app/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #25 {main}.
Notice: Uninitialized string offset: 0 in Drupal\key\Form\KeyFormBase->validateForm() (line 252 of /app/web/modules/contrib/key/src/Form/KeyFormBase.php) #0 /app/web/core/includes/bootstrap.inc(582): _drupal_error_handler_real(8, 'Uninitialized s...', '/app/web/module...', 252, Array) #1 /app/web/modules/contrib/key/src/Form/KeyFormBase.php(252): _drupal_error_handler(8, 'Uninitialized s...', '/app/web/module...', 252, Array) #2 [internal function]: Drupal\key\Form\KeyFormBase->validateForm(Array, Object(Drupal\Core\Form\FormState)) #3 /app/web/core/lib/Drupal/Core/Form/FormValidator.php(83): call_user_func_array(Array, Array) #4 /app/web/core/lib/Drupal/Core/Form/FormValidator.php(276): Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object(Drupal\Core\Form\FormState)) #5 /app/web/core/lib/Drupal/Core/Form/FormValidator.php(119): Drupal\Core\Form\FormValidator->doValidateForm(Array, Object(Drupal\Core\Form\FormState), 'key_add_form') #6 /app/web/core/lib/Drupal/Core/Form/FormBuilder.php(575): Drupal\Core\Form\FormValidator->validateForm('key_add_form', Array, Object(Drupal\Core\Form\FormState)) #7 /app/web/core/lib/Drupal/Core/Form/FormBuilder.php(318): Drupal\Core\Form\FormBuilder->processForm('key_add_form', Array, Object(Drupal\Core\Form\FormState)) #8 /app/web/core/lib/Drupal/Core/Controller/FormController.php(74): Drupal\Core\Form\FormBuilder->buildForm('key_add_form', Object(Drupal\Core\Form\FormState)) #9 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch)) #10 /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #11 /app/web/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #12 /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #13 /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #14 /app/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #15 /app/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #16 /app/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /app/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /app/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /app/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /app/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /app/web/core/lib/Drupal/Core/DrupalKernel.php(666): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /app/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #25 {main}.

However, we were able to add both key and token key for OAuth the second time without problem.

Proposed Solution

Need documentation for SAML/OAuth configuration, and fix whatever errors we saw above.

Multiword override of status yields invalid class

Q A
Bug? yes
New Feature? no
Module Version 8.x-1.0-beta2
PHP Client version 2.0.1
Requires PHP client fix no

Actual Behavior

When the app status text is overridden from a custom module (like "in progress" instead of "pending"), the actual class becomes status-value-in progress.

Expected Behavior

In this case, the class should be status-value-in-progress.

Steps to Reproduce the behavior

  • Override the _controller for the entity.developer_app.collection_by_developer route via a RouteSubscriber as usual.
  • Override the buildInfoRow() method:
    protected function buildInfoRow(AppInterface $app, array &$rows) {
      parent::buildInfoRow($app, $rows);
      $css_id = $this->getCssIdForInfoRow($app);
      $row = &$rows[$css_id];
      if ($row['data']['status']['data']['#value'] == 'pending') {
        $row['data']['status']['data']['#value'] = 'in progress';
      }
    }

Proposed Solution

Use \Drupal\Component\Utility\Html::cleanCssIdentifier() instead of strtolower() in template_preprocess_status_property().

Not able to install on Drupal 8.5.5

Q A
Bug? yes
New Feature? no

Actual Behavior

Not able to install apigee_edge module on Drupal 8.5.5.
Returns the following:

$ composer require drupal/apigee_edge
Using version ^1.0@alpha for drupal/apigee_edge
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install drupal/apigee_edge 1.0.0-alpha5
    - Conclusion: don't install drupal/apigee_edge 1.0.0-alpha4
    - Conclusion: don't install drupal/apigee_edge 1.0.0-alpha3
    - Conclusion: don't install drupal/apigee_edge 1.0.0-alpha2
    - Installation request for drupal/apigee_edge ^1.0@alpha -> satisfiable by drupal/apigee_edge[1.0.0-alpha5, 1.0.0-alpha4, 1.0.0-alpha3, 1.0.0-alpha2, 1.0.0-alpha1].
    - Conclusion: don't install phpdocumentor/reflection-docblock 2.0.4
    - drupal/apigee_edge 1.0.0-alpha1 requires apigee/apigee-client-php ^2.0 -> satisfiable by apigee/apigee-client-php[2.0.0-alpha1, 2.0.0-alpha2, 2.x-dev].
    - apigee/apigee-client-php 2.0.0-alpha1 requires symfony/property-info ^3.4 || ^4.0 -> satisfiable by symfony/property-info[3.4.x-dev, 4.0.x-dev, 4.1.x-dev, 4.2.x-dev, v3.4.0, v3.4.0-BETA1, v3.4.0-BETA2, v3.4.0-BETA3, v3.4.0-BETA4, v3.4.0-RC1, v3.4.0-RC2, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9, v4.0.0, v4.0.0-BETA1, v4.0.0-BETA2, v4.0.0-BETA3, v4.0.0-BETA4, v4.0.0-RC1, v4.0.0-RC2, v4.0.1, v4.0.10, v4.0.11, v4.0.12, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v4.1.0, v4.1.0-BETA1, v4.1.0-BETA2, v4.1.0-BETA3, v4.1.1].
    - apigee/apigee-client-php 2.0.0-alpha2 requires symfony/property-info ^3.4 || ^4.0 -> satisfiable by symfony/property-info[3.4.x-dev, 4.0.x-dev, 4.1.x-dev, 4.2.x-dev, v3.4.0, v3.4.0-BETA1, v3.4.0-BETA2, v3.4.0-BETA3, v3.4.0-BETA4, v3.4.0-RC1, v3.4.0-RC2, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9, v4.0.0, v4.0.0-BETA1, v4.0.0-BETA2, v4.0.0-BETA3, v4.0.0-BETA4, v4.0.0-RC1, v4.0.0-RC2, v4.0.1, v4.0.10, v4.0.11, v4.0.12, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v4.1.0, v4.1.0-BETA1, v4.1.0-BETA2, v4.1.0-BETA3, v4.1.1].
    - apigee/apigee-client-php 2.x-dev requires symfony/property-info ^3.4 || ^4.0 -> satisfiable by symfony/property-info[3.4.x-dev, 4.0.x-dev, 4.1.x-dev, 4.2.x-dev, v3.4.0, v3.4.0-BETA1, v3.4.0-BETA2, v3.4.0-BETA3, v3.4.0-BETA4, v3.4.0-RC1, v3.4.0-RC2, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9, v4.0.0, v4.0.0-BETA1, v4.0.0-BETA2, v4.0.0-BETA3, v4.0.0-BETA4, v4.0.0-RC1, v4.0.0-RC2, v4.0.1, v4.0.10, v4.0.11, v4.0.12, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v4.1.0, v4.1.0-BETA1, v4.1.0-BETA2, v4.1.0-BETA3, v4.1.1].
    - symfony/property-info 3.4.x-dev conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info 4.0.x-dev conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info 4.1.x-dev conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info 4.2.x-dev conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.0 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.0-BETA1 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.0-BETA2 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.0-BETA3 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.0-BETA4 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.0-RC1 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.0-RC2 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.1 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.10 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.11 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.12 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.2 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.3 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.4 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.5 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.6 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.7 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.8 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.9 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.0 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.0-BETA1 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.0-BETA2 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.0-BETA3 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.0-BETA4 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.0-RC1 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.0-RC2 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.1 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.10 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.11 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.12 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.2 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.3 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.4 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.5 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.6 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.7 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.8 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.9 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.1.0 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.1.0-BETA1 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.1.0-BETA2 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.1.0-BETA3 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.1.1 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - Installation request for phpdocumentor/reflection-docblock (locked at 2.0.4) -> satisfiable by phpdocumentor/reflection-docblock[2.0.4].

Expected Behavior

composer require drupal/apigee_edge should install the module and its dependencies seamlessly like it does on 8.5.4

Observed Solution/ Workaround

composer require drupal/apigee_edge installs the module if its run after
composer require phpdocumentor/reflection-docblock:^3.0

DRUP-683 Allows to configure maxBodyLength in FullHttpMessageFormatter

Q A
Bug? no
New Feature? yes
Module Version rc1
PHP Client version n/a
Requires PHP client fix no

Monetization API returns quite a huge API response bodies. The currently hardcoded 1000 characters that the debugger module stores in logs from response bodies may not be enough for debugging MINT API responses. It would be beneficial if this parameter could be configured with a service parameter or a config key.

Is there an upgrade path from D7?

There was a D7 module that provided similar functionality (ie connecting users, apps to apigee)? Is there any kind of migration path for D7?

When clicking a link to view a "Team" entity, "Team Apps" should be shown, instead of "View"...

Per discussions stemming from UX designs, the following changes were agreed upon because the "View" page is not what people typically want to see when clicking a team, nor does a team have typical configurable entity displays. It is secondary at best, since it only allows you to view a team name and status, yet it's prominently featured like the main attraction, which is not useful.

  1. Make "Team Apps" be the default tab viewed when viewing a team.

  2. Change the the local task text of the default entity view from "View" to "Details".

  3. Ensure that when clicking the team name link from the entity collection table on /teams, that this /teams/team/apps.

Add PR template

From @mxr576 : PR template should "require" a link to a Travis build that confirms the build passes with changes in the PR

OAuth Patch for Apigee Edge Client Library for PHP not getting applied

Q A
Bug? yes
New Feature? no
Version 1.0.0-alpha4

Summary

The OAuth Patch for Apigee Edge Client Library for PHP is not getting installed when we run composer.

Steps to Reproduce the behavior

  1. Have a Drupal 8 site running with the apigee_edge module 1.0.0-alpha4 running. Noticed that the patch for OAuth is not installed as the Apigee Client for PHP says it should be if using composer patches.
  2. Ran composer update apigee/apigee-client-php, but the patch was not installed.
  3. Ran composer update drupal/apigee_edge, but the patch was not installed.
  4. Ran composer remove drupal/apigee_edge and then composer require drupal/apigee_edge and the patch was not installed.

What are the steps to get the patch installed on a currently running system? If I reinstall a brand new site, will the patch get applied?

DRUP-687 Prefix CSS selectors in Apigee Edge

Q A
Bug? yes
New Feature? no
Module Version 8.x-1.x
PHP Client version 2.0.1
Requires PHP client fix no

Actual Behavior

The Apigee Edge module adds CSS styles that are too general. Example:

.field {
width: 48%;
display: inline-block;
vertical-align: top;
}
.field--label {
margin-bottom: 1rem;
vertical-align: middle;
font-weight: bold;
word-break: break-all;
padding-right: 1rem;
display: table-cell;
width: 160px;
min-width: 160px;
}

This breaks the layout of field on other pages (where the apigee_edge.app_view library is present) and makes it harder for themes to override.

Proposed Solution

Make this module/element-specific by using a selector prefix. Example: .apigee-foo .field.

[DOC] "Synchronize developers with Apigee Edge" is incomplete

It does not mention available Drush and Drupal commands for developer synchronization.

$ drush apigee-edge:sync --help
Developer synchronization.

Examples:
  drush apigee-edge:sync Starts the developer synchronization between the Developer Portal and the Apigee Edge Management Server. 
 $ drupal apigee_edge:sync --help
  apigee_edge:sync

Options:

Help:
 Developer synchronization between the Developer Portal and the Apigee Edge Management Server.

PHP requirement incompatible with your PHP version (7.0.8)

Q A
Bug? yes
New Feature? no
Module Version N/A
PHP Client version N/A
Requires PHP client fix ?

Actual Behavior

When using the Pantheon's build tools guide to start a Drupal 8 project. When running composer require drupal/apigee_edge, the following output is given:

[InvalidArgumentException]
Package drupal/apigee_edge at version has a PHP requirement incompatible with your PHP version (7.0.8)

Expected Behavior

The module should be easy to install on Pantheon sites.

Steps to Reproduce the behavior

  1. Follow Pantheon's build tools guide to start a Drupal 8 project
  2. Run composer require drupal/apigee_edge

Accessing entity storage in service constructors causes a container error.

Q A
Bug? yes
Module Version 8.x-1.x
PHP Client version N/A
Requires PHP client fix no

Actual Behavior

Rebuilding the container cache will fail if a service used in an entity hook accesses a the entity storage.

Expected Behavior

All services should be Inject-able.

Steps to Reproduce the behavior

Call a service during an entity hook that injects the apigee_edge_teams.team_permissions service.

Proposed Solution

Only the entity type manager in services and don't use then in the constructor.

"Cannot reach management server" error and DeveloperDoesNotExist exception in logs

Q A
Bug? yes
New Feature? no
Module Version dev branch
PHP Client version 7.1.25
Requires PHP client fix no

Actual Behavior

What is the actual behavior?

I was able successfully connect to Apigee Edge after completing a fresh install of the Apigee Developer Portal Kickstart module. however, when I click on "My Apps", the connection fails and I get the following error in the log files:

Drupal\apigee_edge\Exception\DeveloperDoesNotExistException: Developer with [email] email address not found. in Drupal\apigee_edge\Entity\ListBuilder\DeveloperAppListBuilderForDeveloper->checkDeveloperStatus() (line 48 of /app/web/modules/contrib/apigee_edge/src/Entity/DeveloperStatusCheckTrait.php).

Expected Behavior

What is the behavior you expect?

I expect to see a list of apps associated with the product.

Steps to Reproduce the behavior

Proposed Solution

Although I was listed as an org administrator for the org I was connecting to, I had not been added as a Developer. Manually adding myself as a developer to the org fixed the problem. A developer sync through the Drupal admin might fix it as well.

Track release notes in CHANGELOG.md

Initially, it seemed to be a good idea to store and publish changes in a new release as release notes on Drupal.org. This is/was the Drupal way. Although this approach always caused extra work for us, we had to go through all new commits since the previous release and figure out what should we add to the release notes. This process is also prone to error.

If we would use the CHANGELOG.md for tracking changes, then we could add new entries to the release notes as part of a PR. We would not need to check back before a release what has changed since the previous version, because it would be in the CHANGELOG.md already, we would need to tag the list of changes with a release number. The related section in the CHANGELOG.md could be deeplinked in a release note on Drupal.org.

Make the contents Team List/Members/Apps row contents theme-able.

Since we do not have Views module to work with, and there has been no extra attempt to make these pages customizable, these pages are nearly impossible to customize in a theme.

The following contents are in these tables (across a few pages), and we should at least attempt to make them more easily customizable without having to write custom modules / controllers.

Column Theme-able? Suggestion
Team/Member name No Use a template that allows for changing the link text and URL.
Roles Almost item-list.html.twig is used, but that is not enough, as no context is provided. Suggestions should be used, e.g. '#theme' => 'item_list__member_roles'
Status Yes Custom template implementation, status-property.html.twig exists. ๐Ÿ‘
Operations No #type => 'operations' is a wrapper around a more targeted links suggestion: links__dropbutton__operations. Beyond that no context is available, so it's not possible to make any changes to this, without making them globally. More targeted theme hook suggestions should exist, so the context can be determined, and this element on teams, team members, or both can be targeted and customized if desired. For example, on "Teams" the drop button contains "Team Apps", "Members", "Edit" and "Delete". Viewing Team Apps/Members is not technically an operation, and it's reasonable to prefer to only print the actual operations, "edit" and "delete" and present them as simple links with icons, like: operations This same example/pattern should also be applicable to the team members list.

Allow ApiProducts entities to be rendered.

Q A
Bug? no
New Feature? yes
Module Version 8.x-1.x
PHP Client version N/A
Requires PHP client fix no

Actual Behavior

ApiProduct entities are not renderable because they are not fieldable.

Expected Behavior

ApiProduct entities would be renderable.

\Drupal::entityTypeManager()
        ->getViewBuilder('api_product')
        ->view($product)

Steps to Reproduce the behavior

Not a bug.

Proposed Solution

Either create a \Drupal\apigee_edge\Entity\ViewBuilder\EdgeEntityViewBuilder class that can handle displaying an edge entity without making it fieldable or make the ApiProduct entity fieldable so it can be rendered. The latter is probably a better solution.

DRUP-666 Travis: Automatically execute API Docs module tests

Q A
Bug? yes
New Feature? no
Module Version rc1
PHP Client version N/A
Requires PHP client fix no

Expected Behavior

Travis should automatically execute PHPUnit tests provided by the API docs module, just like it does for other submodules.

product_access_control` placeholder field

Do you know how to resolve this displaying in the Status Report of Drupal 8.7.2

ENTITY/FIELD DEFINITIONS
Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
API Doc
The product_access_control placeholder field needs to be installed.

DRUP-639 Drupal 8.7 support

Drupal 8.7 is coming (expected release date: May 1, 2019) and we should decide how we handle this as we are also close to the first stable release.

A few possible options:

  • Wait with our stable release until Drupal 8.7.0 is out and bump minimum requirements of our modules to 8.7.0.
  • If we release our first stable before 8.7.0 is out, then keep supporting Drupal 8.6.0 (for a year maximum and
    • keep everything in the current 8.1.x branch. This means we can not use any new APIs introduced in Drupal 8.7.
    • keep the current 8.1.x branch that is compatible with < Drupal 8.7.0. We would only provide security fixes for this 8.1.x versions. (Just like Drupal core does for any previous minor release.) Introduce a new 8.2.x branch that minimum requirement is Drupal 8.7.0, and that is going to be the actively supported and maintained version. This approach leaves a door open to customers to postpone update to Drupal 8.7.0 just because of the Apigee Edge module. It also allows us to use new APIs introduced in Drupal 8.7.0 and remove usage of all deprecated APIs in Drupal 8.7.0 from our code.

Related:

Deprecation notices when running entity tests.

Q A
Module Version. 1.0.0-alpha8
Requires PHP client fix no

Actual Behavior

When running tests, I am getting a notice about the new entity.memory_cache not being included in the storage controller for Apigee entities.

Remaining deprecation notices (1)

  1x: The $memory_cache parameter was added in Drupal 8.6.x and will be required in 9.0.0. See https://www.drupal.org/node/2973262
    1x in RatePlanEntityKernelTest::testEntityInstantiation from Drupal\Tests\apigee_m10n\Kernel

Steps to Reproduce the behavior

I haven't tried running the edge tests lately but I imagine you would get the same error.

Proposed Solution

Adding the service to \Drupal\apigee_edge\Entity\Storage\EdgeEntityStorageBase would be the thing to do if it is going to be useful. If it's not going to be useful this issue could be the place to note why the service isn't included.

REQUIREMENT_ERROR during install

Q A
Bug? yes
New Feature? no
Module Version 1.0.0-rc5
PHP Client version 2.0.2
Requires PHP client fix no

Actual Behavior

Installing via core/install.php fails on the "Verify requirements" tab. The install process cannot continue past this point.

Expected Behavior

Able to install successfully.

Steps to Reproduce the behavior

  • git clone https://github.com/laughingbiscuit/docker-apigee-drupal-kickstart.git
  • cd docker-apigee-drupal-kickstart/
  • ./start.sh
  • open a browser tab for localhost:8080
  • click "continue with english"

Screen Shot 2019-05-28 at 2 43 13 PM

Proposed Solution

The hook_requirements() in https://github.com/apigee/apigee-edge-drupal/blob/8.x-1.x/modules/apigee_edge_apidocs/apigee_edge_apidocs.install is the source of this error.

Use REQUIREMENTS_WARNING for all phases? If you want it to be an error on the status report page, check for $phase == 'runtime'.

Decouple field to attribute and attribute to field value conversion

Q A
Bug? no
New Feature? yes
Module Version 1.0.0-alpha8
Requires PHP client fix no

Proposed Solution

As a follow up on #76 decouple field to attribute and attribute to field value conversion from FieldableEdgeEntityBaseTrait to the field_attribute converter service. If we do this then the built-in conversation can be easily replaced/enhanced with a custom, project specific implementation by using the service decorator pattern.

Getting file_private_path error during Edge configuration

Q A
Bug? yes
New Feature? no
Module Version dev branch
PHP Client version 7.1.25
Requires PHP client fix no

When setting up the Edge configuration for the connection the the Developer Portal, the connection fails even when the private file path is updated in the settings.php. The error message states: "Unable to initialize configuration. The Apigee Edge connection settings are not configured... Make sure the file_private_path is configured and try again."

Steps to Reproduce the behavior

  1. Installed Apigee Kickstart and Drupal 8 using Lando
  2. Changed permissions to modify the settings.php in web/sites/default/settings.php
  3. Changed file_private_path to '/app/private'
  4. Saved, cleared caches in D8
  5. Checked Configuration >Media>File System to make sure that the private file path was captured

On Edge configuration page:

screen shot 2019-02-28 at 10 01 49 am

DRUP-667 Display expired credentials as such

Q A
Bug? yes
New Feature? no
Module Version 8.x-1.0-beta2
PHP Client version 2.0.1
Requires PHP client fix no

Actual Behavior

When a credential is expired, it is displayed on the app details page like:

Expires: 17 minutes 25 seconds ago
Key Status: approved

I understand that this is what the management server returns, but it's still confusing to the end users as they can't use this credential.

Expected Behavior

Key Status: expired

Steps to Reproduce the behavior

  • On Edge's web UI, create a credential for an app with the expiration set to duration/2 minutes.
  • Wait at least those 2 minutes.
  • (Re)Load this app's details page in Drupal.

Proposed Solution

template_preprocess_app_credential() in apigee_edge.module:998 could be changed to display expired as #value and StatusPropertyElement::INDICATOR_STATUS_ERROR as #indicator_status when the credential is expired.

"Apps" menu links does not respect the plural label of the developer apps entity anymore

Before #183 the "My Apps" menu link title always reflected the plural label (alias) of the developer app entity. For example, if the alias was "Foo" (singular) and "Foos" (plural) then the title of the "My Apps" menu item was "My Foos". Since #183 it is hard-coded to "Apps".
Even if the "My" prefix has been removed, it should respect and display the plural label of the developer app entity.

DRUP-735 apigee_auth key does not validate credentials

Q A
Bug? yes
New Feature? no
Module Version 8.x-1.x
PHP Client version 2.0.1
Requires PHP client fix no

Actual Behavior

Credentials submitted via the admin/config/system/keys/manage/apigee_edge_connection_default are not validated against Apigee connection.

Expected Behavior

The connection for credentials provided should be validated.

Steps to Reproduce the behavior

  1. Edit the auth key at admin/config/system/keys/manage/apigee_edge_connection_default
  2. Select Configuration as the key provider.
  3. Enter any random values.
  4. Save.

The random values are saved.

Proposed Solution

Extend \Drupal\apigee_edge\Plugin\KeyType\ApigeeAuthKeyType::validateKeyValue to validate values provided for the key. Maybe extract \Drupal\apigee_edge\Form\AuthenticationForm::validateForm somewhere and reuse?

Setting up Org Connection with custom SSL certificates in Drupal 8

Hi Team ,

Can you please help in setting up Org Connection in Devportal(Drupal 8) with custom SSL Certs?

In Drupal 7 we have altered the hook devconnect_org_settings and added custom certifficates as 'http_options' , but i couldn't find the hook to alter the org settings in Drupal 8.

Form save issue - General Config

Q A
Bug? yes
New Feature? no
Module Version beta1
PHP Client version 7.1 & 7.2
Requires PHP client fix no

Actual Behavior

Form save didn't work, Test connection worked. Tried to visit /user/apps page gives connection unsuccessful error.

Expected Behavior

Form should save credentials, and connection should be successful if credentials are correct.

Steps to Reproduce the behavior

Install fresh vanilla version of Drupal 8.6.2
Install Composer dependencies
Install apigee_edege module using composer
Enable module
Try to set config.
After trying to test connection connection was successful, Save button is disabled.
After trying to save form - Form save happens but all variables are reset.
Tried to open MyApps page - says connection unsuccessful.

edge_connection_test

config_saved

myapps_page

DRUP-734 \Drupal\apigee_edge\Form\AuthenticationForm does not update key on submit

Q A
Bug? yes
New Feature? no
Module Version 8.x-1.x
PHP Client version 2.0.1
Requires PHP client fix no

Actual Behavior

On submit, the \Drupal\apigee_edge\Form\AuthenticationForm does not update the active key.

Expected Behavior

The active key should be updated when the \Drupal\apigee_edge\Form\AuthenticationForm form is submitted.

Steps to Reproduce the behavior

  1. Enable Apigee Edge.
  2. Visit /admin/config/system/keys and edit the default key.
  3. Select Configuration as the key provider.
  4. Add credentials and save. Credentials are saved successfully.
  5. Visit /admin/config/apigee-edge/settings
  6. Enter credentials and save.
  7. Credentials are NOT updated.

Proposed Solution

Replace

$this->activeKey
->getKeyProvider()
->setKeyValue($this->activeKey, $processed_submitted);
}

With

$this->activeKey->setKeyValue($processed_submitted);
$this->activeKey->save();

$this->activeKey->save() will call the keyProvider->setKeyValue automatically. See \Drupal\key\Entity\Key::preSave

[ERROR] Malformed inline YAML string:

[ERROR] Malformed inline YAML string: [ '@apigee_edge.sdk_connector',
'@apigee_edge.controller.organization',
'@apigee_edge_teams.controller.cache.team',
'@apigee_edge_teams.controller.cache.team_ids',
'@apigee_edge.entity.controller.cache.general_app_cache_by_owner_factor
y', '@apigee_edge.entity.controller.cache.app_name_by_owner_factory',
'@apigee_edge_teams.cache.company_membership_object',
'@apigee_edge.controller.cache.developer_companies', at line 25 (near "
'@apigee_edge.controller.cache.developer_companies',")

Create a guide for developers

I think we would should create guide for developers that describes how they should integrate with this module.

Add to developer guide

  • We do our best to follow Drupal 8's backward-compatibility policy after the BETA1 release: https://www.drupal.org/core/d8-bc-policy
  • If an entity controller from the PHP API client has an entity controller service in Drupal (Drupal\apigee_edge\Entity\Controller) you should always use that for performing API calls. If it does not have yet, it is still recommended to create your own controller service for that and use that instead of the entity controller from the PHP API Client directly.
  • For performing CRUDL operations on Apigee Edge entities it is highly recommended to always use the well-known Drupal entity storages (Drupal\apigee_edge\Entity\Storage) instead of entity controller services (Drupal\apigee_edge\Entity\Controller). Among the many other reasons for this recommendation, one of the major one is: persistent caching is only implemented on Drupal entity classes.
  • For non-CRUDL operations (like changing status of a developer) which are intentionally not supported by entity storage classes (because it is not their scope to perform these API calls) it is perfectly fine to use entity controller services.

TODOs

  • Finalize "Add to developer guide"
  • Resolve all TBDs

TBD

  • Where this guide for developer should be hosted?
    • Github Wiki?
    • A documentation page in Drupal.org?
    • A new markdown file in this repo?
    • ... ?

Tried installing the module on the Pantheon Drupal 8 repository failed because of dependencies.

I see the following dependency errors when I try to install the drupal/apigee_edge module on the D8 pantheon repository. You can also produce this by following Composer install Option C on drupal.org docs.


composer create-project drupal/drupal my_site_name_dir
composer require drupal/apigee_edge

Using version ^1.0@alpha for drupal/apigee_edge
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for drupal/apigee_edge ^1.0@alpha -> satisfiable by drupal/apigee_edge[1.0.0-alpha1].
    - Conclusion: don't install phpdocumentor/reflection-docblock 2.0.4
    - drupal/apigee_edge 1.0.0-alpha1 requires apigee/apigee-client-php ^2.0 -> satisfiable by apigee/apigee-client-php[2.0.0-alpha1, 2.x-dev].
    - apigee/apigee-client-php 2.0.0-alpha1 requires symfony/property-info ^3.4 || ^4.0 -> satisfiable by symfony/property-info[3.4.x-dev, 4.0.x-dev, 4.1.x-dev, 4.2.x-dev, v3.4.0, v3.4.0-BETA1, v3.4.0-BETA2, v3.4.0-BETA3, v3.4.0-BETA4, v3.4.0-RC1, v3.4.0-RC2, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9, v4.0.0, v4.0.0-BETA1, v4.0.0-BETA2, v4.0.0-BETA3, v4.0.0-BETA4, v4.0.0-RC1, v4.0.0-RC2, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v4.1.0-BETA1].
    - apigee/apigee-client-php 2.x-dev requires symfony/property-info ^3.4 || ^4.0 -> satisfiable by symfony/property-info[3.4.x-dev, 4.0.x-dev, 4.1.x-dev, 4.2.x-dev, v3.4.0, v3.4.0-BETA1, v3.4.0-BETA2, v3.4.0-BETA3, v3.4.0-BETA4, v3.4.0-RC1, v3.4.0-RC2, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9, v4.0.0, v4.0.0-BETA1, v4.0.0-BETA2, v4.0.0-BETA3, v4.0.0-ETA4, v4.0.0-RC1, v4.0.0-RC2, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v4.1.0-BETA1].
    - symfony/property-info 3.4.x-dev conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info 4.0.x-dev conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info 4.1.x-dev conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info 4.2.x-dev conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.0 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.0-BETA1 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.0-BETA2 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.0-BETA3 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.0-BETA4 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.0-RC1 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.0-RC2 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.1 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.2 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.3 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.4 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.5 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.6 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.7 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.8 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v3.4.9 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.0 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.0-BETA1 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.0-BETA2 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.0-BETA3 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.0-BETA4 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.0-RC1 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.0-RC2 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.1 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.2 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.3 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.4 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.5 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.6 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.7 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.8 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.0.9 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - symfony/property-info v4.1.0-BETA1 conflicts with phpdocumentor/reflection-docblock[2.0.4].
    - Installation request for phpdocumentor/reflection-docblock (locked at 2.0.4) -> satisfiable by phpdocumentor/reflection-docblock[2.0.4].

Installation failed, reverting ./composer.json to its original content.

API product access tab missing from API Product Admin settings

Q A
Bug? yes
New Feature? no
Module Version 2473dfa dev-8.x-1.x-smartdocs
PHP Client version 2.0.1
Requires PHP client fix no

Actual Behavior

The API product settings admin page is missing the "API product access" tab, it is being shown on the "Developers" tab
Screen Shot 2019-05-03 at 5 01 14 PM

Expected Behavior

Should display on "API product" settings page

Steps to Reproduce the behavior

Go to admin/config/apigee-edge/product-settings/alias, you will see "API product access" tab is missing.

Proposed Solution

Change tab to display on "API product" settings page

smartdocs/openapi feature/question

Q A
Bug? no
New Feature? yes
Module Version Version or commit SHA
This can be the version you can see on admin/modules in Drupal or the output of this command: composer show
PHP Client version Version or commit SHA
This can be the output of this command: composer show
Requires PHP client fix no

Question/Comment

The current apigee-drupal supports a smartdocs (Swagger/Open-API Spec). Is this feature in the roadmap? Or, will you recommend third-party modules -- openapi-ui module, etc..

Custom attributes (app/ developer) returning an array to edge

Q A
Bug? Believe so

Actual Behavior

Custom attribute, may it be for a developer or developer app is returning an array in Edge UI.

Expected Behavior

Expect to just see the value in the custom attribute area of the entity (developer/ app) on the edge UI. This was functioning as expected with D7 devconnect module.

Steps to Reproduce the behavior

  1. Create a custom attribute for a developer or developer app using UI on the Configuration -> Apigee Edge -> App Settings -> Manage fields or Configuration -> People -> Account settings pages

  2. Create a developer or developer app from the DevPortal with some value entered for the custom attribute field created in the previous step

  3. Open Edge UI and access the custom attribute under the entity (developer or app) - should see an array in the "Value" column

image

Proposed Solution

Populate just value from the array

Throw more meaningful/ helpful error messages when Apigee edge API returns exception.

Is your feature request related to a problem? Please describe.
Noticed an issue when upon clicking on "Apps" as an external developer, error Cannot reach management server. An administrator should check the configuration of this site. was thrown. This was not helpful as the connection test on "Apigee edge general settings" page was returning successful test results. It was only when debug was enabled, the error indicated a possible issue with permissions:

Forbidden Apigee\Edge\HttpClient\Plugin\ResponseHandlerPlugin->decodeResponse() (line 104 of /home/D8/vendor/apigee/apigee-client-php/src/HttpClient/Plugin/ResponseHandlerPlugin.php).
#0 /home/D8/vendor/apigee/apigee-client-php/src/HttpClient/Plugin/ResponseHandlerPlugin.php(69): Apigee\Edge\HttpClient\Plugin\ResponseHandlerPlugin->decodeResponse(Object(GuzzleHttp\Psr7\Response), Object(GuzzleHttp\Psr7\Request))
#1 /home/D8/vendor/php-http/httplug/src/Promise/HttpRejectedPromise.php(33): Apigee\Edge\HttpClient\Plugin\ResponseHandlerPlugin->Apigee\Edge\HttpClient\Plugin\{closure}(Object(Http\Client\Exception\HttpException))
#2 /home/D8/vendor/apigee/apigee-client-php/src/HttpClient/Plugin/ResponseHandlerPlugin.php(75): Http\Client\Promise\HttpRejectedPromise->then(Object(Closure), Object(Closure))
#3 /home/D8/vendor/php-http/client-common/src/PluginClient.php(161): Apigee\Edge\HttpClient\Plugin\ResponseHandlerPlugin->handleRequest(Object(GuzzleHttp\Psr7\Request), Object(Closure), Object(Closure))
#4 /home/D8/vendor/php-http/client-common/src/Plugin/HistoryPlugin.php(39): Http\Client\Common\PluginClient->Http\Client\Common\{closure}(Object(GuzzleHttp\Psr7\Request))
#5 /home/D8/vendor/php-http/client-common/src/PluginClient.php(161): Http\Client\Common\Plugin\HistoryPlugin->handleRequest(Object(GuzzleHttp\Psr7\Request), Object(Closure), Object(Closure))
#6 /home/D8/vendor/php-http/client-common/src/Plugin/AuthenticationPlugin.php(36): Http\Client\Common\PluginClient->Http\Client\Common\{closure}(Object(GuzzleHttp\Psr7\Request))
#7 /home/D8/vendor/php-http/client-common/src/PluginClient.php(161): Http\Client\Common\Plugin\AuthenticationPlugin->handleRequest(Object(GuzzleHttp\Psr7\Request), Object(Closure), Object(Closure))
#8 /home/D8/vendor/php-http/client-common/src/Plugin/HeaderDefaultsPlugin.php(41): Http\Client\Common\PluginClient->Http\Client\Common\{closure}(Object(GuzzleHttp\Psr7\Request))
#9 /home/D8/vendor/php-http/client-common/src/PluginClient.php(161): Http\Client\Common\Plugin\HeaderDefaultsPlugin->handleRequest(Object(GuzzleHttp\Psr7\Request), Object(Closure), Object(Closure))
#10 /home/D8/vendor/php-http/client-common/src/Plugin/AddHostPlugin.php(64): Http\Client\Common\PluginClient->Http\Client\Common\{closure}(Object(GuzzleHttp\Psr7\Request))
#11 /home/D8/vendor/php-http/client-common/src/Plugin/BaseUriPlugin.php(45): Http\Client\Common\Plugin\AddHostPlugin->handleRequest(Object(GuzzleHttp\Psr7\Request), Object(Closure), Object(Closure))
#12 /home/D8/vendor/php-http/client-common/src/Plugin/AddPathPlugin.php(58): Http\Client\Common\Plugin\BaseUriPlugin->Http\Client\Common\Plugin\{closure}(Object(GuzzleHttp\Psr7\Request))
#13 /home/D8/vendor/php-http/client-common/src/Plugin/BaseUriPlugin.php(49): Http\Client\Common\Plugin\AddPathPlugin->handleRequest(Object(GuzzleHttp\Psr7\Request), Object(Closure), Object(Closure))
#14 /home/D8/vendor/php-http/client-common/src/PluginClient.php(161): Http\Client\Common\Plugin\BaseUriPlugin->handleRequest(Object(GuzzleHttp\Psr7\Request), Object(Closure), Object(Closure))
#15 /home/D8/vendor/php-http/client-common/src/PluginClient.php(175): Http\Client\Common\PluginClient->Http\Client\Common\{closure}(Object(GuzzleHttp\Psr7\Request))
#16 /home/D8/vendor/php-http/client-common/src/PluginClient.php(88): Http\Client\Common\PluginClient->Http\Client\Common\{closure}(Object(GuzzleHttp\Psr7\Request))
#17 /home/D8/vendor/apigee/apigee-client-php/src/Client.php(241): Http\Client\Common\PluginClient->sendRequest(Object(GuzzleHttp\Psr7\Request))
#18 /home/D8/vendor/apigee/apigee-client-php/src/Client.php(388): Apigee\Edge\Client->sendRequest(Object(GuzzleHttp\Psr7\Request))
#19 /home/D8/vendor/apigee/apigee-client-php/src/Client.php(193): Apigee\Edge\Client->send('GET', Object(GuzzleHttp\Psr7\Uri), Array, NULL)
#20 /home/D8/vendor/apigee/apigee-client-php/src/Controller/PaginationHelperTrait.php(277): Apigee\Edge\Client->get(Object(GuzzleHttp\Psr7\Uri))
#21 /home/D8/vendor/apigee/apigee-client-php/src/Controller/PaginationHelperTrait.php(320): Apigee\Edge\Api\Management\Controller\AppByOwnerController->getResultsInRange(Object(class@anonymous), Array)
#22 /home/D8/vendor/apigee/apigee-client-php/src/Controller/PaginationHelperTrait.php(139): Apigee\Edge\Api\Management\Controller\AppByOwnerController->listEntityIdsWithCps(NULL, Array)
#23 /home/D8/vendor/apigee/apigee-client-php/src/Controller/PaginatedEntityIdListingControllerTrait.php(35): Apigee\Edge\Api\Management\Controller\AppByOwnerController->listEntityIds(NULL)
#24 /home/D8/web/modules/contrib/apigee_edge/src/Entity/Controller/CachedPaginatedEntityIdListingControllerTrait.php(70): Apigee\Edge\Api\Management\Controller\AppByOwnerController->getEntityIds(NULL)
#25 /home/D8/web/modules/contrib/apigee_edge/src/Entity/Query/AppQueryBase.php(169): Drupal\apigee_edge\Entity\Controller\AppByOwnerController->getEntityIds()
#26 /home/D8/web/modules/contrib/apigee_edge/src/Entity/Query/Query.php(86): Drupal\apigee_edge\Entity\Query\AppQueryBase->getFromStorage()
#27 /home/D8/web/modules/contrib/apigee_edge/src/Entity/ListBuilder/EdgeEntityListBuilder.php(71): Drupal\apigee_edge\Entity\Query\Query->execute()
#28 /home/D8/web/core/lib/Drupal/Core/Entity/EntityListBuilder.php(86): Drupal\apigee_edge\Entity\ListBuilder\EdgeEntityListBuilder->getEntityIds()
#29 /home/D8/web/profiles/contrib/apigee_devportal_kickstart/modules/custom/apigee_kickstart_enhancement/src/Entity/ListBuilder/DeveloperAppListBuilder.php(35): Drupal\Core\Entity\EntityListBuilder->load()
#30 [internal function]: Drupal\apigee_kickstart_enhancement\Entity\ListBuilder\DeveloperAppListBuilder->render()
#31 /home/D8/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#32 /home/D8/web/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#33 /home/D8/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#34 /home/D8/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#35 /home/D8/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#36 /home/D8/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#37 /home/D8/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#38 /home/D8/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#39 /home/D8/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#40 /home/D8/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#41 /home/D8/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#42 /home/D8/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#43 /home/D8/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#44 /home/D8/web/core/lib/Drupal/Core/DrupalKernel.php(693): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#45 /home/D8/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#46 {main}

Describe the solution you'd like
The generic error Cannot reach management server seems to indicate a possible connectivity issue between portal and edge API which was not the case here. Better error translation is needed to quickly diagnose such issues.

Describe alternatives you've considered
Enabling apigee debug module and then cross checking "devadmin" user permissions on edge helped narrow down the issue.

Additional context
None.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.