Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Contributing

## Issues & Pull Requests

* Communicate in English on issues and pull requests.
* Pull requests should only contain related changes.
* Changes should always be rebased on `main`
* Your code should follow [our coding standard](https://www.php-fig.org/per/coding-style/).
* Your code should be covered by unit tests.
* All checks must pass before your code is merged.

---

Once your code is merged, it is available to everybody, for free, under the [MIT License](/LICENSE).
By publishing your pull request on the project, you implicitly agree with the aforementioned license.

**Thank you for your contribution! It wouldn't be so great without you.**
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: ""
assignees: ""
---

### Summary

<!-- Provide a summary here -->

### Versions

<!-- Provide the versions of PHP and `azure-storage-php-adapter-flysystem` on which the issue has been observed -->

| | Version |
| :------------------------------------------ | :------ |
| PHP version | x.y.z |
| `azure-storage-php-adapter-laravel` version | x.y.z |

### Self-enclosed code snippet for reproduction

```php
# replace this with a self-enclosed usage example
```

### Expected output

```txt
# replace this with the expected output of your self-enclosed example
```

### Actual output

```txt
# replace this with the actual output of your self-enclosed example
```
14 changes: 14 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Security Policy

## Supported Versions

The following versions of `azure-oss/azure-storage-php-adapter-flysystem` have active support:

| Version | Supported |
|---------|--------------------|
| 1.x | :white_check_mark: |

## Reporting a Vulnerability

If you believe that you have found a security vulnerability, please send us a message to get in touch. Ensure to **NOT
INCLUDE** all details required in the public.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "weekly"
14 changes: 14 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
daysUntilStale: 21
daysUntilClose: 7
exemptLabels:
- "pinned"
- "security"
# Label to use when marking an issue as stale
staleLabel: "lifecycle/stale"
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed after 1 week if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
19 changes: 19 additions & 0 deletions .github/workflows/bc-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
pull_request:
push:
branches:
- "main"

name: Breaking Changes

jobs:
roave-bc-check:
name: Roave BC Check
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Check for breaking changes
run: docker run --env GITHUB_REPOSITORY="Azure-OSS/azure-storage-php-adapter-laravel" -u $(id -u) -v $(pwd):/app nyholm/roave-bc-check-ga
45 changes: 45 additions & 0 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
on: # yamllint disable-line rule:truthy
pull_request: ~
push:
branches:
- "main"
- "[0-9].*"

name: "Code Coverage"

jobs:
code-coverage:
name: "Code Coverage"

strategy:
matrix:
php-version:
- "8.1"

services:
azurite:
image: mcr.microsoft.com/azure-storage/azurite
ports:
- 10000:10000

runs-on: "ubuntu-latest"

steps:
- name: "Checkout code"
uses: "actions/checkout@v4"

- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@v2"
with:
coverage: xdebug
extensions: json curl
php-version: "${{ matrix.php-version }}"

- name: "Download dependencies"
run: composer install --ansi --no-interaction --no-progress --optimize-autoloader

- name: "Collect code coverage with PHPUnit"
run: vendor/bin/phpunit --colors=always --coverage-clover=.build/logs/clover.xml

- name: "Send code coverage report to codecov.io"
run: bash <(curl -s https://codecov.io/bash)
42 changes: 42 additions & 0 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
on:
pull_request: ~
push:
branches:
- "main"

name: Coding Standards

permissions: write-all

jobs:
pint:
name: Check & fix styling

runs-on: ubuntu-latest

strategy:
matrix:
php-version:
- 8.1 # Always run on the lowest supported version due to compatibility

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: curl json
coverage: none

- name: Download dependencies
run: composer install --no-interaction --no-progress --optimize-autoloader

- name: Run laravel/pint
run: vendor/bin/pint

- name: Commit linted files
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Fixes coding style"
33 changes: 33 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
pull_request: ~
push:
branches:
- "main"

name: Static analysis

jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest

strategy:
matrix:
php-version: [8.1]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: curl json
coverage: none

- name: Download dependencies
run: composer install --no-interaction --no-progress --optimize-autoloader

- name: Run PHPStan
run: vendor/bin/phpstan --no-progress --memory-limit=2G
46 changes: 46 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
on:
pull_request:
push:
branches:
- "main"

name: Tests

jobs:
phpunit:
name: PHPUnit on ${{ matrix.operating-system }} with PHP ${{ matrix.php-version }}

strategy:
matrix:
operating-system:
- 'ubuntu-latest'
php-version:
- '8.1'
- '8.2'
- '8.3'
- '8.4'

services:
azurite:
image: mcr.microsoft.com/azure-storage/azurite
ports:
- 10000:10000

runs-on: ${{ matrix.operating-system }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: curl json
coverage: none

- name: Download dependencies
run: composer install --no-interaction --no-progress --optimize-autoloader

- name: Run tests
run: ./vendor/bin/phpunit