We shall do a deep dive of Drupal's database schema. For the purpose of simplicity, we shall deal exclusively with SQL queries and not step out of DB land unless its required.
Drupal 8 development
We saw how general authentication works with Drupal 8 in the previous post. We shall see how the actual authentication happens when user logs in.
Ever wondered what exists inside the vendor/ directory of your Drupal or PHP codebase? Let's dive down the rabbit hole and see.
A little bit of history
Let's digress into a little history lesson to see why things are they way they are in the PHP autoloading world.
We saw in part 1 how plugins help us in writing reusable functionality in Drupal 8. There are a lot of concepts which plugins share in common with services, like:
- limited scope. Do one thing and do it right.
- PHP classes which are swappable.
Which begs the question, how exactly are plugins different from services? If your interface expects implementations to yield the same behaviour, then go for services. Otherwise, you should write it as a plugin.