Download the PHP package mubbi/laravel-flysystem-huawei-obs without Composer

On this page you can find all versions of the php package mubbi/laravel-flysystem-huawei-obs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-flysystem-huawei-obs

Laravel Flysystem Huawei OBS Adapter

Latest Version on Packagist codecov Total Downloads GitHub CI License PHP Version Laravel Version Flysystem Version Guzzle Version

Laravel Flysystem Huawei OBS Adapter

A Laravel Flysystem v2/v3 adapter for Huawei Object Storage Service (OBS). This package provides seamless integration between Laravel's filesystem abstraction and Huawei Cloud OBS, allowing you to use Huawei OBS as a storage backend in your Laravel applications.

Multi-Version Compatibility

This package now supports multiple versions of both Flysystem and Guzzle:

Features

Security Features

This package includes robust security features:

Requirements

⚠️ Security Notice: Laravel 10.0.0 to 10.48.28 contains a file validation bypass vulnerability (CVE-2025-27515). This package requires Laravel 10.48.29+ to ensure security. Please upgrade your Laravel installation if you're using an affected version.

Installation

Version Compatibility

This package automatically detects and adapts to your installed versions of Guzzle:

For Flysystem, the package uses v3 as the primary interface but maintains compatibility with v2 through dependency constraints. The package will automatically choose the correct HTTP client configuration based on your installed Guzzle version.

Installation Steps

  1. Install the package via Composer:

  2. Publish the configuration (optional):

  3. Add your Huawei OBS credentials to your .env file:

  4. Configure your filesystem in config/filesystems.php:

Basic Usage

Laravel Storage Facade

The package integrates seamlessly with Laravel's Storage facade:

Direct Adapter Usage

You can also use the adapter directly (Flysystem v3 interface):

Configuration Options

Required Configuration

These options are required for the adapter to function:

Optional Configuration

Advanced OBSClient Configuration

The adapter supports all OBSClient configuration options:

HTTP Client Configuration

Retry Configuration

Logging Configuration

Examples

See the examples/ directory for concise, copy-pasteable snippets:

Advanced Features

Optimized Methods for Large Datasets

For applications with large numbers of files, the package provides optimized methods with built-in timeout protection:

Retry Logic and Error Handling

The adapter includes automatic retry logic with exponential backoff for transient errors:

The retry logic will automatically retry on transient errors but will not retry on:

Authentication Caching

Authentication status is cached for 5 minutes to improve performance:

Logging

Enable operation and error logging:

Laravel Storage Facade Compatibility

This package provides full compatibility with Laravel's Storage facade. All the standard Laravel Storage methods are supported:

Directory Listing

File Information

Complete Example

Logged information includes:

Configuration Validation

The service provider automatically validates required configuration:

Custom Exceptions

The package provides custom exceptions for better error handling:

Authentication & Security

The adapter automatically validates authentication before operations and provides clear error messages:

Temporary Credentials (Security Token)

For applications using temporary credentials (like AWS STS or similar services):

URL Handling

The adapter supports both public URLs and signed URLs. For Laravel's Storage facade:

Public and Private URLs

The url() method automatically handles both public and private objects:

Temporary URLs

Generate temporary URLs with custom expiration times:

Object Tagging

Add and manage metadata tags on OBS objects:

Post Signatures

Create signatures for direct browser uploads to OBS:

Object Restoration

Restore archived objects from OBS:

Testing

Artisan Command

The package includes an Artisan command for testing connectivity and features:

This command will:

Manual Testing

You can also test the adapter manually:

Error Handling

The package provides comprehensive error handling with clear, actionable error messages:

Common Error Scenarios

Custom Exceptions

The package provides specific exceptions for different error types used by advanced features:

Performance Considerations

Large Dataset Handling

For applications with large numbers of files, use the optimized methods:

Caching

Consider caching frequently accessed data:

Batch Operations

For multiple operations, consider batching:

Troubleshooting

Common Issues

  1. Authentication Errors

    • Verify your access key and secret key
    • Check if your security token is still valid
    • Ensure your credentials have the necessary permissions
  2. Bucket Access Errors

    • Verify the bucket name is correct
    • Check if the bucket exists in the specified region
    • Ensure your credentials have access to the bucket
  3. Timeout Errors

    • Use optimized methods for large datasets
    • Increase timeout values in configuration
    • Consider using background processing for large operations
  4. SSL Certificate Errors
    • Verify your endpoint URL is correct
    • Check if SSL verification is required in your environment
    • Consider disabling SSL verification for testing (not recommended for production)

Debug Mode

Enable debug mode to get more detailed error information:

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Development Setup

  1. Clone the repository
  2. Install dependencies: composer install
  3. Run tests: composer test
  4. Static analysis: composer phpstan
  5. Lint/format: composer pint

Code Quality

This package follows strict code quality standards:

License

This package is open-sourced software licensed under the MIT license.

Support

Changelog

Please see CHANGELOG.md for more information on what has changed recently.

Credits


Made with ❤️ by Mubbasher Ahmed


All versions of laravel-flysystem-huawei-obs with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
guzzlehttp/guzzle Version ^6.3.0|^7.0|^8.0
laravel/framework Version ^9.0|^10.48.29|^11.0|^12.0
league/flysystem Version ^2.0|^3.0
mubbi/esdk-obs-php Version ^3.24
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mubbi/laravel-flysystem-huawei-obs contains the following files

Loading the files please wait ...