{"id":29111902,"url":"https://github.com/utopia-php/detector","last_synced_at":"2026-03-01T22:01:56.001Z","repository":{"id":271708313,"uuid":"913822168","full_name":"utopia-php/detector","owner":"utopia-php","description":"Lite \u0026 fast micro PHP detector library that is **easy to use**.","archived":false,"fork":false,"pushed_at":"2026-02-17T11:26:34.000Z","size":136,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2026-02-17T16:54:11.254Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/utopia-php.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-08T12:21:45.000Z","updated_at":"2026-02-17T11:26:39.000Z","dependencies_parsed_at":"2025-01-30T08:19:47.435Z","dependency_job_id":"8b49fe86-8503-4d75-9554-11a4e33b3542","html_url":"https://github.com/utopia-php/detector","commit_stats":null,"previous_names":["utopia-php/detector"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/utopia-php/detector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utopia-php%2Fdetector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utopia-php%2Fdetector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utopia-php%2Fdetector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utopia-php%2Fdetector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/utopia-php","download_url":"https://codeload.github.com/utopia-php/detector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utopia-php%2Fdetector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29986241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T21:06:37.093Z","status":"ssl_error","status_checked_at":"2026-03-01T21:05:45.052Z","response_time":124,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-06-29T10:02:18.129Z","updated_at":"2026-03-01T22:01:55.997Z","avatar_url":"https://github.com/utopia-php.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Utopia Detector\n\n[![Build Status](https://travis-ci.org/utopia-php/detector.svg?branch=master)](https://travis-ci.com/utopia-php/detector)\n![Total Downloads](https://img.shields.io/packagist/dt/utopia-php/detector.svg)\n[![Discord](https://img.shields.io/discord/564160730845151244?label=discord)](https://appwrite.io/discord)\n\nUtopia Detector is a simple library for fast and reliable environment identification. This library is aiming to be as simple and easy to learn and use. This library is maintained by the [Appwrite team](https://appwrite.io).\n\n## Getting Started\n\nInstall using composer:\n```bash\ncomposer require utopia-php/detector\n```\n\nInit in your application:\n```php\n\u003c?php\n\nrequire_once __DIR__ . '/../../vendor/autoload.php';\n\nuse Utopia\\Detector\\Detector\\Framework;\nuse Utopia\\Detector\\Detector\\Packager;\nuse Utopia\\Detector\\Detector\\Rendering;\nuse Utopia\\Detector\\Detector\\Runtime;\nuse Utopia\\Detector\\Detector\\Strategy;\n\n// Initialise Packager Detection\n$files = ['bun.lockb', 'fly.toml', 'package.json', 'remix.config.js'];\n$detector = new Packager($files);\n$detector\n    -\u003eaddOption(new PNPM())\n    -\u003eaddOption(new Yarn())\n    -\u003eaddOption(new NPM());\n\n$detectedPackager = $detector-\u003edetect();\n$packagerName = $detectedPackager-\u003egetName();\n\n// Initialise Runtime Detection\n$detector = new Runtime(\n    $files,\n    new Strategy(Strategy::FILEMATCH), // similar for LANGUAGES and EXTENSIONS\n    'pnpm'\n);\n\n$detector\n    -\u003eaddOption(new Node())\n    -\u003eaddOption(new Bun())\n    -\u003eaddOption(new Deno())\n    -\u003eaddOption(new PHP())\n    -\u003eaddOption(new Python())\n    -\u003eaddOption(new Dart())\n    -\u003eaddOption(new Swift())\n    -\u003eaddOption(new Ruby())\n    -\u003eaddOption(new Java())\n    -\u003eaddOption(new CPP())\n    -\u003eaddOption(new Dotnet());\n\n$detectedRuntime = $detector-\u003edetect();\n$runtime = $detectedRuntime-\u003egetName();\n$runtimeCommands = $detectedRuntime-\u003egetCommands();\n\n// Initialise Framework Detection\n$files = ['src', 'types', 'makefile', 'components.js', 'debug.js', 'package.json', 'svelte.config.js'];\n$packager = 'pnpm';\n$detector = new Framework($files, $packager);\n\n$detector\n    -\u003eaddOption(new Flutter())\n    -\u003eaddOption(new Nuxt())\n    -\u003eaddOption(new Astro())\n    -\u003eaddOption(new Analog())\n    -\u003eaddOption(new Angular())\n    -\u003eaddOption(new Remix())\n    -\u003eaddOption(new SvelteKit())\n    -\u003eaddOption(new Lynx())\n    -\u003eaddOption(new NextJs());\n\n$detectedFramework = $detector-\u003edetect();\n$framework = $detectedFramework-\u003egetName();\n$frameworkInstallCommand = $framework = $detectedFramework-\u003egetInstallCommand();\n\n// Initialise Rendering Detection\n$files = ['./build/server/index.js', './build/server/renderers.js'];\n$framework = 'remix';\n$detector = new Rendering($files, $framework);\n$detector\n    -\u003eaddOption(new SSR())\n    -\u003eaddOption(new Static());\n\n$detectedRendering = $detector-\u003edetect();\n$rendering = $detectedRendering-\u003egetName();\n```\n\n### Supported Adapters\n\nDetector Adapters:\n\n| Adapter | Status |\n|---------|---------|\n| Runtime | ✅ |\n| Framework | ✅ |\n| Packager | ✅ |\n| Rendering | ✅ |\n\nRuntime Adapters:\n\n| Adapter | Status |\n|---------|---------|\n| CPP | ✅ |\n| Dart | ✅ |\n| Deno | ✅ |\n| Dotnet | ✅ |\n| Java | ✅ |\n| JavaScript | ✅ |\n| PHP | ✅ |\n| Python | ✅ |\n| Ruby | ✅ |\n| Swift | ✅ |\n| Bun | ✅ |\n\nFramework Adapters:\n\n| Adapter | Status |\n|---------|---------|\n| Astro | ✅ |\n| Flutter | ✅ |\n| NextJs | ✅ |\n| Nuxt | ✅ |\n| Remix | ✅ |\n| SvelteKit | ✅ |\n| Angular | ✅ |\n| Analog | ✅ |\n| Lynx | ✅ |\n\nPackager Adapters:\n\n| Adapter | Status |\n|---------|---------|\n| NPM | ✅ |\n| PNPM | ✅ |\n| Yarn | ✅ |\n\nRendering Adapters:\n\n| Adapter | Status |\n|---------|---------|\n| SSR | ✅ |\n| Static | ✅ |\n\n`✅  - supported, 🛠  - work in progress`\n\n## System Requirements\n\nUtopia Detector requires PHP 8.0 or later. We recommend using the latest PHP version whenever possible.\n\n\n## Contributing\n\nAll code contributions - including those of people having commit access - must go through a pull request and approved by a core developer before being merged. This is to ensure proper review of all the code.\n\nFork the project, create a feature branch, and send us a pull request.\n\nYou can refer to the [Contributing Guide](CONTRIBUTING.md) for more info.\n\n## Tests\n\nTo run all tests, use the following command:\n\n```bash\ncomposer test\n```\n\n## Copyright and license\n\nThe MIT License (MIT) [http://www.opensource.org/licenses/mit-license.php](http://www.opensource.org/licenses/mit-license.php)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futopia-php%2Fdetector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Futopia-php%2Fdetector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futopia-php%2Fdetector/lists"}