• Stars
    star
    175
  • Rank 218,059 (Top 5 %)
  • Language
    PHP
  • Created over 5 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This is the result of all the videos that were created in the series that i published on the playlist. LINK BELOW

Symfony Todo API


About the series

Playlist to all the videos This series goes over how to create a really BASIC Symfony API, yeah i didn't use API platform but that's okay, Below is a list of all the libraries that were used in the series.

Libraries

Mistakes were made

I admit that a lot of the time i either said something that was misleading or i used the incorrect thing, let me explain.

  • Sometimes i returned a status code of 200 instead of 201 when CREATING.
  • CLARIFICATION: PATCH vs PUT, i said that PATCH is used to update a part of the document, i might have said it's used to update just one field or property but that's not true, it's used to update multiple parts but not the entire document, otherwise why you would use PATCH instead of PUT, thign mistake happened because the example i was looking had just one property and i said it used to update just one.

Create a user manually (for testing)

This is a complete section by itself because it seems like couple of people have had their share of headaches because of this, to create a user manually and save it in the dabase here's what i personally do, IT WORKS

Encode the password using the symfony command

This is extremely important especially if you have no idea what the hell is happening, use the following command to generate a hashed version of your password and then jut copy the value that was printed to you and put in your database. Command: php bin/console security:encode-password You will be prompted to enter the plaintext password that you want to be hashed, after clicking the return key (enter key) the hashed key will be generated for you.

Fields that i care about in the database

There are three main fields that i care about, and they are the email, password, roles. Theses are the value that i enter for my testing user just to make sure that my authentication system works.

  • email: [email protected]
  • roles: ["ROLE_USER"]
  • password: $2y$13$XPRUnZV1V9NI7Tya/a7fh.8/86VIZTA3LIA.4mKeuadnFDy2HqFNu

NOTE ABOUT THE PASSWORD: This password is the hashed version of [000000], just six zeros, and i got this result because the algorithm in the security file is set to auto, if you have bcrypt it could be different if you have a2rgony or whatever the hell that one is called, you will get something different

Troubleshooting and stuff

Bad credentials error

This one error could happen because of multiple error due to the very bad error reporting of this library or whatever is responsible for that, the main thing to keep in mind is anything could lead to this type of problems

Examples

  • Database server not running will throw this error.
  • The password is not encoded in the correct way.
  • You didn't generate the public and private keys files correctly.
  • The passphrase used during public and private key generation does not match the one used in the configuration file.
  • TODO (Add more as more emails come in)

Contributing

This project is open for everyone, if you notice anything wrong with my code, or even this readme, any mistakes are welcome.

Questions

Maybe this should've been above with the Contribution section but doesn't matter, if you have any question i think it would be nice to create an issue (Please open an issue no matter how trivial you think the question is, no one will charge you money for it) that way people with similar questions can look them up.

More Repositories

1

vue-todo-frontend

Repository contains the code for the front-end part of the Todo application that was made using Vuejs and Symfony 4 for the back-end.
Vue
72
star
2

mercure-chat-tutorial

Final code for the tutorial posted on youtube on Making a Chat application using Symfony 5, Mercure & Vue.
PHP
35
star
3

easy-admin

Project that includes the final result of the youtube videos at the links in the README.
CSS
34
star
4

embed-collection-of-forms

Heavily commented project which includes a demo using collection of forms in symfony 3
PHP
12
star
5

doctrine_polymorphic_association_example

This is the example code for the video in the following link: https://youtu.be/hNAMEWYCkAM
PHP
12
star
6

chrome-extension-tutorial

Creating a basic chrome extension that communicates with a native c++ application
JavaScript
11
star
7

symfony-4-social-login

A very basic social login throguh facebook, github, and maybe google (not sure if that's included)?! Using HWIOAuthBundle.
PHP
11
star
8

vue-fullcalendar

How to Install and use Fullcalendar with Vue. (Video: https://www.youtube.com/watch?v=A-ESlbM-XzE)
Vue
10
star
9

cropperjs-symfony4

Basic system to crop file using (CropperJS) and send them (Upload) to the server-side (Symfony 4) using AJAX (Axios)
PHP
9
star
10

easy-admin-3

Getting started with easy admin 3, really basic example
PHP
8
star
11

symfony_ux

Code for the introduction video regarding Symfony UX.
PHP
7
star
12

Fabour

Hello github :)
JavaScript
7
star
13

mercure-chat-react

Mercure chat but using react instead of vue, learning opportunity for me
PHP
7
star
14

symfony-4-typeahead

Basic symfony 4 and typeahead implementation for a suggestion system (auto complete)
PHP
6
star
15

symfony-tinymce

Integrating the famous WYSIWYG Editor TinyMCE with Symfony 4 Framework. (Also a Youtube video available)
PHP
4
star
16

symfon-ajax

Symfony and ajax together, check the README for a video link .
PHP
4
star
17

medium-signin

Demo to use multiple guards in symfony, not even in a proper way lol (Medium sign in)
PHP
2
star
18

vuex-typescript

Vuex with typescript basic example.
Vue
2
star
19

omar-bb

Simple android project to handle timers for different (as hicham calls them) stations .
Java
1
star
20

monsieur-umayev

PHP
1
star
21

circular-reference

Reproducing the ServiceCircularReferenceException (bug?)
PHP
1
star