File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,12 @@ Use local settings:
2626- Account Key: ` Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw== `
2727- Blob Service Endpoint: ` http://127.0.0.1:10000/devstoreaccount1 `
2828
29+ ## Vendor Scoping
30+
31+ We use php-scoper to add prefixes to all vendor files, to avoid risks of fatal errors if you activate two plugins that use the same packages.
32+
33+ You need to run the command: ` composer scoper ` to upgrade the vendor-prefixed folder when the vendor folder is updated.
34+
2935## Credits
3036
3137Developed by [ Dekode] ( https://en.dekode.no/?noredirect=en_US ) for [ DSS] ( https://www.dss.dep.no/about-us/ ) .
Original file line number Diff line number Diff line change 2222 require_once __DIR__ . '/vendor-prefixed/autoload.php ' ;
2323}
2424
25- add_action ( 'gform_loaded ' , function () {
25+ /**
26+ * Bootstrap plugin, load it using gform_loaded hook.
27+ *
28+ * @return void
29+ */
30+ function gform_loaded () {
2631 // Check that te GravityForms File Upload plugin is loaded before we try extending it.
2732 if ( ! method_exists ( 'GFForms ' , 'include_feed_addon_framework ' ) ) {
2833 return ;
3843 add_filter ( 'gform_secure_file_download_is_https ' , '__return_false ' , 200 );
3944
4045 \GFAddOn::register ( __NAMESPACE__ . '\\AddOn ' );
41- }, 10 );
46+ }
47+
48+ add_action ( 'gform_loaded ' , __NAMESPACE__ . '\\gform_loaded ' , 10 );
Original file line number Diff line number Diff line change 44 <arg name =" extensions" value =" php" />
55 <config name =" testVersion" value =" 7.2-" />
66
7+ <exclude-pattern >vendor-prefixed</exclude-pattern >
8+ <exclude-pattern >php-scoper</exclude-pattern >
9+
710 <rule ref =" Dekode" >
811 <exclude name =" Generic.Arrays.DisallowShortArraySyntax" />
912 <exclude name =" WordPress.PHP.DisallowShortTernary.Found" />
You can’t perform that action at this time.
0 commit comments