New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't hardcode plugins directory #14043

Merged
merged 3 commits into from Jan 30, 2019

Conversation

Projects
None yet
3 participants
@tsteur
Copy link
Member

tsteur commented Jan 29, 2019

Instead use the method that defines the plugin dir. No logic should change here. Doing this in preparation to potentially provide a way to define multiple plugin directories. But for this we first need to make sure that all code is using the same method when looking for plugin directory.

@tsteur tsteur added this to the 3.9.0 milestone Jan 29, 2019

@diosmosis

This comment has been minimized.

Copy link
Member

diosmosis commented Jan 29, 2019

Not sure if these need to change, but seeing the /plugins/ in other places like:

  • core/testMinimumPhpVersion.php
  • core/ReportRenderer/Pdf.php
  • core/Tracker/Response.php
  • core/FrontController.php
  • plugins/CorePluginsAdmin/PluginInstaller.php
  • plugins/CorePluginsAdmin/Controller.php
  • LanguagesManager files
  • plus other places
@tsteur

This comment has been minimized.

Copy link
Member Author

tsteur commented Jan 29, 2019

cheers @diosmosis added it to more places where needed (didn't add it when they included/required specific files from a plugin)

@Findus23

This comment has been minimized.

Copy link
Member

Findus23 commented Jan 29, 2019

I guess this will (someday in the future) help with #12988 which allows easier docker images and similar things.

@tsteur

This comment has been minimized.

Copy link
Member Author

tsteur commented Jan 29, 2019

Yes that can help with that. It may partially help us to at some point move the plugins directory somewhere else. May goal be likely to have it later possible to add more plugins directories while leaving the core plugins in the current place. After this exercise it seems likely too difficult though and I might fallback to symlinks instead. To be seen.

@Findus23

This comment has been minimized.

Copy link
Member

Findus23 commented Jan 29, 2019

@tsteur I think this docker image does use symlink tricks to get around this issue:
https://github.com/crazy-max/docker-matomo
https://github.com/crazy-max/docker-matomo/blob/master/entrypoint.sh

@diosmosis

This comment has been minimized.

Copy link
Member

diosmosis commented Jan 29, 2019

didn't add it when they included/required specific files from a plugin

Will that be an issue if the plugins are located outside of PIWIK_INCLUDE_PATH . '/plugins'?

@tsteur

This comment has been minimized.

Copy link
Member Author

tsteur commented Jan 29, 2019

Will that be an issue if the plugins are located outside of PIWIK_INCLUDE_PATH . '/plugins'?

If all plugins were moved outside then yes. For my use case I'm not really planning on the possibility to move plugins in another directory. Only to pick up non-core plugins from a different directory. The core plugins be always in that path.

@diosmosis

This comment has been minimized.

Copy link
Member

diosmosis commented Jan 29, 2019

If all plugins were moved outside then yes. For my use case I'm not really planning on the possibility to move plugins in another directory. Only to pick up non-core plugins from a different directory. The core plugins be always in that path.

Ah, I see, makes sense 👍

@diosmosis diosmosis merged commit faa8c38 into 3.x-dev Jan 30, 2019

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/travis-ci/push The Travis CI build failed
Details

@diosmosis diosmosis deleted the pluginsdir branch Jan 30, 2019

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