Repository navigation
Modernize DevTools for Phalcon 6 - #1551
romeomanzur wants to merge 15 commits into
Conversation
Assisted-by: ChatGPT
Assisted-by: ChatGPT
Assisted-by: ChatGPT
Assisted-by: ChatGPT
Assisted-by: ChatGPT
Assisted-by: ChatGPT
Assisted-by: ChatGPT
Assisted-by: ChatGPT
Assisted-by: ChatGPT
Assisted-by: ChatGPT
Assisted-by: ChatGPT
Assisted-by: ChatGPT
Assisted-by: ChatGPT
Assisted-by: ChatGPT
Assisted-by: ChatGPT
|
@romeomanzur I have not forgotten about this. I will check it sometime this week coming or earlier |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 5.0.x #1551 +/- ##
==========================================
+ Coverage 4.45% 6.57% +2.11%
- Complexity 0 788 +788
==========================================
Files 82 48 -34
Lines 3995 2692 -1303
==========================================
- Hits 178 177 -1
+ Misses 3817 2515 -1302 🚀 New features to boost your workflow:
|
|
@romeomanzur Thank you again for this work. There are some questions though and some issues. A bit of background here. We have tried to make devtools work for v5 a long time ago and it was really a mess. The decision was short of a full rewrite, the project would end up half done at best, so it was never high in our priority. At least today with AI we can revisit this and see if we can fix this. In the meantime, we have started a brand new project called crest (phalcon/crest) which will be the next devtools and will support the functionality that developers seek from devtools including additional features such as dockerized environment, web server etc. That project is still under development but we are getting there slowly. The ADR handling and generation are done and going through the MVC models etc. now. Last will be the CLI and Micro. This is just for information, that the community does not think we have completely abandoned these developer tools that are essential. The review for the PR is below. I had an AI agent run though it and verified the findings. |
|
The main consideration is whether this PR is going to add value or not, and also the aftermath i.e. what do we do after we merge it. As mentioned above, we are creating a new tool that will offer developers the functionality they need. Is it worth keeping two tools for the same task, even in this AI era. Honestly, I don't want us to do that and the direction the team chose is with crest. However nothing stops the community itself for pursuing this project and enhancing it to work with v5/6 etc. Having written that, there review of the code identified some issues that I am posting for your attention. The main issue that I found also is that the PR is very bit and it should not be. I would split this work into smaller manageable chunks of code that are as independent as possible, adding tests along the way where they do not exist (again if possible) and then in the end you merge into one branch which will be the branch that will be merged into master. That way we have a much lower chance of missing something. Food for thought. The issues identified are as follows: Issues identified:
NOTE: This is not that big of an issue because the supporting packages have not been tagged yet. I am posting it here for awareness
|
In raising this pull request, I confirm the following:
Summary
This pull request modernizes Phalcon DevTools for the Phalcon 6 ecosystem while using the current
5.0.xbranch 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-phalconextension.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
>= 8.2 < 9.0phalcon/phalconext-phalconextension is no longer requiredphalcon/migrationsv4 integrationMain changes
phalcon/phalcon.phalcon/migrationsv4.Phalcon\Migrations\Utils\Config.no-auto-increment, description, reference-schema handling, and foreign-key checks with migrations v4.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-devand 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\Configinstance directly intophalcon/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:
--versionand--help.The generated PHAR successfully reports: