treehouselabs/swift-bundle
A Symfony bundle from Treehouse Labs that integrates Swift, providing configuration, service wiring, and framework-ready defaults to simplify setup and usage within Symfony applications.
This bundle wraps a pure-PHP OpenStack Swift client in Symfony services, so its only job is to let you authenticate to a Swift endpoint and read/write blobs in a container without juggling curl or the OpenStack SDK directly.
composer require treehouselabs/swift-bundle — note the last tagged release is from April 2015, so expect a Symfony 2.x/3.0-era AppKernel.php registration (new TreeHouse\SwiftBundle\TreeHouseSwiftBundle()) rather than Symfony Flex auto-wiring.DependencyInjection/Configuration.php and Resources/config/services.yml. That tells you the exact config keys (auth URL, tenant, username, password, default container) and the service IDs you will inject. There is effectively no documentation beyond the README, so the DIC definition is the API.tree_house_swift:
auth_url: "%swift.auth_url%"
username: "%swift.username%"
password: "%swift.password%"
tenant: "%swift.tenant%"
container: "%swift.container%"
upload-style methods with a container name, object key, and a stream or string of bytes, then read it back with a download/readObject call and stream it to StreamedResponse.TreeHouse\Swift\* client class from the dependency library so your application code survives if the bundle is ever replaced by direct SDK usage.ObjectStore interface with put($key, $stream, array $headers), get($key), delete($key), exists($key). This is the single most valuable pattern with this package, because the bundle is thin and you will want to swap it out or fall back to local storage in tests.file_get_contents a large object into memory. Upload from a stream resource and expose downloads via Symfony's StreamedResponse with the object's Content-Type and Content-Length headers copied over.user-uploads, exports, temp) and map each to a config-driven container name, so environment promotion (dev/staging/prod Swift clusters) is just a parameter change.Content-Type, cache-control, and custom X-Object-Meta-* headers at upload time; Swift has no other way to attach arbitrary metadata to an object.php-opencloud/openstack or the official OpenStack SDK before shipping to production.swift-init all container. Plan for an integration-test path early.tenant vs tenant_name, or a trailing slash on the auth URL, produces opaque auth failures. Read Configuration.php literally and mirror values that work with the raw client.max_file_size.How can I help you explore Laravel packages today?