Hello,

So I've discovered you are insisting on bundling your module with the geoPHP library.

I can't tell you how much wrong that is.
Pretty much everyone has told you that already.
You have issues and issues after issues filled with comments explaining and people complaining about related issues all over the place.

Isn't it time to fix the source of all these problems, the proper way?
The norm, is to implement Libraries API, which btw, it's part of Drupal 8 Core.

The fix is simple:

  • Implement dependency on Libraries API 2.x
  • Implement Libraries API hook
  • Remove the geoPHP directory from the code

It's simple as 1,2,3.

It also makes me think why does even this module exist, given it only has 1 hook and 1 function:
- geophp_requirements
- geophp_load (which horribly tries to load stuff via libraries)

Anyways, back to the quick fix...
Remove all that nonsense.

The correct way to implement libraries is like this.

geophp.module

/**
 * Implements hook_libraries_info().
 */
function geophp_libraries_info() {
  $libraries['geophp'] = array(
    'name' => 'geoPHP plugin',
    'vendor url' => 'https://github.com/phayes/geoPHP',
    'download url' => 'https://github.com/phayes/geoPHP/archive/1.2.zip',
    'version callback' => '_geophp_version_callback',
    'files' => array(
      'php' => array(
        'geoPHP.inc',
      ),
    ),
  );

  return $libraries;
}

function _geophp_version_callback() {
  return '1.2';
}

geophp.info

name = geoPHP
description = Wraps the geoPHP library: advanced geometry operations in PHP
core = 7.x
files[php][] = geoPHP.inc

Comments

lpalgarvio created an issue. See original summary.

lpalgarvio’s picture

Issue summary: View changes
lpalgarvio’s picture

Issue summary: View changes
Neslee Canil Pinto’s picture

Status: Active » Closed (outdated)