{"id":48077621,"url":"https://github.com/bitsbeats/php-softfailer","last_synced_at":"2026-04-04T14:51:38.053Z","repository":{"id":62494654,"uuid":"202512932","full_name":"bitsbeats/php-softfailer","owner":"bitsbeats","description":"PHP library to suppress errors (\"soft failures\") unless they exceed a certain threshold within a given time interval.","archived":false,"fork":false,"pushed_at":"2019-08-15T14:19:40.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-24T15:47:43.774Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitsbeats.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":"2019-08-15T09:26:17.000Z","updated_at":"2019-12-17T07:38:34.000Z","dependencies_parsed_at":"2022-11-02T11:18:03.483Z","dependency_job_id":null,"html_url":"https://github.com/bitsbeats/php-softfailer","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/bitsbeats/php-softfailer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsbeats%2Fphp-softfailer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsbeats%2Fphp-softfailer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsbeats%2Fphp-softfailer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsbeats%2Fphp-softfailer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitsbeats","download_url":"https://codeload.github.com/bitsbeats/php-softfailer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsbeats%2Fphp-softfailer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31403764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"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":"2026-04-04T14:51:37.914Z","updated_at":"2026-04-04T14:51:38.044Z","avatar_url":"https://github.com/bitsbeats.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bitsbeats/php-softfailer\n\nPHP library to suppress errors (\"soft failures\") unless they exceed a certain threshold within\na given time interval.\n\n## Features\n- uses persistent storage, so that failures are counted among independent script calls or pageviews\n- storage drivers for filesystem, memcache and APCu\n\n## Install\nThe easiest way to install SoftFailer is by using [composer](https://getcomposer.org/): \n\n```\n$\u003e composer require bitsbeats/softfailer\n```\n\n## Usage\n\n```php\n$storage = new Filesystem('/tmp/softfail.txt', 500);\n\n// hard fail if 3 or more \"soft fails\" occur within a 3600 second time window\n$sf = new SoftFailer($storage, 3, 3600);\n\ntry {\n    $sf-\u003erecordFailure(new DateTime());\n}\ncatch (HardFailLimitReachedException $e) {\n    // a \"hard fail\" is triggered by throwing a \"HardFailLimitReachedException\" exception\n    print \"FAIL: {$e-\u003egetMessage()}\\n\";\n    $sf-\u003eclearFailPoints();\n    exit(1);\n}\n```\n\nSee `example.php` for the full example.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitsbeats%2Fphp-softfailer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitsbeats%2Fphp-softfailer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitsbeats%2Fphp-softfailer/lists"}