A repository (often shortened to "repo") is a directory or storage space where your project’s source code, configuration files, documentation, and version history are stored. It helps you track changes, collaborate with others, and manage your code over time.
π Versioning: Tools like Git allow you to roll back changes, compare versions, and develop new features in separate branches.
π€ Collaboration: Developers can work together, submit pull requests, open issues, and review each other’s code.
π Remote repositories: Online platforms like GitHub, GitLab, or Bitbucket host repositories for teams to collaborate globally.
Example:
git clone https://github.com/username/my-project.git
A repository is a collection of software packages used by a package manager (like apt
, yum
, or pip
) to install or update programs.
Example:
sudo apt update
sudo apt install firefox
Outside of IT, a repository can be any kind of database or archive — for example, a digital library of research papers or datasets.
OpenID Connect (OIDC) is an authentication protocol built on top of OAuth 2.0. It allows clients (like web or mobile apps) to verify the identity of a user who logs in via an external identity provider (IdP) — such as Google, Microsoft, Apple, etc.
OAuth 2.0 → handles authorization (access to resources)
OpenID Connect → handles authentication (who is the user?)
User clicks "Login with Google"
Your app redirects the user to Google’s login page
After successful login, Google redirects back with an ID token
Your app validates this JWT token
You now know who the user is — verified by Google
The ID token is a JSON Web Token (JWT) containing user identity data, like:
{
"iss": "https://accounts.google.com",
"sub": "1234567890",
"name": "John Doe",
"email": "john@example.com",
"iat": 1650000000,
"exp": 1650003600
}
iss
= issuer (e.g. Google)
sub
= user ID
email
, name
= user info
iat
, exp
= issued at / expiration
“Login with Google/Microsoft/Apple”
Single Sign-On (SSO) in organizations
Centralized user identity (Keycloak, Auth0, Azure AD)
OAuth APIs that require identity verification
Component | Description |
---|---|
Relying Party | Your app (requests login) |
Identity Provider | External login provider (e.g. Google) |
ID Token | JWT containing the user’s identity |
UserInfo Endpoint | (Optional) endpoint for additional user data |
PEST is a modern testing framework for PHP that focuses on clean syntax, readability, and developer experience. It builds on PHPUnit but provides a much more expressive and minimalistic interface.
π PEST = "PHP Testing for Humans"
It’s designed for developers who want to write fast, readable, and elegant tests — with less boilerplate.
PEST is built on top of PHPUnit, but it:
Provides a cleaner, simpler syntax
Removes unnecessary structure
Encourages a functional, behavior-driven style
Still supports traditional PHPUnit classes if needed
PHPUnit:
class UserTest extends TestCase
{
public function test_user_has_name()
{
$user = new User('John');
$this->assertEquals('John', $user->name);
}
}
PEST:
it('has a name', function () {
$user = new User('John');
expect($user->name)->toBe('John');
});
π Much shorter and easier to read — especially when writing many tests.
β Elegant, expressive syntax (inspired by Jest/Mocha)
π§ͺ Supports unit, feature, API, and browser-based testing
π§± Data-driven testing via with([...])
𧬠Test hooks like beforeEach()
/ afterEach()
π¨ Fully extensible with plugins and custom expectations
π Fully compatible with PHPUnit — you can run both side by side
In a Laravel or Composer project:
composer require pestphp/pest --dev
php artisan pest:install # for Laravel projects
Then run tests:
./vendor/bin/pest
PEST is ideal if you:
Want to write tests that are fun and easy to maintain
Prefer clean, modern syntax
Already use PHPUnit but want a better experience
π‘ Many Laravel developers are adopting PEST because it integrates seamlessly with Laravel and truly makes testing feel "human" — just like its slogan says.
OPcache is a built-in bytecode caching extension for PHP that significantly improves performance by precompiling PHP code and storing it in memory (RAM).
Normally, every PHP request goes through:
Reading the PHP source file
Parsing and compiling it into bytecode
Executing the bytecode
With OPcache, this process happens only once. After the first request, PHP uses the precompiled bytecode from memory, skipping the parsing and compiling steps.
Benefit | Description |
---|---|
β‘ Faster performance | Eliminates redundant parsing and compiling |
π§ Reduced CPU usage | Lower system load, especially under high traffic |
πΎ In-memory execution | No need to read PHP files from disk |
π‘οΈ More stable and secure | Reduces risks from dynamically loaded or poorly written code |
php -i | grep opcache.enable
Or in code:
phpinfo();
π¦ Typical Configuration (php.ini
)
opcache.enable=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.validate_timestamps=1
opcache.revalidate_freq=2
π‘ In production, it’s common to set
opcache.validate_timestamps=0
— meaning PHP won’t check for file changes on every request. This gives even more performance, but you’ll need to manually reset the cache after code updates.
OPcache is especially helpful for:
Via PHP:
opcache_reset();
Or from the command line:
php -r "opcache_reset();"
OPcache is a simple but powerful performance booster for any PHP application. It should be enabled in every production environment — it’s free, built-in, and drastically reduces load times and server strain.
Laravel Octane is an official package for the Laravel framework that dramatically boosts application performance by running Laravel on high-performance application servers like Swoole or RoadRunner.
Instead of reloading the Laravel framework on every HTTP request (as with traditional PHP-FPM setups), Octane keeps the application in memory, avoiding repeated bootstrapping. This makes your Laravel app much faster.
Laravel Octane uses persistent worker servers (e.g., Swoole or RoadRunner), which:
Bootstrap the Laravel application once,
Then handle incoming requests repeatedly without restarting the framework.
Benefit | Description |
---|---|
β‘ Faster performance | Up to 10x faster than traditional PHP-FPM setups |
π Persistent workers | No full reload on every request |
π WebSockets & real-time support | Built-in support via Swoole/RoadRunner |
π§΅ Concurrency | Parallel task handling possible |
π§ Built-in tools | Task workers, route reload watching, background tasks, etc. |
RoadRunner is a high-performance PHP application server developed by Spiral Scout. It serves as a replacement for traditional PHP-FPM (FastCGI Process Manager) and offers a major performance boost by keeping your PHP application running persistently — especially useful with frameworks like Laravel or Symfony.
PHP scripts are not reloaded on every request. Instead, they run continuously in persistent worker processes (similar to Node.js or Swoole).
This eliminates the need to re-bootstrap the framework on every request — resulting in significantly faster response times than with PHP-FPM.
RoadRunner is written in the programming language Go, which provides high concurrency, easy deployment, and great stability.
Native HTTP server (with HTTPS, Gzip, CORS, etc.)
PSR-7 and PSR-15 middleware support
Supports:
Hot reload support with a watch plugin
RoadRunner starts PHP worker processes.
These workers load your full framework bootstrap once.
Incoming HTTP or gRPC requests are forwarded to the PHP workers.
The response is returned through the Go layer — fast and concurrent.
Laravel + RoadRunner (instead of Laravel + PHP-FPM)
High-traffic applications and APIs
Microservices
Real-time apps (e.g., using WebSockets)
Low-latency, serverless-like services
Feature | PHP-FPM | RoadRunner |
---|---|---|
Bootstraps per request | Yes | No (persistent workers) |
Speed | Good | Excellent |
WebSocket support | No | Yes |
gRPC support | No | Yes |
Language | C | Go |
The .htaccess
file is a configuration file for Apache web servers that allows you to control the behavior of your website — without needing access to the main server configuration. It’s usually placed in the root directory of your website (e.g., /public_html
or /www
).
.htaccess
only works on Apache servers (not nginx).
Changes take effect immediately — no need to restart the server.
Many shared hosting providers allow .htaccess
, but some commands might be restricted.
Syntax errors can break your site — so be careful when editing.
GitHub Actions is a feature of GitHub that lets you create automated workflows for your software projects—right inside your GitHub repository.
You can build CI/CD pipelines (Continuous Integration / Continuous Deployment), such as:
β Automatically test code (e.g. with PHPUnit, Jest, Pytest)
π οΈ Build your app on every push or pull request
π Automatically deploy (e.g. to a server, cloud platform, or DockerHub)
π¦ Create releases (e.g. zip packages or version tags)
π Run scheduled tasks (cronjobs)
GitHub Actions uses workflows, defined in a YAML file inside your repository:
Typically stored as .github/workflows/ci.yml
You define events (like push
, pull_request
) and jobs (like build
, test
)
Each job consists of steps, which are shell commands or prebuilt actions
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20'
- run: npm install
- run: npm test
An Action is a single reusable step in a workflow. You can use:
Prebuilt actions (e.g. actions/checkout
, setup-node
, upload-artifact
)
Custom actions (e.g. shell scripts or Docker-based logic)
You can explore reusable actions in the GitHub Marketplace.
Saves time by automating repetitive tasks
Improves code quality through automated testing
Enables consistent, repeatable deployments
Integrated directly in GitHub—no need for external CI tools like Jenkins or Travis CI
Docker Compose is a tool that lets you define and run multi-container Docker applications using a single configuration file. Instead of starting each container manually via the Docker CLI, you can describe all your services (like a web app, database, cache, etc.) in a docker-compose.yml
file and run everything with a single command.
Docker Compose = Project config + Multiple containers + One command to run it all
docker-compose.yml
version: '3.9'
services:
web:
build: .
ports:
- "5000:5000"
volumes:
- .:/code
redis:
image: "redis:alpine"
This file:
Builds and runs a local web app container
Starts a Redis container from the official image
Automatically networks the two containers
docker-compose up # Start all services in the foreground
docker-compose up -d # Start in detached (background) mode
docker-compose down # Stop and remove containers, networks, etc.
β
Easy setup for multi-service applications
β
Version-controlled config (great for Git)
β
Reproducible development environments
β
Simple startup/shutdown of entire stacks
Local development with multiple services (e.g., web app + DB)
Integration testing with full stack
Simple deployment workflows (e.g., via CI/CD)
A Headless CMS (Content Management System) is a system where the backend (content management) is completely separated from the frontend (content presentation).
Backend and frontend are tightly coupled.
You create content in the system and it's rendered directly using built-in themes and templates with HTML.
Pros: All-in-one solution, quick to get started.
Cons: Limited flexibility, harder to deliver content across multiple platforms (e.g., website + mobile app).
Backend only.
Content is accessed via an API (usually REST or GraphQL).
The frontend (e.g., a React site, native app, or digital signage) fetches the content dynamically.
Pros: Very flexible, ideal for multi-channel content delivery.
Cons: Frontend must be built separately (requires more development effort).
Websites built with modern JavaScript frameworks (like React, Next.js, Vue)
Mobile apps that use the same content as the website
Omnichannel strategies: website, app, smart devices, etc.
Contentful
Strapi
Sanity
Directus
Prismic
Storyblok (a hybrid with visual editing capabilities)