Step 1: Plugin Analysis & Verification Strategy
A thorough analysis is the foundation for a successful migration. This step will help you understand what must be migrated and define how you will verify that your plugin works correctly in Sylius 2.0.
1.1 Plugin Analysis
Before migrating, review your plugin in detail.
What to analyze
Documentation & Purpose
Read
README.md
to understand the plugin’s main functionality.Identify the primary features and use cases.
Dependencies & Compatibility
Review
composer.json
for current Sylius/Symfony/PHP versions.List dependencies that require updates.
Existing Tests
Check current test coverage (PHPSpec, PHPUnit, Behat).
Use these tests to understand expected behavior.
Code Architecture
Review structure: controllers, services, entities, templates.
Identify configuration files and their locations.
Understand resource definitions and models.
Plugin Entry Points
Controllers – HTTP endpoints that handle requests.
Commands – CLI commands for administrative tasks.
Event listeners/subscribers – integration with Sylius events.
Templates – user interface components.
1.2 Define a Verification Strategy
Based on the analysis, create a repeatable verification plan. The goal is to validate critical functionality instead of covering every detail.
Key verification techniques
End-to-End (E2E) tests
Write PHPUnit scenarios that verify complete user workflows.
Run the same tests against Sylius 1.x and 2.0.
Response comparison
Ensure HTML pages return the expected structure.
Verify API endpoints return correct JSON.
Compare output between old and new versions.
Database state verification
Confirm data is persisted correctly.
Check relationships between entities.
Ensure migrations work properly.
Event system verification
Verify events are dispatched.
Confirm email notifications are sent.
Ensure integrations still work.
1.3 Identify the Critical Path
Focus on the plugin’s essential functionality — the minimal set of features that must work correctly.
Examples by plugin type
Payment plugins
Critical: payment flow completion, status updates, refunds.
Non-critical: admin UI styling, advanced reporting.
Shipping plugins
Critical: rate calculation, label generation, tracking updates.
Non-critical: bulk operations, export features.
Content / CMS plugins
Critical: content display, basic CRUD operations.
Non-critical: advanced layouts, preview features.
Marketing plugins
Critical: feature activation, data collection.
Non-critical: analytics dashboards, export formats.
Important Note
Your verification strategy should be concise and repeatable. Don’t aim for 100% coverage at this stage — ensure the core purpose of the plugin is fulfilled. Secondary features and UI improvements can be addressed later.
Last updated
Was this helpful?