{"id":21911667,"url":"https://github.com/efficience-it/speedtest-bundle","last_synced_at":"2026-01-24T15:07:47.428Z","repository":{"id":61652029,"uuid":"550819544","full_name":"efficience-it/speedtest-bundle","owner":"efficience-it","description":"Bundle to add a speedtest page on your Symfony project","archived":false,"fork":false,"pushed_at":"2024-10-14T09:48:42.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-16T05:59:27.913Z","etag":null,"topics":["php","symfony"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/efficience-it.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-10-13T11:33:08.000Z","updated_at":"2024-10-14T09:48:43.000Z","dependencies_parsed_at":"2025-04-16T04:50:52.100Z","dependency_job_id":null,"html_url":"https://github.com/efficience-it/speedtest-bundle","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/efficience-it/speedtest-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efficience-it%2Fspeedtest-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efficience-it%2Fspeedtest-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efficience-it%2Fspeedtest-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efficience-it%2Fspeedtest-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/efficience-it","download_url":"https://codeload.github.com/efficience-it/speedtest-bundle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efficience-it%2Fspeedtest-bundle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28730310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"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":["php","symfony"],"created_at":"2024-11-28T18:07:11.916Z","updated_at":"2026-01-24T15:07:47.399Z","avatar_url":"https://github.com/efficience-it.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Speedtest bundle\n\nThis speedtest is a Symfony-based bundle. It's an overhaul of the [LibreSpeed](https://librespeed.org/) project.\n\nIt was created by Efficience IT, a French company located in Lille.\n\n## Installation\n\n### Step 1: Install the bundle with Composer\n\nRequire the `efficience-it/speedtest-bundle` with [Composer](https://getcomposer.org/).\n\n```bash\n$ composer require efficience-it/speedtest-bundle\n``` \n\n### Step 2: Configure the speedtest in your project\n\nFirst, verify if the line below is in the `bundles.php` file. If not, copy and paste it.\n\n```php\nEfficienceIt\\SpeedtestBundle\\SpeedtestBundle::class =\u003e ['all' =\u003e true]\n```\n\nSecond, create the `speedtest.yaml` file in the `config/routes` folder. \n\nCopy the code below and paste it in this file.\n\n```yaml\nspeedtest:\n    resource: '@SpeedtestBundle/Resources/config/routes.yaml'\n    prefix: /speedtest\n```\n\n### Step 3: Add the speedtest on your website\n\nOn any controller, you can call the SpeedtestService and its `displaySpeedtest` function.\n\nHere is an example of a controller, with a route tht includes the bundle:\n\n```php\nclass HomeController extends AbstractController\n{\n    /**\n     * @Route(\"/home\", name=\"app_home\")\n     */\n    public function index(SpeedtestService $speedtestService): Response\n    {\n        // Replace 'home/index.html.twig' with the name of your template\n        return $this-\u003erender('home/index.html.twig', [\n            'speedtest' =\u003e $speedtestService-\u003edisplaySpeedtest()\n        ]);\n    }\n}\n```\n\nTo display the speedtest on your page, just include it in your template file as below:\n\n```php\n{% extends 'base.html.twig' %}\n\n{% block title %}Hello HomeController!{% endblock %}\n\n{% block body %}\n    {% include speedtest %}\n{% endblock %}\n```\n\nYou can access to your route (in this example `localhost/home`), and the speedtest should appear !\n\n## How to retrieve the results ?\n\nCreate a new Controller (for example `ResultsController`), and copy/paste this code:\n\n```php\n/* DON'T ADD A @Route ANNOTATION */\nclass ResultsController extends AbstractController\n{\n    /* DON'T CHANGE THIS ROUTE ! */\n    /**\n     * @Route(\"/speedtest-results\", name=\"speedtest_results\", methods={\"POST\"})\n     */\n    public function speedtestResults(Request $request): Response\n    {\n        if (!$request-\u003eisXmlHttpRequest()) {\n            throw new AccessDeniedException();\n        }\n        $requestContent = json_decode($request-\u003egetContent(), true);\n        dump($requestContent);\n\n        return new JsonResponse($requestContent);\n    }\n}\n```\n\nWith this route (called in AJAX), you can retrieve your speedtest results and do whatever you want with it !\n\n## Change the bundle language\n\nFind the `config/packages/translation.yaml`. You just have to change the `default_path` parameter with the language you want.\n\nActually, you can translate in English (en) and French (fr). Here is an example of the `translation.yaml` file with French configuration.\n\n```yaml\nframework:\n    default_locale: fr  # Change the language here\n    translator:\n        default_path: '%kernel.project_dir%/translations'\n        fallbacks:\n            - en        # Default language if the default_locale is not found.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefficience-it%2Fspeedtest-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fefficience-it%2Fspeedtest-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefficience-it%2Fspeedtest-bundle/lists"}