Component Builder (v.5.0.0-rc1)
+ Component Builder (v.5.0.0-rc2)
The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml
index 25d014a3c..557d74719 100644
--- a/componentbuilder_update_server.xml
+++ b/componentbuilder_update_server.xml
@@ -23,10 +23,10 @@
pkg_component_builder
package
site
- 4.0.0-rc1
+ 4.0.0-rc2
https://dev.vdm.io
- https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v4.0.0-rc1.zip
+ https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v4.0.0-rc2.zip
beta
@@ -44,7 +44,7 @@
5.0.0-alpha
https://dev.vdm.io
- https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.0-beta1.zip
+ https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.0-alpha8.zip
alpha
@@ -59,79 +59,7 @@
pkg_component_builder
package
site
- 5.0.0-beta1
- https://dev.vdm.io
-
- https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.0-beta1.zip
-
-
- beta
-
- Llewellyn van der Merwe
- https://dev.vdm.io
-
-
-
- Component Builder
- Builds Complex Joomla Components
- pkg_component_builder
- package
- site
- 5.0.0-beta2
- https://dev.vdm.io
-
- https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.0-beta2.zip
-
-
- beta
-
- Llewellyn van der Merwe
- https://dev.vdm.io
-
-
-
- Component Builder
- Builds Complex Joomla Components
- pkg_component_builder
- package
- site
- 5.0.0-beta3
- https://dev.vdm.io
-
- https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.0-beta3.zip
-
-
- beta
-
- Llewellyn van der Merwe
- https://dev.vdm.io
-
-
-
- Component Builder
- Builds Complex Joomla Components
- pkg_component_builder
- package
- site
- 5.0.0-beta4
- https://dev.vdm.io
-
- https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.0-beta4.zip
-
-
- beta
-
- Llewellyn van der Merwe
- https://dev.vdm.io
-
-
-
- Component Builder
- Builds Complex Joomla Components
- pkg_component_builder
- package
- site
- 5.0.0-beta5
+ 5.0.0-beta
https://dev.vdm.io
https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.0-beta5.zip
@@ -149,10 +77,10 @@
pkg_component_builder
package
site
- 5.0.0-rc1
+ 5.0.0-rc2
https://dev.vdm.io
- https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.0-rc1.zip
+ https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.0-rc2.zip
releasecandidate
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaPower/Extractor.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaPower/Extractor.php
index 043954dcc..71835a2fb 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaPower/Extractor.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaPower/Extractor.php
@@ -12,6 +12,7 @@
namespace VDM\Joomla\Componentbuilder\Compiler\JoomlaPower;
+use VDM\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Power\ExtractorInterface;
use VDM\Joomla\Componentbuilder\Compiler\Power\Extractor as ExtendingExtractor;
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Utilities.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Utilities.php
index 2f4b56a6d..bf14861fc 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Utilities.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Utilities.php
@@ -121,7 +121,8 @@ class Utilities implements ServiceProviderInterface
public function getFileInjector(Container $container): FileInjector
{
return new FileInjector(
- $container->get('Power.Injector')
+ $container->get('Power.Injector'),
+ $container->get('Joomla.Power.Injector')
);
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/FileInjector.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/FileInjector.php
index 47c9af0bf..eaf28e2c6 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/FileInjector.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/FileInjector.php
@@ -13,6 +13,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Utilities;
use VDM\Joomla\Componentbuilder\Compiler\Power\Injector as Power;
+use VDM\Joomla\Componentbuilder\Compiler\JoomlaPower\Injector as JoomlaPower;
use VDM\Joomla\Utilities\MathHelper;
@@ -33,23 +34,41 @@ final class FileInjector
protected Power $power;
/**
- * The pattern to get the powers
+ * The Joomla Injector Class.
+ *
+ * @var JoomlaPower
+ * @since 3.2.1
+ */
+ protected JoomlaPower $joomla;
+
+ /**
+ * The power pattern to get the powers
*
* @var string
* @since 3.2.0
**/
- protected string $pattern = '/Super_'.'_'.'_[a-zA-Z0-9_]+_'.'_'.'_Power/';
+ protected string $powerPattern = '/Super_'.'_'.'_[a-zA-Z0-9_]+_'.'_'.'_Power/';
+
+ /**
+ * The Joomla power pattern to get the powers
+ *
+ * @var string
+ * @since 3.2.1
+ **/
+ protected string $joomlaPattern = '/Joomla_'.'_'.'_[a-zA-Z0-9_]+_'.'_'.'_Power/';
/**
* Constructor.
*
- * @param Power $power The Injector Class.
+ * @param Power $power The Injector Class.
+ * @param JoomlaPower $joomla The Joomla Injector Class.
*
- * @since 3.2.0
+ * @since 3.2.1
*/
- public function __construct(Power $power)
+ public function __construct(Power $power, JoomlaPower $joomla)
{
$this->power = $power;
+ $this->joomla = $joomla;
}
/**
@@ -72,7 +91,9 @@ final class FileInjector
throw new \InvalidArgumentException('Position cannot be negative.');
}
- $found_super_powers = preg_match($this->pattern, $data);
+ $found_joomla_powers = preg_match($this->joomlaPattern, $data);
+ $found_super_powers = preg_match($this->powerPattern, $data);
+
$actual_file = $this->openFileWithLock($file);
try
@@ -85,6 +106,11 @@ final class FileInjector
$this->processFile($actual_file, $temp_file, $data, $position, $replace);
+ if ($found_joomla_powers)
+ {
+ $this->injectJoomlaPowers($actual_file);
+ }
+
if ($found_super_powers)
{
$this->injectSuperPowers($actual_file);
@@ -207,6 +233,28 @@ final class FileInjector
ftruncate($actual_file, 0);
rewind($actual_file);
+ fwrite($actual_file, $power_data);
+ }
+
+ /**
+ * Injects Joomla powers into the file content, if found, and updates the file.
+ *
+ * @param resource $actual_file The file handle of the actual file.
+ *
+ * @return void
+ * @since 3.2.1
+ */
+ private function injectJoomlaPowers($actual_file): void
+ {
+ rewind($actual_file);
+
+ $power_data = $this->joomla->power(
+ stream_get_contents($actual_file)
+ );
+
+ ftruncate($actual_file, 0);
+ rewind($actual_file);
+
fwrite($actual_file, $power_data);
}
}