Skip to content

Modernize DevTools for Phalcon 6 - #1551

Open
romeomanzur wants to merge 15 commits into
phalcon:5.0.xfrom
romeomanzur:feature/modernize-ci-tooling
Open

romeomanzur wants to merge 15 commits into
phalcon:5.0.xfrom
romeomanzur:feature/modernize-ci-tooling

Conversation

@romeomanzur

@romeomanzur romeomanzur commented Sep 25, 2026 •

Copy link
Copy Markdown
  • Type: new feature | code quality | documentation
  • Link to issue: N/A

In raising this pull request, I confirm the following:

  • I have read and understood the Contributing Guidelines
  • I have checked that another pull request for this purpose does not exist
  • I wrote tests for this PR

Summary

This pull request modernizes Phalcon DevTools for the Phalcon 6 ecosystem while using the current 5.0.x branch as the integration base.

The changes update the runtime, generated code, migrations integration, testing infrastructure, static analysis, CI, dependencies, documentation, and release tooling so DevTools can operate with the Composer-based Phalcon 6 packages.

Motivation

Phalcon 6 is distributed through Composer and no longer relies on the legacy ext-phalcon extension.

The existing DevTools codebase still contained assumptions and dependencies inherited from the Phalcon 4/5 extension-based architecture, including outdated generated code, migration handling, test infrastructure, CI configuration, and runtime dependencies.

This PR updates those areas while preserving the existing DevTools command structure and development workflow where possible.

Requirements and compatibility

  • PHP >= 8.2 < 9.0
  • Phalcon 6 via phalcon/phalcon
  • The legacy ext-phalcon extension is no longer required
  • phalcon/migrations v4 integration

Main changes

  • Added Phalcon 6 runtime support using phalcon/phalcon.
  • Updated the minimum PHP requirement to PHP 8.2.
  • Modernized model generation for Phalcon 6.
  • Fixed model metadata namespace handling.
  • Improved relation alias generation to avoid duplicate aliases.
  • Updated project and scaffold generation for Phalcon 6.
  • Updated WebTools compatibility.
  • Integrated phalcon/migrations v4.
  • Updated migration configuration handling to use Phalcon\Migrations\Utils\Config.
  • Aligned migration options such as no-auto-increment, description, reference-schema handling, and foreign-key checks with migrations v4.
  • Added migration database fixtures and console coverage.
  • Modernized the test suite to Codeception 5 and PHPUnit 11.
  • Updated PHPStan, Psalm, and PHP_CodeSniffer tooling.
  • Added PHP 8.2, 8.3, and 8.4 CI coverage.
  • Adjusted remote acceptance coverage handling for CI environments where coverage collection is not applicable.
  • Cleaned runtime dependencies so development-only tooling is not installed in consumer projects.
  • Updated README and contribution documentation for Phalcon 6.
  • Modernized the PHAR release workflow to build with PHP 8.2 and the Composer-managed Box dependency.

Runtime dependencies

The runtime dependency set was reviewed separately from development tooling.

Development-only packages such as Codeception, PHPUnit, PHPStan, Psalm, PHP_CodeSniffer, Box, and PHPDoc tooling remain in require-dev and are not installed in consumer projects.

A separate consumer installation smoke test was performed to verify that DevTools installs and runs without its development dependency set.

Migrations

The migration command previously passed the regular application Phalcon\Config\Config instance directly into phalcon/migrations.

Migrations v4 expects Phalcon\Migrations\Utils\Config, so DevTools now converts the application configuration before invoking the migrations API while preserving the original configuration for DevTools-specific options.

Migration generation, listing, and execution were tested against MySQL, including migration state tracking.

Validation

The updated branch has been validated with:

  • Codeception unit, functional, console, and acceptance suites.
  • MySQL acceptance tests.
  • PostgreSQL acceptance tests.
  • PHPStan 2.
  • Psalm 6.
  • PHP_CodeSniffer.
  • Composer validation.
  • Box configuration validation.
  • Consumer installation smoke testing without development dependencies.
  • PHAR compilation using Box 4.7.
  • PHAR runtime smoke tests with --version and --help.

The generated PHAR successfully reports:

Phalcon DevTools (6.0.0alpha1)
Phalcon Version: 6.0.0RC2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant