Docs
Composercomposer.json
schema: “license” field,
also PHPStorm supports autocompletion for this field.
Github
guide about licensing
https://choosealicense.com/
Non-WordPress projects
Most of projects:
- place
LICENSE
file in a repo root - mention the license in
license
field ofcomposer.json
(laravel doesn’t, only mentions inREADME.md
)
Sample repos: symfony, var-dumper, doctrine, laravel.
WordPress
Most of plugins and WP Core itself use GPL v2 +
- license.txt (wp-core)
- LICENSE
- license text is placed in the header of a entry PHP-file of a plugin
Sample repos: Query Monitor, Yoast SEO, WP Core