Starting a plugin development, recommended IDE?

To develop a plugin for pkp/ojs, I’ve been trying with vscodium but I can’t get it to recognize the pkp libraries.

Undefined type 'PKP\plugins\GenericPlugin'.

What IDE, program or framework, do you recommend and how can I configure it to have a good workflow?

Thank you :grin:

okay i got the solution…

Configure VSCodium/VSCode

You need clone ojs project an then, include the path in your environment:

git clone https://github.com/pkp/ojs --recurse-submodules -b stable-3_4_0

Install intelephense plugin for code.

In VS Code Settings:

1.  Open settings (`Ctrl + ,` or `Cmd + ,`).
    
2.  Search for `intelephense.environment.includePaths`.
    
3.  Add the path to the `PKP` directory (e.g., `"/home/user/dev/ojs/"`).
    "intelephense.environment.includePaths": [
      "${workspaceFolder}/"
    ]

  • “this step i dont know if is correct”

copy composer.json from ojs/lib/pkp/ to your working directory
and run composer install or if it fails:

composer  install --ignore-platform-reqs

maybe you need to restart VScode

1 Like

Interesting question.

Let me reopen this and ask if any PKP Dev fellows have any feedback to share.

Cheers,
m.

1 Like

Hi!

You don’t need to copy the composer.json file to the main folder, just access the pkp/lib folder and install it from there.

I think that first you should have a working installation, then you’ll be able to test what you’re doing, you can take a look at the documentation: https://docs.pkp.sfu.ca/admin-guide/en/getting-started

To avoid starting from scratch (running the install) and start with a ready journal with some data + users, you can alternatively grab a ready backup here: GitHub - pkp/datasets: Data sets generated by the integration test suite built into OJS, OMP, and OPS. (there’s a folder for each application, inside it, there will be another for the version and there you’ll find all the files you’ll need).

Then just try to follow the pattern of existing plugins, take a look at the folder /plugins, you can take a look here too: GitHub - pkp/pluginTemplate: A starter template for building your own plugins for OJS and OMP.

Best,
Jonas Raoni

2 Likes

This topic was automatically closed after 11 days. New replies are no longer allowed.