2017 © Pedro Peláez
 

library wppm

Package Manager for WordPress

image

hotsource/wppm

Package Manager for WordPress

  • Wednesday, November 16, 2016
  • by mzalewski
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

WPPM

Composer-based package manager for WordPress

This libraries simplifies dependency management for WordPress plugins (and soon themes)., (*1)

When installed in a WordPress site, a WPPM-enabled plugin will automatically resolve conflicts with other Composer-based plugins., (*2)

If a plugin cannot be resolved, the user will be notified that there is a problem and instructed to either disable the plugin or talk to a developer to resolve it manually., (*3)

Why is something like WPPM required?

Unless you have a fully composer-enabled WordPress install (eg: roots.io/bedrock), plugins will attempt to load all of their dependencies. When two plugins include the same dependency (different versions), first-to-be-loaded wins., (*4)

If one of those plugins is not compatible with the loaded dependency, the site could completely break - or worse (IMO), it could not show any errors until a visitor attempt to do something that uses a missing feature., (*5)

How to use

To add Composer support to your plugin, you will need to do the following:, (*6)

1 - Add hotsource/wppm to your required packages., (*7)

2 - Run composer install, (*8)

3 - Add the following code snippet to autoload your plugin:, (*9)

require_once __DIR__ . "/vendor/hotsource/wppm/wppm.php"; if ( ! WPPM::autoload( __FILE__ ) ) return;, (*10)

Other notes

WPPM::autoload() will return a boolean value indicating whether or not your plugin successfully loaded all dependencies. If it returns false, it's best to simply "return;" as this would prevent your plugin from continuing to load. A notification about the issue will be shown in the WP Admin area., (*11)

The Versions

16/11 2016

dev-master

9999999-dev

Package Manager for WordPress

  Sources   Download

GNU General Public License v2.0

The Requires

 

by Matthew Zalewski

16/11 2016

0.1.3.1-alpha

0.1.3.1-alpha

Package Manager for WordPress

  Sources   Download

GNU General Public License v2.0

The Requires

 

by Matthew Zalewski

16/11 2016

0.1.3-alpha

0.1.3.0-alpha

Package Manager for WordPress

  Sources   Download

GNU General Public License v2.0

The Requires

 

by Matthew Zalewski

16/11 2016

0.1.2-alpha

0.1.2.0-alpha

Package Manager for WordPress

  Sources   Download

GNU General Public License v2.0

The Requires

 

by Matthew Zalewski

15/11 2016

0.1.1-alpha

0.1.1.0-alpha

Package Manager for WordPress

  Sources   Download

GNU General Public License v2.0

The Requires

 

by Matthew Zalewski

15/11 2016

v0.1.0-alpha

0.1.0.0-alpha

Package Manager for WordPress

  Sources   Download

GNU General Public License v2.0

The Requires

 

by Matthew Zalewski