Skip to:
Content

BuddyPress.org

Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#5928 closed enhancement (fixed)

add composer support

Reported by: DJPaul Owned by: djpaul
Milestone: 2.2 Priority: normal
Severity: normal Version:
Component: Core Keywords: has-patch
Cc:

Description

I'd like to add Composer support to BuddyPress.

This would involve adding a JSON file into the root of /src/ (thus it would end up in a regular release, not just the dev SVN); it would contain pretty similar to info that our NPM package.json already has. Here's an example: https://github.com/markjaquith/WP-TLC-Transients/blob/master/composer.json

#WP23912 is a discussion about Composer support in WordPress core; the issues covered in that topic don't affect us, but that ticket's description is helpful to read.

If we did this, once we have a release (because we want to use Composer with release versions), we can tell https://packagist.org/ about our new Composer support, which would allow someone to install BuddyPress by integrating with their own project/own site's composer.json (specifying BP as a package requirement). The easiest way to demo this is to install Composer and run a command like "composer require hyyan/logo-controller".

Attachments (1)

5928.01.patch (1.1 KB) - added by DJPaul 6 years ago.

Download all attachments as: .zip

Change History (13)

#1 @boonebgorges
6 years ago

+1. This will be cool.

#2 @DJPaul
6 years ago

  • Milestone changed from Awaiting Review to 2.2

@DJPaul
6 years ago

#3 @DJPaul
6 years ago

  • Keywords has-patch added

Attached proposed composer.json file patch for review.

#4 @TJNowell
6 years ago

I would place the name type and license attributes closer to the top of the file, I'd also depend on ~1.0 rather than a specific version of the composer installer package.

Other than that it looks good

#5 @Rarst
6 years ago

What Tom said. While it's not technically meaningful I tend to put properties (loosely) in a same order as documentation (see https://getcomposer.org/doc/04-schema.md ), just makes it familiar for humans to skim through.

#6 @DJPaul
6 years ago

Thanks for taking a look!

#7 @djpaul
6 years ago

  • Owner set to djpaul
  • Resolution set to fixed
  • Status changed from new to closed

In 9088:

Add support for Composer.

Fixes #5928

#8 @Rarst
6 years ago

Don't forget to register on https://packagist.org/ for easy usage of the package. I would also add "wordpress" to keywords, makes sense in that context.

Composer all the things! :)

#9 @DJPaul
6 years ago

Yes, thanks. We will do that once the next version (2.2) is released, approx. mid January 2015. I want Packagist to be configured from http://plugins.svn.wordpress.org/buddypress/, not http://buddypress.svn.wordpress.org/ -- the latter is our development SVN and has some folder path differences, etc. :)

#10 @Rarst
6 years ago

Yeah, don't mind me, just checklist running in my brain. composer.json fixed — check, remind to get it on packagist — check... :)

Yeah, I was just discussing that nested src won't work for it.

#11 @johnjamesjacoby
6 years ago

  • Component changed from Component - Any/All to Tools - Code Improvement

#12 @DJPaul
4 years ago

  • Component changed from Tools - Code Improvement to Core
Note: See TracTickets for help on using tickets.