Skip to content

Drop deprecated folder#2623

Merged
Crabcyborg merged 2 commits into
masterfrom
drop_deprecated_folder_and_deprecated_FrmEDD_SL_Plugin_Updater_class
Dec 3, 2025
Merged

Drop deprecated folder#2623
Crabcyborg merged 2 commits into
masterfrom
drop_deprecated_folder_and_deprecated_FrmEDD_SL_Plugin_Updater_class

Conversation

@Crabcyborg
Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 3, 2025

Walkthrough

This PR removes a deprecated WordPress plugin updater wrapper class and refactors the plugin's autoload logic from deprecation-based path routing to a pattern-driven class-naming strategy, alongside updating PHPStan configuration to no longer exclude deprecated files from analysis.

Changes

Cohort / File(s) Summary
Deprecated code removal
deprecated/FrmEDD_SL_Plugin_Updater.php
Deleted deprecated plugin updater wrapper class that previously handled custom update API integration for WordPress. All methods were already marked deprecated or returned no-ops.
Autoload path resolution refactor
formidable.php
Replaced deprecation-based conditional routing with pattern-driven class-naming logic. Removes folder redirection and enforces hierarchical structure under /classes/, routing by class suffix (Helper → helpers/, Controller → controllers/, Factory → factories/, StyleComponent → views/styles/components/) with fallback to models/ and conditional fields/ paths.
PHPStan configuration
phpstan.neon
Removed exclusion pattern for deprecated files from PHPStan analysis, enabling static analysis coverage for files under */deprecated/*.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–25 minutes

  • formidable.php: The autoload logic refactor introduces pattern-based routing and requires verification that class-to-path mapping works correctly across all existing class types (Helpers, Controllers, Factories, StyleComponents, Fields, Models).
  • Class loading interactions: Ensure the fallback logic (models/ then conditional fields/) doesn't unintentionally load wrong files or create ambiguity.
  • PHPStan coverage: Verify that newly-included deprecated files don't introduce unwanted PHPStan errors or mask genuine issues.

Possibly related PRs

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author. The check is very lenient and passes as long as the description is not completely off-topic, but an empty description cannot be meaningfully evaluated. Add a pull request description explaining the rationale, impact, and any migration notes for removing the deprecated folder and updating the autoload logic.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Drop deprecated folder' clearly summarizes the main change: removing the deprecated folder and its associated logic from the codebase.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch drop_deprecated_folder_and_deprecated_FrmEDD_SL_Plugin_Updater_class

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
formidable.php (1)

89-96: Pattern-based routing is clear and maintainable.

The class name suffix matching logic correctly routes classes to their appropriate subdirectories.

If the project targets PHP 8.0+, consider refactoring to use str_ends_with() for improved readability:

-	if ( preg_match( '/^.+Helper$/', $class_name ) ) {
+	if ( str_ends_with( $class_name, 'Helper' ) ) {
 		$filepath .= 'helpers/';
-	} elseif ( preg_match( '/^.+Controller$/', $class_name ) ) {
+	} elseif ( str_ends_with( $class_name, 'Controller' ) ) {
 		$filepath .= 'controllers/';
-	} elseif ( preg_match( '/^.+Factory$/', $class_name ) ) {
+	} elseif ( str_ends_with( $class_name, 'Factory' ) ) {
 		$filepath .= 'factories/';
-	} elseif ( preg_match( '/^.+StyleComponent$/', $class_name ) ) {
+	} elseif ( str_ends_with( $class_name, 'StyleComponent' ) ) {
 		$filepath .= 'views/styles/components/';
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e35744d and 229f311.

⛔ Files ignored due to path filters (1)
  • phpcs.xml is excluded by !**/*.xml
📒 Files selected for processing (3)
  • deprecated/FrmEDD_SL_Plugin_Updater.php (0 hunks)
  • formidable.php (1 hunks)
  • phpstan.neon (0 hunks)
💤 Files with no reviewable changes (2)
  • phpstan.neon
  • deprecated/FrmEDD_SL_Plugin_Updater.php
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: PHP 8 tests in WP trunk
  • GitHub Check: PHP 7.4 tests in WP trunk
  • GitHub Check: Cypress
  • GitHub Check: Cypress
  • GitHub Check: PHP 8 tests in WP trunk
  • GitHub Check: PHP 7.4 tests in WP trunk
🔇 Additional comments (2)
formidable.php (2)

87-88: Good simplification of autoload logic.

Removing the deprecated folder routing and unconditionally appending /classes/ makes the autoloader more straightforward and maintainable.


98-101: Field classes are properly located and deprecated folder has been successfully removed.

All Field type classes are correctly positioned in classes/models/fields/ and the autoloader fallback logic at lines 98-101 works as intended. The deprecated folder has been completely removed with no remaining references. No further action needed.

@Crabcyborg Crabcyborg merged commit 7ad66f3 into master Dec 3, 2025
16 checks passed
@Crabcyborg Crabcyborg deleted the drop_deprecated_folder_and_deprecated_FrmEDD_SL_Plugin_Updater_class branch December 3, 2025 16:49
stephywells pushed a commit that referenced this pull request Apr 4, 2026
…eprecated_FrmEDD_SL_Plugin_Updater_class

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant