{"id":20219676,"url":"https://github.com/jamesread/liballure","last_synced_at":"2025-04-30T18:24:28.491Z","repository":{"id":8025400,"uuid":"9434611","full_name":"jamesread/libAllure","owner":"jamesread","description":"A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.","archived":false,"fork":false,"pushed_at":"2025-01-23T23:43:02.000Z","size":275,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-23T03:49:03.132Z","etag":null,"topics":["lib","maturity-prod","shim","wrapper"],"latest_commit_sha":null,"homepage":"http://jamesread.github.io/libAllure/annotated.html","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jamesread.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}},"created_at":"2013-04-14T20:12:58.000Z","updated_at":"2025-01-23T23:43:06.000Z","dependencies_parsed_at":"2024-12-30T23:20:45.716Z","dependency_job_id":"d6906fd4-898e-4b13-b54b-579ba4ca4972","html_url":"https://github.com/jamesread/libAllure","commit_stats":{"total_commits":112,"total_committers":4,"mean_commits":28.0,"dds":0.3839285714285714,"last_synced_commit":"b38007388fed8bb1d364a9da6cd870aa593c8d7d"},"previous_names":[],"tags_count":77,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesread%2FlibAllure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesread%2FlibAllure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesread%2FlibAllure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesread%2FlibAllure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamesread","download_url":"https://codeload.github.com/jamesread/libAllure/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251759139,"owners_count":21639177,"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":["lib","maturity-prod","shim","wrapper"],"created_at":"2024-11-14T06:43:25.801Z","updated_at":"2025-04-30T18:24:28.457Z","avatar_url":"https://github.com/jamesread.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"libAllure\n==\n\nA set of utilities, helpers and shims. It aims to be pretty modular and lightweight.\n\nThis library is published by packagist.org for easy use with composer; https://packagist.org/packages/jwread/lib-allure \n\n[![PHP Composer](https://github.com/jamesread/libAllure/actions/workflows/php.yml/badge.svg)](https://github.com/jamesread/libAllure/actions/workflows/php.yml)\n\n**API Documentation**: http://jamesread.github.io/libAllure/\n\n[![Maturity Badge](https://img.shields.io/badge/maturity-Production-brightgreen)](#none)\n[![Unit Tests](https://github.com/jamesread/libAllure/actions/workflows/unittests.yml/badge.svg)](https://github.com/jamesread/libAllure/actions/workflows/unittests.yml)\n[![Stan](https://github.com/jamesread/libAllure/actions/workflows/phpstan.yml/badge.svg)](https://github.com/jamesread/libAllure/actions/workflows/phpstan.yml)\n[![CodeStyle](https://github.com/jamesread/libAllure/actions/workflows/codestyle.yml/badge.svg)](https://github.com/jamesread/libAllure/actions/workflows/codestyle.yml)\n\n## Compatibiility\n\n|               | Up to PHP 5.5.x | Up tp PHP 7.3 | PHP 8         |\n| ------------- | --------------- | ------------- | ------------- |\n| libAllure 1.x | supported       | not supported | not supported |\n| libAllure 2.x | not supported   | supported     | not supported |\n| libAllure 8.x | not supported   | not supported | supported     |\n\n## Adding with `composer`\n\nYou can add libAllure to your project quickly, if you're using composer.\n\n\tcomposer require jwread/lib-allure\n\nThen to use it, like in test.php;\n\n```php\n\u003c?php\n\nrequire_once 'vendor/autoload.php';\n\nuse \\libAllure\\Database;\nuse \\libAllure\\ErrorHandler;\nuse \\libAllure\\Form;\n\n// etc\n\n?\u003e\n```\n\n## Adding with a standard PHP include\n\nCopy the contents of `/src/main/php/` to somewhere on your include path, like \n`/usr/share/php/` on most Linux distributions. So that you have `/usr/share/php/libAllure/ErrorHander.php`, `/usr/share/php/libAllure/Database.php`, etc.\n\n## API Examples \u0026 Quick Reference\n\n**Full API Documentation**: http://jamesread.github.io/libAllure/\n\n### Database\nWrapper around **PDO**.\n\n```php\nuse \\libAllure\\Database;\n\n$database = new Database('mysql:dbname=testdb;host=127.0.0.1', 'username', 'password');\n\n$sql = 'SELECT p.id, p.title FROM products p';\n$results = $database-\u003eprepare($sql)-\u003eexecute();\n\nvar_dump($results-\u003efetchAll());\n```\n\n### ErrorHandler\nCustom error handler that complains at the slightest thing, makes debugging nice and easy.\n\n```php\nuse \\libAllure\\ErrorHandler;\n\n$handler = new ErrorHandler();\n$handler-\u003ebeGreedy();\n\nthrow new Exception('This is a test');\n```\n\n### Form\nCustom form handling code. \n\n```php\nuse \\libAllure\\ElementInput;\nuse \\libAllure\\Template;\n\n$tpl = new Template('myTemplates'); // requires form.tpl and formElements.tpl in your templates folder\n\nclass MyForm extends \\libAllure\\Form {\n\tpublic function __construct() {\n\t\t$this-\u003eaddElement(new ElementInput('forename', 'Forename', 'My Default Name');\n\t\t$this-\u003eaddDefaultButtons():\n\t}\n\n\tpublic function process() {\n\t\t// do something\n\t}\n}\n\n$f = new MyForm();\n\nif ($f-\u003evalidate()) {\n\t$f-\u003eprocess();\n}\n\n$tpl-\u003edisplayForm($f);\n```\n\n### Template\nJust a nice wrapper around Smarty2/3, that adds in a few compatibility functions to easily switch between the versions.\n\n```php\nuse \\libAllure\\Template;\n\n$tpl = new Template('myTemplates');\n$tpl-\u003edisplay('myTemplate.tpl');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesread%2Fliballure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamesread%2Fliballure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesread%2Fliballure/lists"}