1
Mamba
XOOPS Plugin for PhpStorm 1.0 Alpha 4 Released

Resized Image


XOOPS Support Plugin for PhpStorm: Alpha 4 is here

XOOPS Support Plugin brings XOOPS CMS knowledge into PhpStorm and IntelliJ IDEA: it finds the mistakes that break XOOPS modules and fixes most of them with one Alt+Enter. It covers XOOPS 2.5, 2.7, and the upcoming XOOPS 2.8 and 4.0, for Core and module development.

Every quick-fix is tested against whole-file fixtures and applied twice to prove it is idempotent. Before release the full set was run on 224 real modules: 46,000 findings and 10,000 files rewritten, with no entry point blocked and no parse error.

52 inspections with quick-fixes

  1. Database: migrates queryF() and quoteString(), picks query() or exec() from the SQL, adds result-set guards that keep the function's failure contract, and flags ORDER BY or request-in-SQL injection.
  2. Security: Xmf\Request instead of raw superglobals, missing CSRF checks, unserialize() without allowed_classes, dynamic code, weak tokens, path containment and attribute escaping.
  3. Bootstrap and structure: direct-access guards that never block an entry point, double xoops_cp_header(), form loader, admin menu autoload and file headers.
  4. Templates and Smarty: template registration in both directions, <{ }> delimiters, $smarty.get escaping and the Smarty 5 API.
  5. Language files, installer SQL and deprecated core API (the 2.7.4 deprecation list).


Version-aware fixes

The plugin reads your tree's include/version.php and only offers rewrites your core supports. Older cores get compatible code instead of an API they don't have.

Productivity

  1. New → XOOPS Module… scaffolds a legacy or hybrid module (Helper, PSR-4 autoloader, Xmf admin) whose output passes every inspection.
  2. Completion, Ctrl+B and Find Usages for language constants (_MD_*, _MI_*, _AM_*…), including in Smarty templates.
  3. Live templates for common XOOPS code.
  4. A project tool window that gives an overview of your modules.

Getting started

Install the plugin and open a XOOPS project. Detection is automatic. You can set the Core Version and other options under Settings → Languages & Frameworks → XOOPS Support, and the inspections are listed under Settings → Editor → Inspections → XOOPS. The plugin installs and updates without an IDE restart.

Source, documentation and issues on GitHub
Support XOOPS => DONATE
Use 2.7.x | Docs | Modules | Bugs

2
goffy
Re: XOOPS Plugin for PhpStorm 1.0 Alpha 4 Released
  • Today 7:48

  • goffy

  • Just can't stay away

  • Posts: 559

  • Since: 2010/12/27


Thank you, I will test it again :)

3
Mamba
Re: XOOPS Plugin for PhpStorm 1.0 Alpha 4 Released

Let me know if the plugin is of any help to you, and what extra features would be useful.
Also, if you find any bugs.

I just found couple, so Alpha 5 is coming soon
Support XOOPS => DONATE
Use 2.7.x | Docs | Modules | Bugs

4
goffy
Re: XOOPS Plugin for PhpStorm 1.0 Alpha 4 Released
  • Today 18:16

  • goffy

  • Just can't stay away

  • Posts: 559

  • Since: 2010/12/27


hi
tested , works fine, found again some issues in my code.

But only one thing I do not understand:
"A CREATE TABLE in sql/mysql.sql that no update path mentions is never created for a module that is already installed. If a released version shipped without the table, sites updating from it fail with error 1146 on first use. Whether such a version exists cannot be told from the tree, and a table as old as the module needs no update path, so this is a weak note."

I do not understand what this means. Can someone explain for dummies?