{"id":18561068,"url":"https://github.com/lamoda/codeception-flysystem","last_synced_at":"2025-07-16T08:33:22.413Z","repository":{"id":57010982,"uuid":"157375352","full_name":"lamoda/codeception-flysystem","owner":"lamoda","description":"Codeception FlySystem module  with several adapters","archived":false,"fork":false,"pushed_at":"2020-04-27T10:02:50.000Z","size":19,"stargazers_count":16,"open_issues_count":0,"forks_count":3,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-04-10T18:12:31.991Z","etag":null,"topics":["codeception","codeception-flysystem","codeception-module","flysystem","php","s3","sftp","webdav"],"latest_commit_sha":null,"homepage":"","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/lamoda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-13T12:17:07.000Z","updated_at":"2024-07-09T16:17:19.000Z","dependencies_parsed_at":"2022-08-21T13:10:18.278Z","dependency_job_id":null,"html_url":"https://github.com/lamoda/codeception-flysystem","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/lamoda/codeception-flysystem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamoda%2Fcodeception-flysystem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamoda%2Fcodeception-flysystem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamoda%2Fcodeception-flysystem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamoda%2Fcodeception-flysystem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lamoda","download_url":"https://codeload.github.com/lamoda/codeception-flysystem/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamoda%2Fcodeception-flysystem/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265497558,"owners_count":23777009,"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":["codeception","codeception-flysystem","codeception-module","flysystem","php","s3","sftp","webdav"],"created_at":"2024-11-06T22:05:38.148Z","updated_at":"2025-07-16T08:33:22.368Z","avatar_url":"https://github.com/lamoda.png","language":"PHP","readme":"# Codeception FlySystem Extension\n\n[![Build Status](https://travis-ci.org/lamoda/codeception-flysystem.svg?branch=master)](https://travis-ci.org/lamoda/codeception-flysystem)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/lamoda/codeception-flysystem/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/lamoda/codeception-flysystem/?branch=master)\n[![Code Coverage](https://scrutinizer-ci.com/g/lamoda/codeception-flysystem/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/lamoda/codeception-flysystem/?branch=master)\n[![Build Status](https://scrutinizer-ci.com/g/lamoda/codeception-flysystem/badges/build.png?b=master)](https://scrutinizer-ci.com/g/lamoda/codeception-flysystem/build-status/master)\n\nThis extension supports working with [FlySystem](https://flysystem.thephpleague.com/) with several adapters.\n\nProvides a set of methods for checking and modifying files on remote storage.\n\n## Installation\n\n1. Install library\n    ```bash\n    composer require lamoda/codeception-flysystem\n    ```\n\n2. Add configuration to codeception.yml\n    ```yaml\n    modules:\n        config:\n            \\Lamoda\\Codeception\\Extension\\FlySystemModule:\n                adapters:\n                    webdav:\n                        builderAdapter: \\Lamoda\\Codeception\\Extension\\AdapterFactory\\WebdavAdapterFactory\n                        config:\n                            baseUri: \"http://webdav-host\"\n                            userName: \"userName\"\n                            password: \"password\"\n                            authType: \"authType\"\n                    sftp:\n                        builderAdapter: \\Lamoda\\Codeception\\Extension\\AdapterFactory\\SftpAdapterFactory\n                        config:\n                            host: \"http://sftp-host\"\n                            username: \"username\"\n                            password: \"password\"\n                            port: \"22\"\n                            root: \"/\"\n                    s3:\n                        builderAdapter: \\Lamoda\\Codeception\\Extension\\AdapterFactory\\AwsS3AdapterFactory\n                        config:\n                            bucket: \"your-bucket\"\n                            endpoint: \"endpoint\" # if you are using S3-compatible object storage service\n                            credentials: \n                                key: \"key\"\n                                secret: \"secret\"\n                            region: \"region\"\n                            version: \"version\"                         \n    ```\n\n3. Include to suite\n    ```yaml\n    modules:\n        enabled:\n            - \\Lamoda\\Codeception\\Extension\\FlySystemModule\n    ```\n\n## Supported adapters\n\n### [sftp](https://flysystem.thephpleague.com/adapter/sftp/)\n\nConfiguration example:\n\n```yaml\nmodules:\n    config:\n        \\Lamoda\\Codeception\\Extension\\FlySystemModule:\n            adapters:\n                sftp:\n                    builderAdapter: \\Lamoda\\Codeception\\Extension\\AdapterFactory\\SftpAdapterFactory\n                    config:\n                        host: \"http://sftp-host\"\n                        username: \"username\"\n                        password: \"password\"\n                        port: \"22\"\n                        root: \"/\"\n```\n\nUsage:\n\n```php\n$fileSystem = $this-\u003etester-\u003egetFileSystem('sftp');\n```\n\n### [webdav](https://flysystem.thephpleague.com/adapter/webdav/)\n\nConfiguration example:\n\n```yaml\nmodules:\n    config:\n        \\Lamoda\\Codeception\\Extension\\FlySystemModule:\n            adapters:\n                webdav:\n                    builderAdapter: \\Lamoda\\Codeception\\Extension\\AdapterFactory\\WebdavAdapterFactory\n                    config:\n                        baseUri: \"http://webdav-host\"\n                        userName: \"userName\"\n                        password: \"password\"\n                        authType: \"authType\"\n```\n\nUsage:\n\n```php\n$fileSystem = $this-\u003etester-\u003egetFileSystem('webdav');\n```\n\n### [AWS S3](https://flysystem.thephpleague.com/adapter/aws-s3/)\n\nConfiguration example:\n\n```yaml\nmodules:\n    config:\n        \\Lamoda\\Codeception\\Extension\\FlySystemModule:\n            adapters:\n                s3:\n                    builderAdapter: \\Lamoda\\Codeception\\Extension\\AdapterFactory\\AwsS3AdapterFactory\n                    config:\n                        bucket: \"your-bucket\"\n                        endpoint: \"endpoint\" # if you are using S3-compatible object storage service\n                        credentials: \n                            key: \"key\"\n                            secret: \"secret\"\n                        region: \"region\"\n                        version: \"version\" \n```\n\nUsage:\n\n```php\n$fileSystem = $this-\u003etester-\u003egetFileSystem('s3');\n```\n\n## Usage\n\nGet instance of FileSystem by name from config:\n\n```php\n$fileSystem = $this-\u003etester-\u003egetFileSystem('sftp');\n```\n\nModify file on remote server:\n\n```php\n$fileSystem-\u003eclearDir('/path/to/dir');\n$fileSystem-\u003ewriteFile('test.txt', 'Hello world!');\n$fileSystem-\u003ecopyFile('test.txt', 'test_copy.txt');\n$fileSystem-\u003edeleteFile('test.txt');\n\n$files = $fileSystem-\u003egrabFileList('/path/to/dir');\n```\n\nCheck files on remote server:\n\n```php\n$fileSystem-\u003ecanSeeFile('test_copy.txt');\n$fileSystem-\u003ecantSeeFile('test.txt');\n\n$fileSystem-\u003eseeInFile('test_copy.txt', 'Hello');\n\n$fileSystem-\u003eseeFilesCount('/path/to/dir', 1);\n\n$fileSystem-\u003eseeFileFoundMatches('/copy$/', '/path/to/dir');\n$fileSystem-\u003edontSeeFileFoundMatches('/test$/', '/path/to/dir');\n```\n\n## Development\n\n### PHP Coding Standards Fixer\n\n```bash\nmake php-cs-check\nmake php-cs-fix\n```\n\n### Tests\n\nUnit\n\n```bash\nmake test-unit\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamoda%2Fcodeception-flysystem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flamoda%2Fcodeception-flysystem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamoda%2Fcodeception-flysystem/lists"}