Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new documentation for limitation in dependencies #518

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
49 changes: 49 additions & 0 deletions docs/getting-started/limitations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: Limitations
weight: 30
---

{{< lead text="Known limitations will be listed here." >}}

{{< callout title="Create your own plugin" >}}
Be aware that it is possible to create your own plugin to enhance the functionality or overcome known limitations. Additional information may be found in the [Capabilities]({{< relref "capabilities.md" >}}) documentation.
{{< /callout >}}

## Dependencies with patches

When installing a dependency with composer that has its own patch for a dependency this patch will not be applied.
For more information in-depth information see [bug report](https://github.com/cweagans/composer-patches/issues/505).

```txt
Root project

|_ dep 1 (containing patch for dep 2)
|_ dep 2
```

### External patch file

When a dependency defines patches using an external patch file **Composer Patches** will not look into the configuration for patches.

### Patches configured in `composer.json`

**Composer Patches** does look at the patches configuration in the `composer.json` for dependencies.
When these patches are local files, **Composer Patches** will be unable to locate the patch files because composer will install all packages in the root of your project.
As a result relative paths pointing to patch files are now incorrect and will not resolve, resulting in an error.

**Composer Patches** could probable apply patches that are hosted and added via url but this is untested at this point in time.

### Work around

When dependencies have configured patches in the `composer.json` configuration using relative paths you can mirror the file structure in the root of your project using symlinks. This will allow **Composer Patches** to resolve the relative paths and patches will be applied to the dependencies.

```txt
Root project

| /patches/patch-dep2.patch (symlink -> /dep/patches/patch-dep2.patch)
| /dep
| /patches/patch-dep2.patch
| /dep2
```

Alternatively if symlinking is not an option you could choose to copy a patch into your own project and configure your project to apply the patch.
2 changes: 1 addition & 1 deletion docs/getting-started/terminology.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Terminology
weight: 30
weight: 40
---

{{< lead text="There are a few terms specific to this plugin. Understanding them before proceeding may help with understanding." >}}
Expand Down