68 Commits

Author SHA1 Message Date
Jack Wilkinson
32440b19b9
Added fix when setting plugin status replacements were overriding originals (#226) 2021-07-14 10:31:25 -06:00
jaxwilko
812f524101
Only show plugin warnings for active replacements (#122) 2021-04-26 09:10:59 -06:00
Luke Towers
7d8117dd67 Fix unit tests 2021-04-25 21:49:38 -06:00
Luke Towers
88bbf232c7 Ensure route attributes from plugins are properly loaded
Fixes wintercms/winter#106.
See https://stackoverflow.com/questions/42984295/laravel-named-routes-not-working/67258851#67258851
2021-04-25 16:38:49 -06:00
jaxwilko
59ee7c1cc3
Warn when replaced plugins are still present (#109) 2021-04-25 10:18:31 -06:00
Luke Towers
c100059a56 Fix registering of namespace aliases 2021-04-21 15:58:27 -06:00
Luke Towers
4a6bc4df6a
Add support for plugin replacement / forking (#41)
Documented by https://github.com/wintercms/docs/pull/11

Co-authored-by: @jaxwilko Jack Wilkinson <me@jackwilky.com>
Co-authored-by: @mjauvin Marc Jauvin <marc.jauvin@gmail.com>
Co-authored-by: @bennothommo Ben Thomson <git@alfreido.com>
Co-authored-by: @LukeTowers  Luke Towers <github@luketowers.ca>
2021-04-21 13:50:59 -06:00
Luke Towers
596c6901e6 Fix issues with PluginManager->getRegistrationMethodValues()
On PHP 7.4 method_exists can return true for protected (i.e. not callable) methods. Additionally, some plugins already implemented their own registerValidationRules method not implementing the expected return type, so that needed to be handled more gracefully
2021-03-24 11:27:08 -06:00
Luke Towers
cfa763b714 Initial rebrand commit generated from the 1.0 rebrand branch patch file 2021-03-10 15:02:53 -06:00
Luke Towers
6b214edf1f Add getAllPlugins() method to PluginManager 2020-08-27 15:47:42 -06:00
Luke Towers
3864e5b1c6 Allow plugin view & configuration files to be registered on protected routes
Fixes #5245
2020-08-19 09:57:57 -06:00
Ben Thomson
8dba43ba0b
Allow plugin autoloaders to load on restricted pages and actions (#5120)
Allow plugin autoloaders to load, even on restricted pages. This allows (enabled) plugins to load their autoloaders on any pages, allowing includes in migration files to run.

Fixes #5110.
2020-06-09 21:46:17 -06:00
Nick Khaetsky
ce7335f6cb
Add warning with missing dependencies on Updates page (#5077)
Fixes #4843.
2020-05-26 10:05:40 -06:00
Luke Towers
8b9c001b9a Allow disabled plugin's translations to load for display translations on system pages 2020-04-02 22:15:30 -06:00
Marc Jauvin
b1d41caf03
Improve PluginManager code (#5023) 2020-04-02 09:30:15 -06:00
Marc Jauvin
600fbd7cfa
Improve code readability for exists method (#5022) 2020-04-02 08:33:58 -06:00
Luke Towers
61b4ef6a47 Minor cleanups to the PluginManager.
Cleans up docblocks and makes most helper methods more permissive of incorrectly cased plugin identifiers. Replaces #4838 & #4837. Credit to @mjuavin for the case insensitivity fixes.
2020-04-01 21:30:54 -06:00
Luke Towers
243c835c24 Minor performance improvement for PluginManager.
Suggested by @tobias-kuendig in #4337, implemented because normalizeIdentifier() would be called more frequently by merging #4838.
2020-03-31 00:36:33 -06:00
Samuel Georges
adb303a53c Always sort plugins by key, then dependencies
This has been benchmarked and appears to have minimal impact on performance and solves unnecessary randomness and race conditions during the app's registration and boot cycle

Fixes #4826
2019-12-21 20:50:28 +11:00
Tobias Kündig
604f0d060d Make plugin dependency checks case-insensitive (#4337)
Normalize the plugin identifier before lookup in the `hasPlugin` call, which should allow plugin dependencies to resolve if mis-cased in the Plugin `$require` property.

Credit to @tobias-kuendig.
2019-07-02 22:12:29 +08:00
Ben Thomson
2002fd6b4b Prevent plugins that cannot be instantiated from being loaded (#3956)
Credit to @bennothommo
2018-12-04 11:22:07 -06:00
Nathan van der Werf
8fd16d4db6
Merge branch 'develop' into feature/cleanup
# Conflicts:
#	modules/backend/formwidgets/FileUpload.php
2018-08-24 19:52:54 +02:00
Samuel Georges
bf841b4340 Minor peer review 2018-08-21 13:24:59 +10:00
Samuel Georges
ab4074cec1 Extra table check
Fixes #3706
2018-08-18 12:52:05 +10:00
Samuel Georges
ab7dda260b User disabled plugins now stay disabled after sign in
Fixes #1795
Fixes #3691
2018-08-16 14:11:05 +10:00
Nathan van der Werf
ee9414f3fd Simplify ternary operators 2018-08-15 19:26:20 +02:00
Nathan van der Werf
a075be206b Replace class references with "self" 2018-08-15 18:47:06 +02:00
Szabó Gergő
b564e3178d Only add missing dependencies once (#3682)
Only add missing dependencies to the list of missing dependencies once per dependency. Credit to @gergo85
2018-08-09 07:39:37 -06:00
Harmen Janssen
a2a91a38e6 Added PluginManager::unregisterAll() (#3156) 2017-10-08 12:14:17 -06:00
Samuel Georges
a40357cec9 Added a check for missing dependencies in two places
- System dashboard now lists missing dependencies
- Installing a plugin with missing dependencies will also attempt to install those dependencies at the same time
Fixes #36
2017-03-21 17:42:56 +11:00
Samuel Georges
f7e80b2cb6 Added a $force flag to bootAll and registerAll method for unit tests
Fixes #2592
2017-02-05 07:09:27 +11:00
Samuel Georges
e8ba7fef5b Plugin dependency definitions no longer case sensitive
Dependency checking is disabled for the front end to increase performance
2016-12-10 10:59:45 +11:00
Samuel Georges
f9dd5b2f57 Plugins can now define custom list column types 2016-10-21 07:15:08 +11:00
Samuel Georges
58c669bf1e Exception handling when disabled.json returns null
Fixes #2341
2016-09-03 12:19:22 +10:00
Jérémy Gaulin
be9d65f372 Fix plugin management page - Ref #907 (#2034)
* Disable activate/deactive and delete buttons after a successful AJAX delete request.

* Allow to load disabled plugin language files for display.
2016-05-23 05:05:19 +10:00
Samuel Georges
d76863a3ec Merge branch 'develop' into stable
Conflicts:
	composer.json
2016-02-27 14:55:52 +11:00
pawel
c38b841eb8 fix function output in accordance to phpdoc and function naming 2016-02-25 01:11:29 +03:00
Pásztor Gábor
537f637e47 Storage path 2016-01-15 10:07:39 +01:00
Joel Ekström Svensson
7dd0d76155 Allow plugins to be symlinks
This change makes sure that plugins can be loaded even though they are symlinks. The change makes it easier to have custom schemes to handle version control with zero-downtime deployment.
2015-10-24 23:39:18 +02:00
Vojta Svoboda
16eb704793 Add missing PHPDoc @return tag 2015-10-17 09:17:37 +11:00
Samuel Georges
6c6c7b9e1f Implement ComposerManager::autoload for plugins that use composer.
All packages are now added to a global pool to prevent double loading and the load order is respected.
Refs #1227
2015-06-27 13:37:34 +10:00
Samuel Georges
19e648cab8 Remove useless reference 2015-06-27 12:34:24 +10:00
Samuel Georges
1a037bad04 Add the ability to include middleware in CMS / Backend controllers
Add init.php script to plugins
Fixes https://github.com/octobercms/library/issues/106
2015-04-21 20:07:34 +10:00
Samuel Georges
c54821f175 Overhaul the plugin installation process in the back-end
Themes can now be installed via the back-end
2015-04-04 17:28:51 +11:00
Samuel Georges
2e949216ab Autoloader before ->register() 2015-03-03 14:34:38 +11:00
Samuel Georges
3cff8caa15 Plugins now support elevated privileges 2015-02-28 14:45:54 +11:00
Samuel Georges
c559db0de6 Extract the updater JS to its own file, add helper to find missing dependencies 2015-02-21 22:59:09 +11:00
Samuel Georges
cf9231466c bindSoftDependencies -> bindContainerObjects 2015-02-21 12:03:50 +11:00
Samuel Georges
9f17c7add0 Add support for unit testing 2015-02-21 11:41:43 +11:00
Samuel Georges
c678c965ea Plugin manager can now load, register and boot individual plugins 2015-02-12 21:04:27 +11:00