Skip to content

Isolate /vendor dependencies to prevent conflicts #437

Description

@kasparsd

Describe the bug

The plugin currently composer-requires mlocati/ip-lib which is loaded via require_once __DIR__ . '/vendor/autoload.php' in the plugin bootstrap file.

When using this plugin on projects with other dependencies that also rely on mlocati/ip-lib (at different version), there is a PHP error due to the duplicate loading of IPLib\Factory class.

Steps to Reproduce

  1. Create an empty WP project with a minimal plugin that requires and loads mlocati/ip-lib via /vendor/autoload.php of that plugin.

  2. Install and activate this plugin and note the fatal error due to duplicate definition of IPLib\Factory class.

Screenshots, screen recording, code snippet

No response

Environment information

  • n/a: any server capable or running WP and this plugin.

WordPress information

Latest WP 7.1.

Code of Conduct

  • I agree to follow this project's Code of Conduct

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