Flag of Ukraine
SymfonyCasts stands united with the people of Ukraine
This tutorial has a new version, check it out!

Symfony RESTful API: Basics++ (Course 3)

50:47

What you'll be learning

This tutorial uses an older version of Symfony. The concepts of REST and serialization are still valid, but I recommend using API Platform in new Symfony apps.
// composer.json
{
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.6.*", // v2.6.11
        "doctrine/orm": "~2.2,>=2.2.3,<2.5", // v2.4.7
        "doctrine/dbal": "<2.5", // v2.4.4
        "doctrine/doctrine-bundle": "~1.2", // v1.4.0
        "twig/extensions": "~1.0", // v1.2.0
        "symfony/assetic-bundle": "~2.3", // v2.6.1
        "symfony/swiftmailer-bundle": "~2.3", // v2.3.8
        "symfony/monolog-bundle": "~2.4", // v2.7.1
        "sensio/distribution-bundle": "~3.0,>=3.0.12", // v3.0.21
        "sensio/framework-extra-bundle": "~3.0,>=3.0.2", // v3.0.7
        "incenteev/composer-parameter-handler": "~2.0", // v2.1.0
        "hautelook/alice-bundle": "0.2.*", // 0.2
        "jms/serializer-bundle": "0.13.*", // 0.13.0
        "white-october/pagerfanta-bundle": "^1.0" // v1.2.4
    },
    "require-dev": {
        "sensio/generator-bundle": "~2.3", // v2.5.3
        "behat/behat": "~3.0", // v3.0.15
        "behat/mink-extension": "~2.0.1", // v2.0.1
        "behat/mink-goutte-driver": "~1.1.0", // v1.1.0
        "behat/mink-selenium2-driver": "~1.2.0", // v1.2.0
        "phpunit/phpunit": "~4.6.0" // 4.6.4
    }
}

The basics, check! Errors, double check! Now let's get back to some core API concepts and take things up a level by covering a bunch of features that you need... but sometimes can't find related to REST!

  • REST Pagination
  • Including next/prev pagination links
  • Filtering collections
  • Advanced serialization customization (serializer subscriber)
  • Including links via custom annotations
  • Evaluating expressions
  • Making embedded resources configurable/conditional

Your Guides

Ryan Weaver Leanna Pelham

Buy Access

Join the Conversation?

11
Login or Register to join the conversation
Default user avatar
Default user avatar Marius Puiu | posted 5 years ago

Hey! I am waiting for these episodes like Christmas! :)

Reply

:) Well then good news - this one *is* recorded... so look for it in the next few weeks. We'll publish the new Behat tutorial then this next :)

Reply
Default user avatar
Default user avatar Rasel Khan | posted 5 years ago

I need urgent this tuts, let me know when i'll go this . thanks

Reply
Default user avatar
Default user avatar Kyle Crawford | posted 5 years ago

Great tutorials guys. Can I get an ETA on this series continuation? Other comments suggested October for this series continuation, and here we are in November now.

Reply

Hey Kyle! Yep, we're late! The oncoming Symfony 3 release is keeping us busy, *but* this tutorial is written and several parts have been recorded. I can't promise, but I'm going to *try* to start releasing this during Nov, alongside all the Symfony 3 craziness :)

Thanks for your patience!

Reply
Default user avatar
Default user avatar César Rodríguez | weaverryan | posted 5 years ago

any update ? :) December perhaps?

Reply

Yes, it won't be Nov due to Symfony 3 and Drupal 8 - sorry guys! Our production schedule has this for January - but I'm going to try to push it into December!

Reply
Default user avatar

any update on this series?

Reply

Wow, I'm blundering the schedule on this one! I'm going to see if I can get this included yet this month - I'll add updates when I have them.

Thanks for everyone's patience! We have some *really* cool stuff coming to the site soon that have been keeping us busy!

Reply
Default user avatar
Default user avatar DevDonkey | posted 5 years ago

want want want want!

Reply
Default user avatar
Default user avatar Daniel Platt | posted 5 years ago

Could be worth touching on versioning as well here

Reply
Cat in space

"Houston: no signs of life"
Start the conversation!

userVoice