{"id":16674225,"url":"https://github.com/waltertamboer/pharcompiler","last_synced_at":"2026-05-20T12:10:32.293Z","repository":{"id":6238017,"uuid":"7469811","full_name":"waltertamboer/pharcompiler","owner":"waltertamboer","description":"A compiler to create PHAR files.","archived":false,"fork":false,"pushed_at":"2013-12-11T19:47:15.000Z","size":270,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-19T19:49:20.873Z","etag":null,"topics":["compiler","phar","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/waltertamboer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-06T16:37:31.000Z","updated_at":"2018-03-28T12:21:57.000Z","dependencies_parsed_at":"2022-09-09T11:22:49.689Z","dependency_job_id":null,"html_url":"https://github.com/waltertamboer/pharcompiler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waltertamboer%2Fpharcompiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waltertamboer%2Fpharcompiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waltertamboer%2Fpharcompiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waltertamboer%2Fpharcompiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waltertamboer","download_url":"https://codeload.github.com/waltertamboer/pharcompiler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243326888,"owners_count":20273565,"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":["compiler","phar","php"],"created_at":"2024-10-12T12:29:48.224Z","updated_at":"2025-12-26T12:33:39.584Z","avatar_url":"https://github.com/waltertamboer.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"PharCompiler\n============\n\n[![Build Status](https://travis-ci.org/WalterTamboer/pharcompiler.png)](https://travis-ci.org/WalterTamboer/pharcompiler)\n\nPharCompiler is a compiler to easily create PHAR files. The concept is that you create a \nnew instance of the compiler to which you give the name of the PHAR file. Next you add the \nfiles that should be packed into the archive and last you call `compile`.\n\nCompiling\n---------\nCompiling a .phar file is easy. \n```\n\u003c?php\n\n// build.php:\n$compiler = new \\WT\\PharCompiler\\Compiler('my.phar');\n$compiler-\u003esetVariable('package_version', '1.0.0');\n$compiler-\u003eaddFile(__DIR__ . '/src/test.php');\n$compiler-\u003ecompile();\n```\n\nBy using `addFile` and `addDirectory` you can add a list of files to the archive.\n\nMeta Data Variables\n-------------------\nIt's possible to add meta data to the compiler. This meta data is injected in the source \nfiles. For example:\n\n```\n\u003c?php\n\n// build.php:\n$compiler = new \\WT\\PharCompiler\\Compiler();\n$compiler-\u003esetVariable('package_version', '1.0.0');\n$compiler-\u003eaddFile(__DIR__ . '/src/test.php');\n$compiler-\u003ecompile();\n```\n\n```\n\u003c?php\n\n// test.php:\n\necho 'Version: @package_version@';\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaltertamboer%2Fpharcompiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaltertamboer%2Fpharcompiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaltertamboer%2Fpharcompiler/lists"}