Today we're releasing our own very official PHP SDK for the Content Delivery API which we'll maintain, document, and keep up-to-date ourselves. The SDK should simplify bringing the content from Contentful into PHP projects: it abstracts networking, mapping fields and resolving links, helping you concentrate on the business logic of a project.
It's alive!
We do recognize that PHP is still an incredibly popular language, and that the community of PHP developers is huge, according to the GitHub numbers. Up until now developers willing to use Contentful with PHP had to work with the SDKs and integrations built by our community. Thanks to everyone for their contributions!
Our experience suggests that community-based SDKs are typically built with one unique use case in mind, and that's the reason why they aren't suitable for differing goals. We felt that a generic version that covers most use cases and can be built upon was missing – that's why we've created our own SDK.
Setup
The library is available on GitHub and packagist, and it's compatible with PHP 5.5.9+ and PHP7. The easiest way to install it is by using composer:
1 | composer require contentful/contentful:@beta |
Getting started
To see how to get started and use the SDK, take a look at the Getting started with Contentful and PHP tutorial – it goes through all the features in detail, showing how to fetch and entry and import an asset.
Why is it beta? 'cos it's beta than nothing
Just a slight warning: the Content Delivery PHP SDK is currently in beta, and its API still might change. Use with caution.
We'd love to hear your feedback! Please tweet at @contentful or open an issue on GitHub.