{"id":43533987,"url":"https://github.com/grptx/yii2-firebase","last_synced_at":"2026-02-03T16:23:29.541Z","repository":{"id":62512938,"uuid":"97843201","full_name":"grptx/yii2-firebase","owner":"grptx","description":"Yii2 Component to connect to Firebase Database","archived":false,"fork":false,"pushed_at":"2018-10-19T08:39:13.000Z","size":45,"stargazers_count":14,"open_issues_count":1,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-15T06:29:18.890Z","etag":null,"topics":["firebase","firebase-database","php7","yii2","yii2-component"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/grptx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-20T14:12:04.000Z","updated_at":"2022-07-26T07:00:13.000Z","dependencies_parsed_at":"2022-11-02T13:15:14.119Z","dependency_job_id":null,"html_url":"https://github.com/grptx/yii2-firebase","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/grptx/yii2-firebase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grptx%2Fyii2-firebase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grptx%2Fyii2-firebase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grptx%2Fyii2-firebase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grptx%2Fyii2-firebase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grptx","download_url":"https://codeload.github.com/grptx/yii2-firebase/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grptx%2Fyii2-firebase/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29048713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T15:43:47.601Z","status":"ssl_error","status_checked_at":"2026-02-03T15:43:46.709Z","response_time":96,"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":["firebase","firebase-database","php7","yii2","yii2-component"],"created_at":"2026-02-03T16:23:27.145Z","updated_at":"2026-02-03T16:23:29.529Z","avatar_url":"https://github.com/grptx.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yii2-firebase\n\n[![Latest Stable Version](https://poser.pugx.org/grptx/yii2-firebase/v/stable)](https://packagist.org/packages/grptx/yii2-firebase)\n[![Total Downloads](https://poser.pugx.org/grptx/yii2-firebase/downloads)](https://packagist.org/packages/grptx/yii2-firebase)\n[![Latest Unstable Version](https://poser.pugx.org/grptx/yii2-firebase/v/unstable)](https://packagist.org/packages/grptx/yii2-firebase)\n[![License](https://poser.pugx.org/grptx/yii2-firebase/license)](https://packagist.org/packages/grptx/yii2-firebase)\n\nThis Yii2 component wraps [kreait/firebase-php](https://github.com/kreait/firebase-php/) and allow to easy connect to the Firebase realtime database \n\n## Installation\n\nPreferred way to install is through [Composer](https://getcomposer.org): \n```shell\nphp composer.phar require grptx/yii2-firebase:~0.3.1\n```\nOr, you may add\n\n```php\n\"grptx/yii2-firebase\": \"~0.3.1\"\n```\n\nto the require section of your `composer.json` file and execute `php composer.phar update`.\n\n## Configuration\n\n```php\n...\n'components' =\u003e [\n    'firebase' =\u003e [\n        'class'=\u003e'grptx\\Firebase\\Firebase',\n        'credential_file'=\u003e'service_account.json', // (see https://firebase.google.com/docs/admin/setup#add_firebase_to_your_app)\n        'database_uri'=\u003e'https://my-project.firebaseio.com', // (optional)\n    ]\n...\n]\n```\n\n### Optional\nto use the autocomplete function of IDE (i.e. Phpstorm) you can optionally replace in the web/index.php the inclusion of Yii.php file and the Application instance:\n\nreplace:\n```php\nrequire(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');\n//and \n(new yii\\web\\Application($config))-\u003erun();\n```\nwith:\n```php\nrequire (__DIR__.'/../../vendor/grptx/yii2-firebase/src/yii2/Yii.php');\n//and\n(new \\grptx\\Firebase\\web\\Application($config))-\u003erun();\n\n```\nnow when you need you can use grptx\\Firebase\\yii2\\Yii instead of Yii to use autocomplete of your IDE\n\n## Usage\n\nRetrive a _database_ ,_reference_ and a _value_\n```php\n$database = Yii::$app-\u003efirebase-\u003egetDatabase();\n$reference = $database-\u003egetReference('path/to/child/location');\n$value = $reference-\u003egetValue();\n```\n\nor just the _reference_ and a _value_\n\n```php\n$reference = Yii::$app-\u003efirebase-\u003egetReference('path/to/child/location');\n$value = $reference-\u003egetValue();\n```\n\nfor other method see [firebase-php.readthedocs.io.](https://firebase-php.readthedocs.io/en/latest/realtime-database.html)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrptx%2Fyii2-firebase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrptx%2Fyii2-firebase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrptx%2Fyii2-firebase/lists"}