{"id":15984948,"url":"https://github.com/divineomega/php-bucket-testing","last_synced_at":"2025-06-17T21:35:53.423Z","repository":{"id":56969679,"uuid":"147693800","full_name":"DivineOmega/php-bucket-testing","owner":"DivineOmega","description":"🆎 PHP Bucket Testing, A/B testing, split testing","archived":false,"fork":false,"pushed_at":"2018-09-06T15:40:55.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-06T16:48:19.688Z","etag":null,"topics":["a-b-testing","bucket-testing","frontend-testing","split-testing","testing","ui-testing","ux-testing"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DivineOmega.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-09-06T15:21:48.000Z","updated_at":"2019-05-21T07:37:23.000Z","dependencies_parsed_at":"2022-08-21T10:50:54.177Z","dependency_job_id":null,"html_url":"https://github.com/DivineOmega/php-bucket-testing","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/DivineOmega/php-bucket-testing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DivineOmega%2Fphp-bucket-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DivineOmega%2Fphp-bucket-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DivineOmega%2Fphp-bucket-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DivineOmega%2Fphp-bucket-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DivineOmega","download_url":"https://codeload.github.com/DivineOmega/php-bucket-testing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DivineOmega%2Fphp-bucket-testing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260443255,"owners_count":23009984,"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":["a-b-testing","bucket-testing","frontend-testing","split-testing","testing","ui-testing","ux-testing"],"created_at":"2024-10-08T02:11:35.121Z","updated_at":"2025-06-17T21:35:48.402Z","avatar_url":"https://github.com/DivineOmega.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Bucket Testing\n\n[![Build Status](https://travis-ci.org/DivineOmega/php-bucket-testing.svg?branch=master)](https://travis-ci.org/DivineOmega/php-bucket-testing)\n[![Coverage Status](https://coveralls.io/repos/github/DivineOmega/php-bucket-testing/badge.svg?branch=master)](https://coveralls.io/github/DivineOmega/php-bucket-testing?branch=master)\n\nThis library enables developers to easily redirect users to different URLs, for the purpose \nof bucket testing. Bucket testing is also known as A/B testing or split testing.\n\nThis type of testing is used to test two or more versions of a webpage to determine which one\nperforms better based on specfied key metrics, such as clicks, downloads, purchases or any other\nform of conversion.\n\n## Features\n\n* Random selection of buckets, with optional weights\n* Automatic handling of temporary redirects\n* Ability to retrieve bucket and manually handle URL redirection\n* Easy to use fluent interface syntax\n\n## Installation\nTo install, just run the following composer command.\n\n`composer require divineomega/php-bucket-testing`\n\nRemember to include the `vendor/autoload.php` file if your framework does not already do so.\n\n## Usage\n\n```php\n\nuse \\DivineOmega\\BucketTesting\\BucketManager;\nuse \\DivineOmega\\BucketTesting\\Bucket;\n\n// Create a new bucket manager\n$bucketManager = new BucketManager;\n\n// Add buckets, with URLs and optional weights\n$bucketManager-\u003eadd(new Bucket('https://google.co.uk/'))-\u003ewithWeight(25);\n$bucketManager-\u003eadd(new Bucket('https://php.net/'))-\u003ewithWeight(75);\n\n// Redirect to a randomly selected URL\n$bucketManager-\u003eredirect();\n\n// Or, if you wish, get a random bucket and manually handle the redirection\n$bucket = $bucketManager-\u003egetRandomBucket();\nheader('location: '.$bucket-\u003eurl);\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivineomega%2Fphp-bucket-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivineomega%2Fphp-bucket-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivineomega%2Fphp-bucket-testing/lists"}