{"id":13562957,"url":"https://github.com/codereviewvideos/symfony-3-rest-api-example","last_synced_at":"2025-04-10T19:04:28.046Z","repository":{"id":76580701,"uuid":"56909580","full_name":"codereviewvideos/symfony-3-rest-api-example","owner":"codereviewvideos","description":"Symfony 3 RESTful API Example","archived":false,"fork":false,"pushed_at":"2018-03-03T11:40:37.000Z","size":158,"stargazers_count":86,"open_issues_count":0,"forks_count":30,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-24T16:44:59.171Z","etag":null,"topics":["behat","codereviewvideos","flysystem","fosrestbundle","symfony","symfony-application","symfony-json","symfony-tutorial","symfony3","tdd","tdd-sample","tutorial","tutorial-code","tutorial-sourcecode"],"latest_commit_sha":null,"homepage":null,"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/codereviewvideos.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-04-23T08:45:23.000Z","updated_at":"2024-06-01T08:21:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"10d4584d-195e-41ef-b85e-db0a4ea75ddb","html_url":"https://github.com/codereviewvideos/symfony-3-rest-api-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codereviewvideos%2Fsymfony-3-rest-api-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codereviewvideos%2Fsymfony-3-rest-api-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codereviewvideos%2Fsymfony-3-rest-api-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codereviewvideos%2Fsymfony-3-rest-api-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codereviewvideos","download_url":"https://codeload.github.com/codereviewvideos/symfony-3-rest-api-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248279198,"owners_count":21077406,"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":["behat","codereviewvideos","flysystem","fosrestbundle","symfony","symfony-application","symfony-json","symfony-tutorial","symfony3","tdd","tdd-sample","tutorial","tutorial-code","tutorial-sourcecode"],"created_at":"2024-08-01T13:01:13.784Z","updated_at":"2025-04-10T19:04:28.010Z","avatar_url":"https://github.com/codereviewvideos.png","language":"PHP","readme":"Symfony 3 RESTful API Example\n=============================\n\nThis is the code for the [Symfony 3 REST Tutorial][1] at CodeReviewVideos.com.\n\n## About The Course\n\nIn this series we are going to take most of what has been taught on CodeReviewVideos so far, and use it to implement the foundation of a Symfony-based RESTful API.\n\nThis is not a good starting point if you have never used Symfony before. If you are a beginner, please try the [Symfony Tutorial for Beginners][2] before attempting to create a RESTful API.\n\nWhilst very new, we are going to proceed with Symfony 3 for this project. However, if you are still using Symfony 2, you should have no trouble following along. If anything, your life may be that little bit easier ;)\n\nBy the end of this series you will have created a RESTful API with FOSRESTBundle, guided by tests using Behat 3 and PHPSpec 2. The API itself will exposes Users - via FOSUserBundle - along with Accounts, and File Uploading using Flysystem.\n\nYou will have gained an understanding into how to add further 'modules' to your API, allowing you to create custom end points to meet the needs of your specific application.\n\nAs with many things Symfony, there are multiple ways to achieve the goals in this series. We could switch out FOSRESTBundle for DunglasAPIBundle. We could switch Flysystem for Guafrette. You are entirely free to do so.\n\nThis API is going to be based on FOSRESTBundle. The main reasoning for this is that I have already covered this bundle in another dedicated tutorial series, so if you get stuck, there are plenty of lessons explaining the general setup.\n\nYou may be wondering about the difference between a User and an Account. The idea here is that every User would have their own User Profile, but may belong to one of more Accounts. This is pretty helpful in the real world, and opens up options for your app as it grows. Feel free to rip this part out if you don't need it.\n\nLog in is going to be a little different here. When a User POST's in a valid username and password combo, they will receive a JSON Web Token / JWT (pronounced Jot), which they will then need to use as part of any future request. Don't worry, we will cover this in full, and you will see it's really not that difficult at all. The reasoning for doing this is that our front end will thank us for it.\n\nTo ensure stability, we will be using VirtualBox with an Ansible build script. This will - hopefully - mean getting from development to production is largely taken care of.\n\nLastly, we will cover how to interact with this API using ReactJS. You could switch this out for Angular, Ember, a mobile Application (e.g. Ionic, or a native app), or any other front end framework. That choice is entirely up to you. I am by far and away not the world's best JavaScript guy, so take this section as an example, rather than a defacto standard.\n\nHopefully you will find this exercise useful and practical. Please feel free to leave comments, ask questions, or get in touch if you would like to know more about a specific topic.\n\n[Click here to watch all the videos in this series][1]\n\n\n[1]: https://www.codereviewvideos.com/course/symfony-3-rest-tutorial\n[2]: https://www.codereviewvideos.com/course/beginner-friendly-hands-on-symfony-3-tutorial","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodereviewvideos%2Fsymfony-3-rest-api-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodereviewvideos%2Fsymfony-3-rest-api-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodereviewvideos%2Fsymfony-3-rest-api-example/lists"}