{"id":13667711,"url":"https://github.com/prismicio-community/php-kit","last_synced_at":"2025-05-15T03:07:48.991Z","repository":{"id":37547588,"uuid":"11813878","full_name":"prismicio-community/php-kit","owner":"prismicio-community","description":"Community maintained development kit for Prismic and the PHP language","archived":false,"fork":false,"pushed_at":"2025-01-02T20:57:45.000Z","size":1577,"stargazers_count":109,"open_issues_count":0,"forks_count":82,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-04-29T21:01:56.253Z","etag":null,"topics":["php"],"latest_commit_sha":null,"homepage":"https://prismic.io","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prismicio-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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-08-01T10:13:12.000Z","updated_at":"2025-01-02T20:49:21.000Z","dependencies_parsed_at":"2024-01-14T16:13:30.565Z","dependency_job_id":"ad1a96b4-7387-4bcb-891c-f7a183958671","html_url":"https://github.com/prismicio-community/php-kit","commit_stats":{"total_commits":498,"total_committers":38,"mean_commits":"13.105263157894736","dds":0.7469879518072289,"last_synced_commit":"f02b9d365c0300bd248982d93fde37e8e632056f"},"previous_names":["prismicio/php-kit"],"tags_count":88,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prismicio-community%2Fphp-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prismicio-community%2Fphp-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prismicio-community%2Fphp-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prismicio-community%2Fphp-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prismicio-community","download_url":"https://codeload.github.com/prismicio-community/php-kit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253762940,"owners_count":21960474,"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":["php"],"created_at":"2024-08-02T07:00:47.560Z","updated_at":"2025-05-15T03:07:43.972Z","avatar_url":"https://github.com/prismicio-community.png","language":"PHP","readme":"# Prismic.io PHP SDK\n\n[![Github Actions CI][github-actions-ci-src]][github-actions-ci-href]\n[![Total Downloads][packagist-downloads-src]][packagist-downloads-href]\n[![Latest Stable Version][packagist-version-src]][packagist-version-href]\n[![License][packagist-license-src]][packagist-license-href]\n\nThis is the official PHP SDK for Prismic.io, providing a straightforward way to connect to Prismic’s headless API. It is maintained by the community to help developers get started with Prismic in PHP.\n\n-   Offers an easy-to-use interface for basic interactions with Prismic content\n-   Covers core features of the Prismic API\n\n### Overview\n\n1. [Getting started](#getting-started)\n    1. [Installation](#installation)\n    2. [Recommended PHP Extensions](#recommended-php-extensions)\n    3. [Basic Usage \u0026 API calls](#basic-usage--api-calls)\n    4. [DOM Helper](#dom-helper)\n2. [More information](#more-information)\n3. [Contributing](#contributing)\n4. [License](#license)\n\n## Getting started\n\n### Installation\n\nInstallation using [Composer](https://getcomposer.org/doc/00-intro.md):\n\n```bash\n$ composer require prismic/php-sdk\n```\n\n### Recommended PHP Extensions\n\nWe recommend installing and enabeling the [APCu](https://www.php.net/manual/en/ref.apcu.php) extension to have the built-in default cache support. Otherwise, you can implement your own cache strategy by extending the `Prismic\\Cache\\CacheInterface` interface.\n\n### Basic Usage \u0026 API calls\n\nIf you are not using automatic autoloading, include the Composer autoload file:\n\n```php\n\u003c?php\ninclude_once __DIR__.'/../vendor/autoload.php';\n\nuse Prismic\\Api;\n```\n\nThen you can start making your first API calls:\n\n```php\n$api = Api::get('https://your-repo-name.prismic.io/api/v2');\n$document = $api-\u003egetByUID('get-started-type', 'get-started');\n```\n\n### DOM Helper\n\nThe PHP SDK provides a set of DOM helpers to help you render your Prismic content.\n\nIn these examples we have a document variable corresponding to the fetched Prismic document. We also have a $linkResolver variable containing the functional link resolver, [read our docs to learn more about Link Resolving](https://prismic.io/docs/php/beyond-the-api/link-resolving).\n\n#### Link\n\n```php\n\u003c?php\nuse Prismic\\Dom\\Link;\n\necho Link::asUrl($document-\u003edata-\u003elink, $linkResolver);\n```\n\n#### Rich Text\n\n```php\n\u003c?php\nuse Prismic\\Dom\\RichText;\n\necho RichText::asText($document-\u003edata-\u003etitle);\necho RichText::asHtml($document-\u003edata-\u003edescription, $linkResolver);\n```\n\n#### Date\n\n```php\n\u003c?php\nuse Prismic\\Dom\\Date;\n\n$date = Date::asDate($document-\u003edata-\u003edate);\necho $date-\u003eformat('Y-m-d H:i:s');\n```\n\n## More information\n\n-   [Developer Documentaiton](./docs)\n-   [Generated PHPDoc](https://prismicio-community.github.io/php-kit/)\n-   [Changelog](https://github.com/prismicio-community/php-kit/releases)\n\n## Contributing\n\nWhether you're helping us fix bugs, improve the docs, or spread the word, we'd love to have you as part of the Prismic developer community!\n\n**Reporting a bug**: [Open an issue][repo-bug-report] explaining your application's setup and the bug you're encountering.\n\n**Suggesting an improvement**: [Open an issue][repo-feature-request] explaining your improvement or feature so we can discuss and learn more.\n\n**Submitting code changes**: For small fixes, feel free to [open a pull request][repo-pull-requests] with a description of your changes. For large changes, please first [open an issue][repo-feature-request] so we can discuss if and how the changes should be implemented.\n\nFor more clarity on this project, check out the detailed [CONTRIBUTING.md](./CONTRIBUTING.md) for our guidelines.\n\n## License\n\nThis software is licensed under the [Apache 2 License](https://opensource.org/license/apache-2-0), quoted below:\n\n```plaintext\nCopyright 2013-2024 Prismic \u003ccontact@prismic.io\u003e (https://prismic.io)\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n\u003c!-- Links --\u003e\n\n[repo-bug-report]: https://github.com/prismicio-community/php-kit/issues/new?assignees=\u0026labels=bug\u0026template=bug_report.md\u0026title=\n[repo-feature-request]: https://github.com/prismicio-community/php-kit/issues/new?assignees=\u0026labels=enhancement\u0026template=feature_request.md\u0026title=\n[repo-pull-requests]: https://github.com/prismicio-community/php-kit/pulls\n\n\u003c!-- Badges --\u003e\n\n[github-actions-ci-src]: https://github.com/prismicio-community/php-kit/workflows/ci/badge.svg\n[github-actions-ci-href]: https://github.com/prismicio-community/php-kit/actions?query=workflow%3Aci\n[packagist-downloads-src]: https://img.shields.io/packagist/dm/prismic/php-sdk\n[packagist-downloads-href]: https://packagist.org/packages/prismicio-community/php-kit\n[packagist-version-src]: https://img.shields.io/packagist/v/prismic/php-sdk\n[packagist-version-href]: https://packagist.org/packages/prismicio-community/php-kit\n[packagist-license-src]: https://img.shields.io/packagist/l/prismic/php-sdk\n[packagist-license-href]: https://packagist.org/packages/prismicio-community/php-kit\n","funding_links":[],"categories":["Ecosystem"],"sub_categories":["Development Kits"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprismicio-community%2Fphp-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprismicio-community%2Fphp-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprismicio-community%2Fphp-kit/lists"}