Skip to content

PSR-4 compliance & class autoloading #15

Description

@jameswilson
require_once __DIR__ . '/lib/EBSCODocument.php';

In order to follow modern PHP best practices, the Drupal 8 ebsco.module file and the various classes in the lib folder should be refactored to use PSR-4 autoloading.

A more complete solution however would be to consider extracting EBSCODocument and all the other classes into a separate repository, so they can be exposed to Packagist, and installed via a composer dependency in the Drupal module's composer.json this would mean that any PHP project (eg Symfony or Laravel) could benefit from using these classes.

See Drupal 8 Coding Standards for PSR-4 Namespaces and Autoloading

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions