0011-laravel-api-surface-evolution

Plan Laravel API evolution with versioned DTOs, deprecations, and compatibility tests.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/MrJmpl3/codex_____data_____configuration --skill 0011-laravel-api-surface-evolution
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 0011-laravel-api-surface-evolution
Source: https://github.com/MrJmpl3/codex_____data_____configuration/tree/main/skills/0011-laravel-api-surface-evolution
Command: npx skills add https://github.com/MrJmpl3/codex_____data_____configuration --skill 0011-laravel-api-surface-evolution

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

API providers need to change request and response shapes over time without breaking existing clients or causing uncontrolled regressions.

Core Features & Use Cases

  • Versioning strategy: Use explicit URI or header-based versioning and bias changes toward additive updates.
  • Versioned DTOs & transformers: Introduce versioned data transfer objects and map them from domain models/services so controllers stay thin.
  • Deprecations and sunset planning: Deprecate fields in responses and documentation with clear timelines and visibility into ongoing usage.
  • Compatibility testing: Maintain contract tests per API version and run backward-compatibility tests for common flows (e.g., stable endpoints used by existing client apps).

Quick Start

Ask an AI to propose a Laravel API evolution plan for a breaking change by introducing versioned DTOs/transformers, marking deprecated fields with a sunset timeline, and defining contract/backward-compatibility tests for both old and new response shapes.

Frequently Asked Questions about 0011-laravel-api-surface-evolution

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I evolve a Laravel API without breaking existing clients?

To evolve a Laravel API without breaking existing clients, introduce explicit versioned contracts and additive-by-default updates. Use versioned DTOs and transformers to map domain models so controllers stay thin while maintaining backward compatibility.

What is the best way to deprecate fields in a Laravel API response?

The best way to deprecate fields in a Laravel API response is to mark them deprecated in both the response and documentation with clear sunset timelines. This provides visibility into ongoing usage and allows clients time to adapt to the changes.

How do I use versioned DTOs and transformers for Laravel API versioning?

Versioned DTOs and transformers map domain models to version-specific data transfer objects, keeping controllers thin. This approach isolates response shape changes per API version, allowing safe evolution and controlled change management across different client expectations.

Do I need contract testing for Laravel API backward compatibility?

Yes, you need contract testing for Laravel API backward compatibility. Maintaining per-version contract tests and running backward-compatibility tests for common flows ensures stable endpoints used by existing client apps remain functional during API evolution.

When should I use additive updates in Laravel API versioning?

You should use additive updates in Laravel API versioning by default when evolving request and response shapes. This strategy biases changes toward adding new fields rather than modifying or removing existing ones, reducing the risk of uncontrolled regressions.

Can I use header-based versioning for Laravel API deprecation and sunset?

Yes, you can use header-based versioning for Laravel API deprecation and sunset planning. The approach supports explicit versioning strategies, allowing you to document deprecation timelines and manage controlled changes across different API versions safely.