Section 11: Libraries, Filters and Error Handling
- Use built-in libraries and write your own
- Filters that run before and after a controller
- Error pages, exceptions and logs per environment
- Lab: a filter that guards the admin pages
Section 12: Lab: Membership with Shield
- Install Shield with Composer and php spark shield:setup
- Sign-up, login and logout
- Groups and permissions to separate access rights
- Lab: protect the back office with Shield
Section 13: Web Application Security
- Prevent XSS with esc() and a Content Security Policy
- Prevent SQL injection and CSRF
- Store passwords with password_hash and hide errors in production
- A security checklist before going live
Section 14: Caching, Languages and Performance
- Page caching and data caching
- Multiple languages with language files and lang()
- The debug toolbar, benchmarking and profiling
- Lab: a bilingual site with a cached home page
Section 15: Workshop: A Small Online Shop, Deployed
- Combine products, membership, uploads and email into one site
- Return JSON for simple JavaScript calls
- Deploy with public as the document root and the production environment
- Use an AI assistant to review code with care, and next steps