Skip to content

Commit 26d6676

Browse files
authored
Merge pull request #583 from wp-cli/copilot/document-licensing-expectations
2 parents df1aa93 + 0d72118 commit 26d6676

3 files changed

Lines changed: 53 additions & 0 deletions

File tree

bin/handbook-manifest.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,12 @@
377377
"markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/references\/internal-api.md",
378378
"parent": "references"
379379
},
380+
"licensing": {
381+
"title": "Licensing",
382+
"slug": "licensing",
383+
"markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/contributions\/licensing.md",
384+
"parent": "contributions"
385+
},
380386
"philosophy": {
381387
"title": "Philosophy",
382388
"slug": "philosophy",

contributions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* **[WordCamp Contributor Day](https://make.wordpress.org/cli/handbook/contributions/contributor-day/)** - Quick-start guide for WordCamp Contributor Days.
66
* **[Ideas](https://github.com/wp-cli/ideas)** - Up-vote existing ideas or submit your own.
77
* **[Governance](https://make.wordpress.org/cli/handbook/contributions/governance/)** - Summary of those behind WP-CLI.
8+
* **[Licensing](https://make.wordpress.org/cli/handbook/contributions/licensing/)** - License requirements for third-party code and dependencies.
89
* **[Implementation details](https://make.wordpress.org/cli/handbook/contributions/implementation-details/)** - Catalog of historical design decisions.
910
* **[Philosophy](https://make.wordpress.org/cli/handbook/contributions/philosophy/)** - Guidelines which inform project scope, command organization, and behavior.
1011
* **[Pull requests](https://make.wordpress.org/cli/handbook/contributions/pull-requests/)** - Submit your first bug fix or new feature.

contributions/licensing.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Licensing
2+
3+
WP-CLI is licensed under the [MIT license](https://github.com/wp-cli/wp-cli/blob/master/LICENSE). This document outlines WP-CLI's licensing expectations for third-party code.
4+
5+
## Accepting third-party code into the official repository/organization
6+
7+
All code accepted into repositories under the official [WP-CLI GitHub organization](https://github.com/wp-cli) must be compatible with the MIT license. This ensures that WP-CLI can remain freely usable, modifiable, and distributable by anyone.
8+
9+
## Bundling third-party code
10+
11+
When bundling third-party code directly into a WP-CLI package (i.e., copying code into the repository rather than declaring it as a dependency), the code must:
12+
13+
1. **Be licensed under an MIT-compatible license**
14+
2. **Include the original license file or header** - The third-party code's license terms must be preserved
15+
3. **Maintain copyright notices** - Original copyright notices must remain intact
16+
4. **Be clearly identified** - It should be clear which code is third-party and where it came from
17+
18+
When in doubt about whether to bundle third-party code, consider using it as a dependency through Composer instead.
19+
20+
## Depending on third-party code
21+
22+
Third-party packages declared as dependencies (through Composer or other package managers) must be licensed under MIT-compatible licenses. This applies to both:
23+
24+
* **Direct dependencies** - Packages explicitly listed in `composer.json`
25+
* **Transitive dependencies** - Dependencies of your dependencies
26+
27+
### Checking dependency licenses
28+
29+
Before adding a new dependency:
30+
31+
1. Check the dependency's `LICENSE` file or `composer.json` for license information
32+
2. Verify that all of the dependency's own dependencies are also compatible
33+
3. Use `composer show -t` to view the dependency tree with license information, or install additional tools like `composer/satis` to run `composer licenses` for detailed license auditing
34+
35+
## Why these requirements?
36+
37+
These licensing requirements ensure that:
38+
39+
1. **WP-CLI remains free and open** - Users can use, modify, and distribute WP-CLI without legal concerns
40+
2. **Commercial use is permitted** - Companies can use and integrate WP-CLI into their products
41+
3. **No license conflicts** - All code in the WP-CLI ecosystem is legally compatible
42+
4. **Simplicity for users** - Users don't need to track multiple license requirements
43+
44+
## Questions?
45+
46+
If you have questions about licensing or need clarification on whether a specific license is compatible, please open an issue or contact the [WP-CLI maintainers](https://github.com/orgs/wp-cli/teams/maintainers).

0 commit comments

Comments
 (0)