Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

example snippet added for composer.json #6632

Merged
merged 3 commits into from
Feb 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions src/guides/v2.3/extension-dev-guide/build/composer-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,34 @@ We recommend you include `composer.json` in your component's root directory even
{:.bs-callout-info}
Magento does not support the [`path`][3] repository.

## composer.json

Here is the example of composer.json file.

{% collapsible File content for composer.json %}
```json
{
"name": "mycompany/sample-module-minimal",
"description": "A module that creates a page in the Magento admin area",
"type": "magento2-module",
"version": "1.0.0",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"require": {
"php": "~7.1.3||~7.2.0||~7.3.0"
},
"autoload": {
"files": [ "registration.php" ],
"psr-4": {
"MyCompany\\ExampleAdminNewPage\\": ""
}
}
}
```
{% endcollapsible %}

## Composer binary location {#composer-binary}

Magento uses the composer binary in the `<Magento root>/vendor/composer` directory instead of a globally installed [composer](https://glossary.magento.com/composer).
Expand Down