Skip to content
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

PSR-4 compliance & class autoloading #15

Open
jameswilson opened this issue Aug 13, 2018 · 0 comments
Open

PSR-4 compliance & class autoloading #15

jameswilson opened this issue Aug 13, 2018 · 0 comments

Comments

@jameswilson
Copy link

jameswilson commented Aug 13, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant