- How do I install alphasnow/aliyun-oss-laravel in a Laravel app?
- Run composer require alphasnow/aliyun-oss-laravel and make sure your PHP environment meets the package and Aliyun OSS SDK requirements, including cURL. Then add an OSS disk to config/filesystems.php and set the AccessKey ID, AccessKey Secret, endpoint, and bucket via environment variables. Do not commit credentials; use .env values and clear config cache after changing disk settings.
- How do I configure an Alibaba Cloud OSS disk in config/filesystems.php?
- Add a disk under the disks array in config/filesystems.php using the driver provided by the package, then map credentials and bucket settings to .env variables. The endpoint and region must match the Aliyun OSS bucket, and the bucket should exist before you test. After editing, run php artisan config:clear and verify the disk with a simple Storage::disk('oss')->put() call.
- Which Laravel and PHP versions does alphasnow/aliyun-oss-laravel support?
- Support depends on the package release, so check the composer.json constraints for the version you install; recent releases generally target modern PHP 8.x and Laravel 8/9/10/11-era applications. The package also depends on the Aliyun OSS PHP SDK, so PHP extensions such as cURL must be available. The 4.7.1 release notes only link a changelog, so confirm minimum Laravel and PHP versions before upgrading.
- Can I use Laravel's Storage facade with Alibaba Cloud OSS?
- Yes. The package is a Flysystem adapter that registers OSS as a Laravel filesystem disk, so standard Storage calls like put, get, delete, exists, files, and url work through the same API you use for local or S3 disks. Advanced OSS-specific operations may not be exposed by the driver, so check the package docs if you need features beyond normal object CRUD.
- How do I generate signed or temporary URLs for OSS files in Laravel?
- The driver integrates with Laravel's filesystem URL generation, but custom signed URL behavior and expiry control may depend on the package version and driver options. Check the package documentation and test temporary URL generation against your bucket before relying on it in production. If you need advanced signing or policy features, you may need the Aliyun OSS SDK directly.
- Does this package support multipart uploads, server-side encryption, or cross-region replication?
- Standard object CRUD is the core use case, while advanced OSS features such as multipart upload tuning, server-side encryption, cross-region replication, inventory, and select operations may not be fully exposed by the Flysystem driver. The package is a filesystem adapter, not a complete replacement for the Aliyun OSS SDK. Verify the specific feature against the package docs or use the SDK directly for unsupported operations.
- How do I migrate existing local or S3 files to Alibaba Cloud OSS with this package?
- Add the OSS disk configuration first, then copy existing objects to the Aliyun bucket with ossutil or an SDK-based script; this package handles runtime Storage access, not bulk data migration. Update FILESYSTEM_DISK or choose the disk per call, then test read, write, delete, list, and URL generation. Run a parallel period and validate checksums or object integrity before cutting over.
- How should I test an OSS disk before using it in production?
- Use a dedicated test bucket and environment variables rather than production credentials, and run integration tests for upload, download, delete, list, URL generation, and visibility. Test in staging with the same endpoint, region, and bucket settings you plan to use in production. Pin the package version during testing so dependency changes do not invalidate results.
- Is alphasnow/aliyun-oss-laravel actively maintained, and are there breaking changes in 4.7.1?
- The package is community-maintained by alphasnow, so maintenance cadence and issue response depend on the author; pin a known version and monitor releases. Release 4.7.1 only provides a changelog link comparing 4.6.0 to 4.7.1, with no explicit breaking-change or security notes in the supplied context. Review the linked changelog, issues, and pull requests, and test upgrades in staging before deploying.
- What are alternatives to alphasnow/aliyun-oss-laravel for OSS in Laravel?
- Alternatives include using the Aliyun OSS PHP SDK directly for full feature control, or other community Laravel Flysystem adapters for OSS if you prefer a different maintenance profile. If your application can use S3-compatible storage, Laravel's built-in S3 disk may be an option, but confirm OSS compatibility and feature support first. Evaluate based on required OSS features, Laravel version support, and release transparency.