{"id":21051646,"url":"https://github.com/drhino/git-dl","last_synced_at":"2025-05-15T21:36:02.248Z","repository":{"id":40319366,"uuid":"99523427","full_name":"drhino/git-dl","owner":"drhino","description":"Clones a Github repository with PHP \u0026 ZipArchive. Without using Git or exec().","archived":false,"fork":false,"pushed_at":"2022-06-26T01:23:13.000Z","size":20,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-19T20:04:42.809Z","etag":null,"topics":["composer-library","github","php","zipfile"],"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/drhino.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":"2017-08-07T01:07:59.000Z","updated_at":"2023-09-08T17:28:22.000Z","dependencies_parsed_at":"2022-06-29T10:30:00.138Z","dependency_job_id":null,"html_url":"https://github.com/drhino/git-dl","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drhino%2Fgit-dl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drhino%2Fgit-dl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drhino%2Fgit-dl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drhino%2Fgit-dl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drhino","download_url":"https://codeload.github.com/drhino/git-dl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225384295,"owners_count":17465878,"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":["composer-library","github","php","zipfile"],"created_at":"2024-11-19T15:58:51.388Z","updated_at":"2024-11-19T15:58:52.412Z","avatar_url":"https://github.com/drhino.png","language":"PHP","readme":"# Download a Github repository with PHP.\n\n### Install with composer:\n\n```sh\n$ composer require wbadrh/git-dl\n```\n\n### Example usage:\n\n```php\n\u003c?php\n\n$git = new GitDownload('/your/downloads');\n\n$author     = 'drhino';\n$repository = 'git-dl';\n$branch     = 'master';\n\n$path = $git-\u003eclone($author, $repository, $branch);\n\n// Prints: 'Saved to: /your/downloads/drhino/git-dl'\necho \"Saved to: $path\";\n\n```\n\n## How does it work?\n\nThe zip-archive is downloaded from Github. Then unpacked with ZipArchive.\n\u003cbr\u003eFrom version 1.1.x and above; A stream is used to keep a low memory footprint.\n\u003cbr\u003eAfter a succesful unpack, the downloaded archive is removed.\n\u003cbr\u003eCloning an existing repository updates to the latest version.\n\n## Changelog:\n\nv1.1.0\n- Uses a stream for writing.\n- The PHP cURL extension is no longer used.\n- Supports both Flysystem 1 and 3 (PHP 7 and 8).\n- Returns the directory path on success.\n- Throws Exception.\n\nv1.0.2\n- Fixes CVE-2021-32708.\n\nv1.0.1\n- Adds documentation.\n\nv1.0.0\n- Initial release.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrhino%2Fgit-dl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrhino%2Fgit-dl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrhino%2Fgit-dl/lists"}