# Varbase Replaces

The `replace` method is used in **Varbase** in selected cases to guarantee a smoother update process by avoiding conflicts with deprecated, split, or replaced packages.

For example, when a module is merged into another or renamed, using `replace` ensures that Composer does not attempt to install both, which could cause duplication or version mismatches.

This strategy helps maintain compatibility with Drupal core updates and contributed modules, while keeping the dependency tree clean and controlled.

Also helps remove large, unneeded packages that are pulled in by dependencies. In Varbase or Vartheme, we often include or override these libraries, so marking them as replaced keeps the install clean, light, and conflict-free.

{% hint style="info" %}
Official docs: [getcomposer.org/doc/04-schema.md#replace](https://getcomposer.org/doc/04-schema.md#replace)
{% endhint %}

List of no longer wanted packages to be replaced via Composer.

***

Use `"vardot/varbase-replaces": "~10.1.0"`

> with **Varbase `~10.1.0`** and **Drupal `~11`**

***

## Managing Only Local Replaces in Projects

In case of needing to manage project's local replaces only

NO replaces **for Varbase \~10.1.0**

> With **Drupal 11** : Use the `"vardot/varbase-replaces": "10.1.0.0"` static version to have no replaces and manage local replaces in the project with a copy of replaces from <https://github.com/vardot/varbase-replaces/blob/10.1.x/composer.json>


---

# 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.varbase.vardot.com/10.1.x/developers/varbase-libraries/varbase-replaces.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.
