• Stars
    star
    702
  • Rank 64,499 (Top 2 %)
  • Language
    PHP
  • License
    MIT License
  • Created over 11 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

WordPress Packagist β€” manage your plugins with Composer

WordPress Packagist

This is the repository for wpackagist.org which allows WordPress plugins and themes to be managed along with other dependencies using Composer.

More info and usage instructions at wpackagist.org or follow us on Twitter @wpackagist.

For support and discussion, please use the issue tracker above.

Usage

Example composer.json:

{
    "name": "acme/brilliant-wordpress-site",
    "description": "My brilliant WordPress site",
    "repositories":[
        {
            "type":"composer",
            "url":"https://wpackagist.org",
            "only": ["wpackagist-plugin/*", "wpackagist-theme/*"]
        }
    ],
    "require": {
        "aws/aws-sdk-php":"*",
        "wpackagist-plugin/akismet":"dev-trunk",
        "wpackagist-plugin/wordpress-seo":">=7.0.2",
        "wpackagist-theme/hueman":"*"
    },
    "autoload": {
        "psr-0": {
            "Acme": "src/"
        }
    }
}

WordPress core

This does not provide WordPress itself.

See https://github.com/fancyguy/webroot-installer or https://github.com/roots/wordpress.

How it works

WPackagist implements the wordpress-plugin and wordpress-theme Composer Installers (https://github.com/composer/installers).

It essentially provides a lookup table from package (theme or plugin) name to WordPress.org SVN repository. Versions correspond to different tags in their repository, with the special dev-trunk version being mapped to trunk.

Note that to maintain Composer v1 compatibility (as well as v2) for dev- versions, for now we need to use the VersionParser from composer/composer v1.x and not a newer release branch. Correct resolution of these depends on the legacy behaviour where dev-trunk et al. correspond to

"version_normalized":"9999999-dev"

The lookup table is provided as a hierarchy of static JSON files. The entry point to these files can be found at https://wpackagist.org/packages.json, which consists of a series of sub-tables (each as its own JSON file). These sub-tables are grouped by last commit date (trying to keep them roughly the same size), and contain references to individual packages. Each package has its own JSON file detailing its versions; these can be found in https://wpackagist.org/p/wpackagist-{theme|plugin}/{package-name-and-hash}.json.

Version format limitations

Currently, Wpackagist can only process packages with up to 4 parts in their version numbers, in line with the internal handling of Composer v1.x.

Running Wpackagist

Installing

  1. Make sure you have Composer dependencies installed, including extensions.
  2. Make .env.local, overriding anything you want to from .env.
  3. (Only if you're going to skip using a database for PackageStore): ensure sure your PACKAGE_PATH directory is writable.
  4. Run composer install to install dependencies.
  5. Populate the database and package files (see steps below).
  6. Point your Web server to web. A .htaccess is provided for Apache.

Updating the database

The first database population may easily take hours. Be patient.

  1. bin/console doctrine:migrations:migrate: Ensure the database schema is up to date with the code.
  2. bin/console refresh: Query the WordPress.org SVN in order to find new and updated packages.
  3. bin/console update: Update the version information for packages identified in 2. Uses the WordPress.org API.
  4. bin/console build: Rebuild all PackageStore data.

Running locally with Docker

This may be simpler than setting up native dependencies, but is experimental.

To prepare environment variables:

cp .env .env.local

and edit as necessary.

To set up and update the database:

docker-compose run --rm cron composer install
docker-compose run --rm cron deploy/migrate-db.sh
docker-compose run --rm cron

To start a web server on localhost:30100:

docker-compose up web adminer

Services

Live deployments

CircleCI is used to deploy the live app on ECS.

Automatic deploys run:

See .circleci/config.yml for full configuration.

More Repositories

1

kasia

🎩 A React Redux toolset for the WordPress API
JavaScript
218
star
2

sync

Sync directory contents over HTTP using PHP
PHP
56
star
3

oowp

OOWP is a tool for WordPress theme developers that makes templating in WordPress more sensible.
PHP
41
star
4

kasia-boilerplate

🎩 A universal application boilerplate with Kasia
JavaScript
16
star
5

routemaster

Improved routing for WordPress
PHP
13
star
6

wp-api-response-modify

Makes WP API response JSON sensible
JavaScript
8
star
7

nodejs-mean-with-brunch-sass-passport

An Outlandish Example MEAN Web Application using Brunch, Sass, and Passport
JavaScript
8
star
8

OowpBundle

Object Oriented WordPress
PHP
7
star
9

poppler-build

A convenience repository to build and host poppler-utils for use in AWS Lambda functions
5
star
10

calendar-event-sync

WordPress plugin that saves Google Calendar events to your WordPress database as posts
PHP
5
star
11

outlandish-smtp

Provides a number of different ways to set how WordPress sends emails
PHP
4
star
12

social-monitor

PHP
4
star
13

RoutemasterBundle

Use WordPress as the CMS backend for your Symfony application
PHP
4
star
14

oowp-boilerplate

Boilerplate for OOWP
PHP
3
star
15

RestBundle

REST API for your Doctrine entities
PHP
2
star
16

docker-nginx-vts

Docker image for NGINX that includes VTS module
Dockerfile
2
star
17

i18n-outlandish-app

An Example of Internationalisation using angular-translate, Express, and Node.
JavaScript
2
star
18

AcfOowpBundle

PHP
2
star
19

docker-php-socialmonitor

Docker image for PHP for Social Monitor project
1
star
20

AcadOowpBundle

PHP
1
star
21

docker-wordpress-dev

Outlandish Docker image for WordPress with dev tools
Dockerfile
1
star
22

outlandish-wonolog

MU-plugin to setup Wonolog for Outlandish projects
PHP
1
star
23

php-crud-api-secure

A secure-by-default wrapper around https://github.com/mevdschee/php-crud-api
PHP
1
star
24

OrmLiteBundle

Persist large datasets efficiently using Doctrine mapping configuration
PHP
1
star