Skip to content

Commit

Permalink
Merge pull request #1 from xray-labs/feature/create-first-steps
Browse files Browse the repository at this point in the history
Create First Steps
  • Loading branch information
GabsCoding authored Sep 14, 2024
2 parents 1a40d20 + 5fecb19 commit d61dea4
Show file tree
Hide file tree
Showing 23 changed files with 12,789 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Laravel CI

on:
pull_request:
branches:
- main
- develop

jobs:
build:
runs-on: ubuntu-latest

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"

- name: Install dependencies
run: composer install

- name: Run PHPMD
run: ./vendor/bin/phpmd src/ text phpmd.xml

- name: Run PHP_CodeSniffer
run: ./vendor/bin/phpcs --standard=phpcs.xml

- name: Run Pint Check
run: ./vendor/bin/pint --test

- name: Run PHPStan
run: ./vendor/bin/phpstan analyse

- name: Run Pest
run: ./vendor/bin/pest --coverage --min=100 --parallel

- name: Run Pest Mutation
run: ./vendor/bin/pest --mutate --min=100
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TODO
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Azure Storage PHP SDK

[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

[![PHP CI](https://github.com/xray-labs/azure-storage-php-sdk/actions/workflows/CI.yaml/badge.svg)](https://github.com/xray-labs/azure-storage-php-sdk/actions/workflows/CI.yaml)

## Description

Laravel adapter for Microsoft Azure Blob Storage

## Installation

```bash
composer require xray/azure-storage-laravel
```

## Configuration

Add these new settings to your `filesystem.php` file

```php
'disks' => [
...

'azure' => [
'driver' => 'azure',
'account' => env('AZURE_STORAGE_ACCOUNT'),
'directory' => env('AZURE_STORAGE_DIRECTORY'),
'application' => env('AZURE_STORAGE_APPLICATION'),
'secret' => env('AZURE_STORAGE_SECRET'),
'container' => env('AZURE_STORAGE_CONTAINER'),
// Optional parameters
'options' => [
'authentication' => Xray\AzureStoragePhpSdk\Authentication\MicrosoftEntraId::class,
'url' => env('AZURE_STORAGE_URL'),
'secure' => env('AZURE_STORAGE_SECURE', true),
],
],
],
```

## License

This project is licensed under the [MIT License](LICENSE).

## Contacts

- sjpereira2000@gmail.com
- gabrielramos791@gmail.com
65 changes: 65 additions & 0 deletions captainhook.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"commit-msg": {
"enabled": false,
"actions": [
{
"action": "\\CaptainHook\\App\\Hook\\Message\\Action\\Beams",
"options": {
"subjectLength": 50,
"bodyLineLength": 72
}
}
]
},
"pre-push": {
"enabled": true,
"actions": [
{
"action": "./vendor/bin/phpmd src/ text phpmd.xml"
},
{
"action": "./vendor/bin/phpcs --standard=phpcs.xml"
},
{
"action": "./vendor/bin/pint --test"
},
{
"action": "./vendor/bin/phpstan analyse"
},
{
"action": "./vendor/bin/pest --coverage --min=100 --parallel"
},
{
"action": "./vendor/bin/pest --mutate --min=100"
}
]
},
"pre-commit": {
"enabled": false,
"actions": []
},
"prepare-commit-msg": {
"enabled": false,
"actions": []
},
"post-commit": {
"enabled": false,
"actions": []
},
"post-merge": {
"enabled": false,
"actions": []
},
"post-checkout": {
"enabled": false,
"actions": []
},
"post-rewrite": {
"enabled": false,
"actions": []
},
"post-change": {
"enabled": false,
"actions": []
}
}
61 changes: 61 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"name": "xray/azure-storage-laravel",
"description": "Azure Storage Adapter for Laravel",
"type": "library",
"license": "MIT",
"scripts": {
"md" : ["./vendor/bin/phpmd src/ text phpmd.xml"],
"cs": ["./vendor/bin/phpcs --standard=phpcs.xml"],
"fix": ["./vendor/bin/pint"],
"analyse": ["./vendor/bin/phpstan analyse"],
"test": ["./vendor/bin/pest --coverage --parallel"],

"verify": [
"./vendor/bin/phpmd src/ text phpmd.xml",
"./vendor/bin/phpcs --standard=phpcs.xml",
"./vendor/bin/pint --test",
"./vendor/bin/phpstan analyse",
"./vendor/bin/pest --coverage --parallel"
]
},
"require": {
"php": "^8.3",
"laravel/framework": "^11.20",
"xray/azure-storage-php-sdk": "^1.0"
},
"require-dev": {
"fakerphp/faker": "^1.23",
"laravel/pint": "^1.16",
"phpstan/phpstan": "^1.11",
"pestphp/pest": "^3.0",
"pestphp/pest-plugin-laravel": "^3.0",
"nunomaduro/collision": "^8.0",
"phpmd/phpmd": "^2.15",
"squizlabs/php_codesniffer": "^3.10",
"captainhook/captainhook": "^5.23",
"captainhook/hook-installer": "^1.0",
"mockery/mockery": "^1.6",
"orchestra/testbench": "^9.4"
},
"authors": [
{ "name": "Silvio Pereira", "email": "sjpereira2000@gmail.com" },
{ "name": "Gabriel de Ramos", "email": "gabrielramos791@gmail.com" }
],
"autoload": {
"psr-4": {
"Xray\\AzureStorageLaravel\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Xray\\Tests\\": "tests/"
}
},
"minimum-stability": "stable",
"config": {
"allow-plugins": {
"pestphp/pest-plugin": true,
"captainhook/hook-installer": true
}
}
}
Loading

0 comments on commit d61dea4

Please sign in to comment.