modxcms / revolution

MODX Revolution - Content Management Framework
https://modx.com/
GNU General Public License v2.0
1.36k stars 529 forks source link

Plug-in for PHPStorm #13413

Closed LitvK closed 7 years ago

LitvK commented 7 years ago

Is this real to create plug-in for PHPStorm in future to simplify developing on ModX? I think many developers will encourage this. This task can be implemented using crowd funding, for example.

Mark-H commented 7 years ago

I've not had to use a plugin to get auto complete in phpstorm, just load up modx as a library. What would be the benefit of a plugin?

LitvK commented 7 years ago

Hi, Mark. How do you edit resources in ModX? With ModX web interface under CodeMirror? It's quite slow. In addition it hasn't such abilities:

  1. To switch between edited resources with Ctrl+Tab.
  2. To get help about function's/snippet's parameters with Ctrl+Q.
  3. To go to needed snippet with Ctrl+Left mouse click.
  4. To refactor code inside a snippet.
  5. ... and much more.

I'd like to see ModX site like a PHPStorm's project in the left panel of it and have ability to traverse between snippets and chunks with all IDE functions.

OptimusCrime commented 7 years ago

@LitvK MODX Revolution itself does not offer a web interface editor. CodeMirror is a separate extra developed by modmore, but the editor CodeMirror is also separate from this again.

An editor like CodeMirror is a huge and very complex project. Creating a system similar to that is a huge undertaking. My personal belief is that the web interface works as good as it can without developing a complete system from scratch. The things you request is very complex and would require a lot logic.

There is also the option to develop this in an editor like PHPStorm. PHPStorm can do all the things you want (and more), and I prefer using that to large scale development over CodeMirror. There is, as far as I know, no web interface editor as sophisticated as you want. Is there a reason you can not use PHPStorm for this?

alroniks commented 7 years ago

Hi @LitvK Actually you already can use PHPStorm for developing websites on MODX. It a quite tricky, but works fine for me. All code of my websites I deliver by modx transport packages and developing extras very easy in phpstorm. I am going to share my knowledge about it on meetup in Almaty (Kazakhstan) 29th of April and also prepare a collection of video lessons. So stay tuned.

Mark-H commented 7 years ago

I definitely misunderstood the issue in my first comment. I thought this was a request for a plugin in phpstorm, which would help navigate the core code, as some other CMS's and platforms have. Not a way to have "phpstorm in modx", so to say.

To edit things in your site in a proper IDE like PhpStorm, you will need to take information out of the database and into files. That's possible with static elements, tools like Gitify or MODX extras like ElementHelper.

Making MODX itself have something like it out of the box is definitely a way too big request to fit in a single issue, and would likely need a MAB working group to determine requirements and priorities, how it should work, etc. Basically to lead a project like this. It would touch on nearly every aspect of MODX and include decisions on what MODX is/should be. Way too much for a single issue.

I don't disagree with the general thought, but as this is not an actionable issue in itself, I'm going to close it. Feel free to use Slack or the forums to get people together on defining the problem and solutions further, you'll probably find prior discussions on the same topic.

BenceSzalai commented 5 years ago

I am going to share my knowledge about it on meetup in Almaty (Kazakhstan) 29th of April and also prepare a collection of video lessons.

@Alroniks As I've obviously missed the mentioned opportunity, could you please point us to the right direction regarding a setup to use PHPStorm (or other standard IDE) to work with ModX instead of editing our files in the Manager? Is it based on ElementHelper? Could you please share even just a bullet list of your toolchain and key workflow elements?

Mark-H commented 5 years ago

His slides from the talk are here: https://modx.today/assets/uploads/files/2017/almaty-keynotes/kazakhstan-almaty-modxmeetup-ivan.pdf

(From https://modx.today/posts/2017/05/modx-bridge-maintenance-at-almaty-kazakhstan)