Skip to content

Resolve symlinks #25

@thekid

Description

@thekid

Using path repositories in Composer, I've added a library from a local filesystem path. Composer will create a symlink to this and make everything work with autoloading.

$ ls -al vendor/enbwag
total 8
drwxr-xr-x 2 thekid thekid 4096 Oct  6 17:41 .
drwxr-xr-x 7 thekid thekid 4096 Oct  6 17:41 ..
lrwxrwxrwx 1 thekid thekid   41 Oct  6 17:41 empower-foundation -> /home/thekid/devel/lib/empower-foundation

However, when packaging, we should resolve symlinks instead of following them, which results in the following ZIP file:

$ unzip -l function.zip
Archive:  function.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  2023-10-06 16:29   vendor/
        0  2023-10-06 16:29   vendor/enbwag/
        0  2023-10-06 16:29   vendor/enbwag/empower-foundation/
        0  2023-10-06 16:29   ../../lib/empower-foundation/src/
# ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions