{"id":14983928,"url":"https://github.com/knplabs/knpgaufrettebundle","last_synced_at":"2025-05-13T18:13:21.392Z","repository":{"id":1470367,"uuid":"1710900","full_name":"KnpLabs/KnpGaufretteBundle","owner":"KnpLabs","description":"Easily use Gaufrette in your Symfony projects.","archived":false,"fork":false,"pushed_at":"2025-02-24T07:49:59.000Z","size":263,"stargazers_count":718,"open_issues_count":31,"forks_count":159,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-04-25T17:52:24.013Z","etag":null,"topics":["bundle","filesystem","php","symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":"http://knplabs.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KnpLabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-05-06T11:57:12.000Z","updated_at":"2025-03-06T15:15:32.000Z","dependencies_parsed_at":"2023-07-05T15:46:16.489Z","dependency_job_id":"990974e8-f7e6-4fe3-9bfe-4dabc887b8a9","html_url":"https://github.com/KnpLabs/KnpGaufretteBundle","commit_stats":{"total_commits":218,"total_committers":84,"mean_commits":"2.5952380952380953","dds":0.9036697247706422,"last_synced_commit":"910a16cd7a7af5d72a98975f3e59a0c6feadec32"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnpLabs%2FKnpGaufretteBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnpLabs%2FKnpGaufretteBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnpLabs%2FKnpGaufretteBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnpLabs%2FKnpGaufretteBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KnpLabs","download_url":"https://codeload.github.com/KnpLabs/KnpGaufretteBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254000883,"owners_count":21997443,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bundle","filesystem","php","symfony","symfony-bundle"],"created_at":"2024-09-24T14:08:11.556Z","updated_at":"2025-05-13T18:13:21.365Z","avatar_url":"https://github.com/KnpLabs.png","language":"PHP","readme":"Gaufrette Bundle\n================\n\n[![Build Status](https://github.com/KnpLabs/KnpGaufretteBundle/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/KnpLabs/KnpGaufretteBundle/actions/workflows/ci.yml)\n\nProvides a [Gaufrette][gaufrette-homepage] integration for your Symfony projects.\n\n[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)\n\nAbout Gaufrette\n===============\n\nGaufrette is a PHP library providing a filesystem abstraction layer.\nThis abstraction layer allows you to develop applications without needing to know where all their media files will be stored or how.\n\nDocumentation is available the [official page of Gaufrette][gaufrette-homepage].\n\nInstallation\n============\n\n## Prerequisites\n\nAs this bundle is an integration for Symfony of the [Gaufrette][gaufrette-homepage] library, it requires you to first install [Gaufrette][gaufrette-homepage] in your project.\n\nNote that, you need to install separately the adapters you want to use. You can find more details about these packages [here](https://github.com/KnpLabs/Gaufrette#metapackages-for-adapters),\nand the full list adapters [on packagist](https://packagist.org/packages/gaufrette/).\n\n## With composer\n\n```bash\ncomposer require knplabs/knp-gaufrette-bundle\n```\n\n## Register the bundle\n\nYou must register the bundle in your kernel:\n\n``` php\n\u003c?php\n\nreturn [\n    // ...\n    Knp\\Bundle\\GaufretteBundle\\KnpGaufretteBundle::class =\u003e ['all' =\u003e true],\n];\n```\n\nConfiguration\n=============\n\nThe Gaufrette bundle allows you to declare your filesystems as services without having to reach into the famous \"Service Container\".\nIndeed, you can do it with the configuration!\n\nThe configuration of the Gaufrette bundle is divided into two parts: the `adapters` and the `filesystems`.\n\n## Configuring the Adapters\n\n``` yaml\n# config/packages/knp_gaufrette.yaml\nknp_gaufrette:\n    adapters:\n        foo:\n            local:\n                directory: /path/to/my/filesystem\n```\n\nThe defined adapters are then used to create the filesystems.\n\nYou can use on of these adapters:\n* [Local Adapter](Resources/docs/adapters/local.md)\n* [Safe Local Adapter](Resources/docs/adapters/safe_local.md)\n* [Service](Resources/docs/adapters/service.md)\n* [In Memory](Resources/docs/adapters/memory.md)\n* [Azure Blob Storage](Resources/docs/adapters/azure.md)\n* [GridFS](Resources/docs/adapters/gridfs.md)\n* [MogileFS](Resources/docs/adapters/mogilefs.md)\n* [Ftp](Resources/docs/adapters/ftp.md)\n* [Sftp](Resources/docs/adapters/sftp.md)\n* [Phpseclib Sftp](Resources/docs/adapters/phpseclib_sftp.md)\n* [Apc](Resources/docs/adapters/apc.md)\n* [AsyncAws S3](Resources/docs/adapters/async-aws-s3.md)\n* [AWS S3](Resources/docs/adapters/awss3.md)\n* [Open Cloud](Resources/docs/adapters/opencloud.md)\n* [GoogleCloudStorage](Resources/docs/adapters/googlecloud.md)\n* [Cache](Resources/docs/adapters/cache.md)\n* [Stream Wrapper](Resources/docs/stream.md)\n* [Doctrine DBAL](Resources/docs/adapters/doctrine_dbal.md)\n* [Dropbox](Resources/docs/adapters/dropbox.md)\n\n## Configuring the Filesystems\n\n``` yaml\n# config/packages/knp_gaufrette.yaml\nknp_gaufrette:\n    adapters:\n        # ...\n    filesystems:\n        bar:\n            adapter:    foo\n            alias:      foo_filesystem\n```\n\nEach defined filesystem must have an `adapter` with its value set to an adapter's key.\nThe filesystem defined above will result in a service with id `gaufrette.bar_filesystem`.\nThe `alias` parameter allows us to define an alias for it (`foo_filesystem` in this case).\n\nThe filesystem map\n==================\n\nYou can access all declared filesystems through the map service.\nIn the previous exemple, we declared a `bar` filesystem:\n\n``` php\n$container-\u003eget('knp_gaufrette.filesystem_map')-\u003eget('bar');\n```\n\nReturns the `bar` instance of `Gaufrette\\Filesystem`.\n\nUse cases\n==================\n\n[Check out](https://github.com/KnpLabs/KnpGaufretteBundle/blob/master/Resources/docs/use-case-examples.md) basic examples of the library.\n\n[gaufrette-homepage]: https://github.com/KnpLabs/Gaufrette\n\n## Maintainers\n\nKNPLabs is looking for maintainers ([see why](https://knplabs.com/en/blog/news-for-our-foss-projects-maintenance)).\n\nIf you are interested, feel free to open a PR to ask to be added as a maintainer.\n\nWe’ll be glad to hear from you :)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknplabs%2Fknpgaufrettebundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknplabs%2Fknpgaufrettebundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknplabs%2Fknpgaufrettebundle/lists"}