# Composer

## Symlinking the API

Problem: changes made to API code are not reflected in requests, or running `composer update` yields a message stating that there is nothing to do.

* Verify that you have cloned the API to your `~/Sites` directory.
* Verify that you are running the command `composer update elentrapackages/elentra-1x-api` after you have run `composer install`.
* Verify that you have a `composer-api-dev.json` file in the root of your `elentra-1x-me` project.
* Verify the following in your `composer-api-dev.json` file:
  * That the value for `[BRANCH_NAME]` matches the name of the branch that you currently have checked out in the API.
  * That the value for `url` points to the correct path that you cloned the API into.

```javascript
{
  "repositories": [
      {
          "type": "path",
          "url": "../elentra-1x-api",
          "options": {
              "symlink": true
          }
      }
  ],
  "require": {
      "elentrapackages/elentra-1x-api": "dev-[BRANCH_NAME]"
  }
}
```

## Composer Install Errors

You experience a either a 404 or 403 error when attempting to run composer install.

* Ensure that you have set your composer auth token by running

  ```
  composer config --global --auth http-basic.repo.packagist.com token [YOUR_ORGANIZATION_TOKEN]
  ```
* Ensure that you that you are using the private Packagist token provided to your organization by the Elentra Consortium.

## Composer Memory Error

![](/files/-MczPBUxcMIXNL1fKKWj)

{% hint style="danger" %}
`PHP fatal error: Allowed memory size of .... exhausted`
{% endhint %}

Sometimes you may experience the error displayed here when attempting to run a `composer install` or `composer update elentrapackages/elentra-1x-api` . You can easily solve this problem by setting the memory limit to `-1` before your composer command. Example:

```javascript
// This is an example, and it works on other composer commands all the same
COMPOSER_MEMORY_LIMIT=-1 composer update elentrapackages/elentra-1x-api
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.elentra.org/technical/developers/troubleshooting/composer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
