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

Added support for composer v2.2.0+. #19

Merged
merged 1 commit into from Dec 25, 2021
Merged
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,6 @@
## v7.1.2
* **[2021-12-24 23:27:47 CDT]** Added support for composer v2.2.0+.

## v7.1.1
* **[2021-12-24 15:36:38 CDT]** Fixed the ability of selecting the PHP version via the .env file.
* **[2021-12-24 16:09:02 CDT]** Upgraded to PHP v7.4.27, 8.0.14, and 8.1.1.
Expand Down
9 changes: 8 additions & 1 deletion bin/composer
@@ -1,6 +1,13 @@
#!/usr/bin/env bash

ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../.." && pwd )"
# @see https://linuxize.com/post/how-to-check-if-string-contains-substring-in-bash/
# @see https://github.com/composer/composer/issues/10389
SUB="/vendor/"
if [[ "$0" == *"$SUB"* ]]; then
ROOT="$(readlink -f /proc/$PPID/cwd)"
else
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../.." && pwd )"
fi

# Detect if it's running inside of docker and run it natively if it is.
# @see https://stackoverflow.com/a/25518345/430062
Expand Down
9 changes: 8 additions & 1 deletion bin/php
@@ -1,6 +1,13 @@
#!/bin/bash

ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../.." && pwd )"
# @see https://linuxize.com/post/how-to-check-if-string-contains-substring-in-bash/
# @see https://github.com/composer/composer/issues/10389
SUB="/vendor/"
if [[ "$0" == *"$SUB"* ]]; then
ROOT="$(readlink -f /proc/$PPID/cwd)"
else
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../.." && pwd )"
fi

# Detect if it's running inside of docker and run it natively if it is.
# @see https://stackoverflow.com/a/25518345/430062
Expand Down