Skip to content

Commit

Permalink
Merge branch 'master' into AddSubscriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell authored Oct 1, 2021
2 parents 2926737 + a4d3597 commit 713b6da
Show file tree
Hide file tree
Showing 14 changed files with 240 additions and 185 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.gitattributes
/tests
28 changes: 28 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
time: "17:00"
timezone: Australia/Sydney
open-pull-requests-limit: 99
ignore:
- dependency-name: phpstan/phpstan
versions:
- 0.12.70
- 0.12.76
- 0.12.77
- 0.12.78
- 0.12.79
- 0.12.80
- 0.12.81
- 0.12.82
- 0.12.83
- 0.12.84
- dependency-name: phpunit/phpunit
versions:
- 9.5.3
- dependency-name: symfony/cache
versions:
- 5.2.2
15 changes: 2 additions & 13 deletions .github/workflows/mt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,13 @@ jobs:
extensions: pcov
coverage: pcov

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-versions }}-
- name: Install dependencies
run: |
composer install --prefer-source --no-progress --no-suggest --no-interaction
composer install --no-progress --no-suggest --no-interaction
- name: Download Infection
run: |
wget https://github.com/infection/infection/releases/download/0.20.0/infection.phar
wget https://github.com/infection/infection/releases/download/0.21.0/infection.phar
chmod +x infection.phar
- name: Run Infection for added files only
Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,8 @@ jobs:
- name: Validate composer.json and composer.lock
run: composer validate

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-versions }}-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-source --no-progress --no-suggest --no-interaction
run: composer install --no-progress --no-suggest --no-interaction

- name: Run test suite
run: composer run-script test
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ $client->addQuery('version', '9');
$result = $account->getDrushAliases();
$drushArchive = tempnam(sys_get_temp_dir(), 'AcquiaDrushAliases') . '.tar.gz';
file_put_contents($drushArchive, $aliases, LOCK_EX);

// Download database backup
// file_put_contents loads the response into memory. This is okay for small things like Drush aliases, but not for database backups.
// Use curl.options to stream data to disk and minimize memory usage.
$client->addOption('sink', $filepath);
$client->addOption('curl.options', ['CURLOPT_RETURNTRANSFER' => true, 'CURLOPT_FILE' => $filepath]);
$backup->download($environmentUuid, $dbName, $backupId);
```

## Documentation
Expand Down
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
"League\\OAuth2\\Client\\Test\\": "vendor/league/oauth2-client/test/src/"
}
},
"config": {
"preferred-install": {
"league/oauth2-client": "source"
}
},
"scripts": {
"lint": [
"find src -name '*.php' -print0 | xargs -0 -n1 php -l",
Expand Down
Loading

0 comments on commit 713b6da

Please sign in to comment.