{"id":37007071,"url":"https://github.com/mary-shelley/frankie","last_synced_at":"2026-01-14T00:46:23.358Z","repository":{"id":26917667,"uuid":"30379767","full_name":"mary-shelley/frankie","owner":"mary-shelley","description":"A frankenstein framework - middleware and annotation based","archived":false,"fork":false,"pushed_at":"2017-07-19T19:54:59.000Z","size":116,"stargazers_count":20,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-11-27T16:45:06.557Z","etag":null,"topics":["annotation","aop","framework","php","symfony"],"latest_commit_sha":null,"homepage":"https://mary-shelley.github.io/docs/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mary-shelley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-05T21:37:44.000Z","updated_at":"2025-02-06T16:00:36.000Z","dependencies_parsed_at":"2022-08-31T08:24:04.744Z","dependency_job_id":null,"html_url":"https://github.com/mary-shelley/frankie","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/mary-shelley/frankie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mary-shelley%2Ffrankie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mary-shelley%2Ffrankie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mary-shelley%2Ffrankie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mary-shelley%2Ffrankie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mary-shelley","download_url":"https://codeload.github.com/mary-shelley/frankie/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mary-shelley%2Ffrankie/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28406563,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["annotation","aop","framework","php","symfony"],"created_at":"2026-01-14T00:46:23.228Z","updated_at":"2026-01-14T00:46:23.327Z","avatar_url":"https://github.com/mary-shelley.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Frankie - A frankenstein micro-framework for PHP\n\n[![Build Status](https://travis-ci.org/mary-shelley/frankie.svg?branch=master)](https://travis-ci.org/mary-shelley/frankie)\n\n## Features\n\nFrankie is a micro-framework focused on annotation. The goal is to use\nannotation in order to do almost everything in the framework.\n\n * Annotated Routes (Routing)\n * Annotated Injections (Dependencies)\n * Annotated Request Flow (Application Flow)\n\nMainly Frankie is a framework for create RESTful applications and microservices.\n\nDiscover more on the [documentation](https://mary-shelley.github.io/docs/)\n\n## Hands-on!\n\nThe goal is focus on actions and attach before and action events using\nannotations\n\n```php\n\u003c?php\n/**\n * @Before(targetClass=\"HttpAuth\", targetMethod=\"basic\")\n * @After(targetClass=\"Serializer\", targetMethod=\"toJson\")\n */\nclass MyController\n{\n    /**\n     * @Inject\n     * @var Zend\\EventManager\\EventManager\n     */\n    private $eventManager;\n\n    /**\n     * @Route(\"/my/path/{id}\", methods={\"GET\"})\n     * @Before(targetClass=\"MyHook\\ThisOne\", targetMethod=\"count\")\n     * @Before(targetClass=\"Stopwatch\", targetMethod=\"start\")\n     * @After(targetClass=\"Stopwatch\", targetMethod=\"stop\")\n     */\n    public function get(Request $request, Response $response, $id)\n    {\n        // ...\n        $this-\u003eeventManager-\u003etrigger(\"mark-it\", $element);\n        // ...\n    }\n}\n\n```\n\n### Testing with SpecBDD - PHPSpec\n\n```php\n\u003c?php\n\nnamespace spec;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument;\nuse Zend\\EventManager\\EventManager;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\n\nclass MyControllerSpec extends ObjectBehavior\n{\n    function let(EventManager $em)\n    {\n        $this-\u003esetEventManager($em);\n    }\n\n    function it_is_initializable()\n    {\n        $this-\u003eshouldHaveType('MyController');\n    }\n\n    function it_should_trigger_the_mark_event(\n        Request $request, Response $response, EventManager $em\n    )\n    {\n        $em-\u003etrigger(\"mark-it\", Argument::Any())-\u003eshouldBeCalledTimes(1);\n\n        $this-\u003eget($request, $response);\n    }\n}\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmary-shelley%2Ffrankie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmary-shelley%2Ffrankie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmary-shelley%2Ffrankie/lists"}