From 5b99da616b048dd9f0d9bd0672992d27b882a36c Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Fri, 18 Mar 2022 08:56:02 +0900 Subject: [PATCH] Just rename the readEnvFile function for testing Until I find out how I can exclude folders from beeing deployed Update composer ingore list Add .gitattributes for ignore list --- .gitattributes | 5 +++++ composer.json | 2 +- test/aws_gift_card_tests.php | 2 +- test/read_env_file.php | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f6bac5e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +test/ export-ignore +.gitattributes export-ignore +phpstan.neon export-ignore +psalm.xml export-ignore +.phan/ export-ignore diff --git a/composer.json b/composer.json index 2fa62cf..a2c7be2 100644 --- a/composer.json +++ b/composer.json @@ -22,6 +22,6 @@ "php": ">=7.4.0" }, "archive": { - "exclude": ["/test/", "/phpstan.neon", "/psalm.xml", "/.phan/", "/.vscode/"] + "exclude": ["/test/", "/test/*", "/phpstan.neon", "/psalm.xml", "/.phan/", "/.vscode/"] } } diff --git a/test/aws_gift_card_tests.php b/test/aws_gift_card_tests.php index eb02998..f3ebe60 100644 --- a/test/aws_gift_card_tests.php +++ b/test/aws_gift_card_tests.php @@ -63,7 +63,7 @@ require 'read_env_file.php'; use gullevek\AmazonIncentives\AmazonIncentives; // load env data with dotenv -readEnvFile(__DIR__); +__readEnvFile(__DIR__); print "

Amazon Gift Card Incentives


"; diff --git a/test/read_env_file.php b/test/read_env_file.php index 22f3e28..b6b2715 100644 --- a/test/read_env_file.php +++ b/test/read_env_file.php @@ -21,7 +21,7 @@ * 2 for file not readable * 3 for file not found */ -function readEnvFile(string $path = __DIR__, string $env_file = '.env'): int +function __readEnvFile(string $path = __DIR__, string $env_file = '.env'): int { // default -1; $status = -1;