New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

customergauge/minio

Faking S3 storage with Minio
25,486 3
Install
composer require customergauge/minio
Latest Version:1.5.0
PHP:>=7.3
Laravel:7 – 10
License:MIT
Last Updated:Apr 24, 2023
Links: GitHub  ·  Packagist
Maintainer: Deleu

Laravel S3 Minio 📁

This library provides a convenient way to write test code that runs against Minio, an S3 compatible storage.

Installation

composer require customergauge/minio

Usage

$minio = new Minio();

$minio->disk('my-bucket', function (S3Client $client, string $bucket) {
    $this->post('/my/endpoint/that/interacts/with/s3', [])
        ->assertSuccessful();

    $object = $client->getObject([
        'Bucket' => $bucket,
        'Key' => "/my/expected/s3/key"
    ]);

    $content = $object['Body']->getContents();

    $this->assertStringContainsString('partial-file-content', $content);
});

Docker Example

  minio:
    image: minio/minio
    ports:
    - 9000:9000
    environment:
      - MINIO_ACCESS_KEY=customergauge
      - MINIO_SECRET_KEY=phpunit123
    command: server /data

Related Packages

triginarsa/minio-storage-utils

A comprehensive MinIO storage service package for Laravel with file processing c...

1,032 1
czim/file-handling

File Handling Helper

905,442 15
mwguerra/filemanager

A full-featured file manager package for Laravel and Filament v5 with dual opera...

60,822 84
onethirtyone/laravel-s3-migrate

A Laravel package to migrate from local storage to Amazon S3

9,788 6
hollisho/minio-php

php minio library

49 0

Version History

Version Released PHP Laravel License
1.5.0 >=7.3 >=7.1 MIT
1.4.0 >=7.3 ^7.1 || ^8.0 || ^9.0 MIT
1.3.0 >=7.3 ^7.1 || ^8.0 MIT
1.2.0 ^7.3 ^7.1 || ^8.0 MIT
1.1.0 ^7.3 ^7.1 MIT