rick

ProcessWire and phpstorm

Recommended Posts

rick    329

Hello all,

I am evaluating phpstorm and would welcome any comments from those of you that use it.

Here is screen shot of a namespace test.

phpstorm.jpg.fe0321366d8a34d7d965304c920fbfcb.jpg

Ex 1 shows undefined variables, user, session, and pages. No autocomplete is available.
Ex 2 shows undefined functions, isLoggedin and redirect. No autocomplete for methods is available.
Ex 3 shows a correct validation and autocomplete is available.

I am not sure how to configure phpstorm so that I write as shown in ex 1 and have it validate as in ex 3. 

Any help is greatly appreciated.

Share this post


Link to post
Share on other sites
Robin S    2,487
1 hour ago, rick said:

I am not sure how to configure phpstorm so that I write as shown in ex 1 and have it validate as in ex 3. 

There may be other solutions but this is what I do...

 

  • Like 2

Share this post


Link to post
Share on other sites
Thor    5

Well, I purchased that IDE a month ago and so far its works great with everything I throw at it. It's a bit slow and laggy sometimes, but the features are unmatched by any other IDE it seems. I'm new to PW so I can't comment on how well it will integrate. I will surely be interested in this as well.

Share this post


Link to post
Share on other sites
rick    329

@Robin S, Care to share your site profile?

Did you modify the default site profile for installation? How did you do that? I would be interested in creating a 'pre-configured' 'blank slate' so to speak.

  • Like 1

Share this post


Link to post
Share on other sites
Robin S    2,487

Hi @rick,

I can't share my custom profile because it contains pro modules. And it's set up to suit my preferences and idiosyncrasies which would surely be different for each person.

But it's very easy to make your own custom profile. If you find yourself installing the same modules or creating the same kinds of page structures over and over for each project then the idea is:

  • Create a new installation on your localhost using the "blank" profile
  • Customise /site/config.php how you like, e.g. imageSizerOptions, useMarkupRegions, setlocale()
  • Install your favourite modules - include the Site Profile Exporter
  • Set up any admin tweaks with AdminOnSteroids and/or AdminCustomFiles
  • Create the fields, templates and template files you tend to need for every new site (it doesn't hurt if there are some that aren't always used as you can always delete them in any project that doesn't need them)
  • Create any page structures you want to have pre-existing (I have a "news" section, and a "selects" section for Page Reference options)
  • Export your site profile

Then when you are creating a new project you just copy the profile folder to the root before installing PW and select it during the install process.

I keep my starting profile on localhost and update/re-export it from time to time with the latest module upgrades and any new tricks and tweaks I have learned.

  • Like 6

Share this post


Link to post
Share on other sites
rick    329

@Robin S

This.

This right here is why you are a hero member. Props to you for the profile explanation. ^-^

I never knew the procedure. I will put this into practice immediately.

PS. Where is that damn "Buy-a-Beer" button? Somebody needs to make that happen.

  • Like 2

Share this post


Link to post
Share on other sites
szabesz    1,377
12 hours ago, rick said:

"Buy-a-Beer"

How about a Buy-a-Coffee too? We need options! :P

  • Like 3

Share this post


Link to post
Share on other sites
rick    329

@Robin S

Just an FYI.

I followed your procedures to export my local dev profile and install it to my live server. Everything went without a hitch.

I owe you a coffee, a beer, and a pizza! 

  • Like 3

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.