Update on v4.0.0-alpha1 (changes towards the next release)

Here's an update on the current version, which includes changes towards the next release still in development.
This commit is contained in:
2024-03-11 17:01:01 +02:00
parent c8540f2efc
commit a7ade71c06
5 changed files with 65 additions and 2 deletions

View File

@ -125,6 +125,9 @@ final class InstallScript implements GetScriptInterface
*/
public function get(object $extension): string
{
// purge the object
$this->rest();
// loop over methods and types
foreach ($this->methods as $method)
{
@ -160,6 +163,24 @@ final class InstallScript implements GetScriptInterface
return $this->build();
}
/**
* Reset all bucket at the start of each build
*
* @return void
* @since 3.2.0
*/
protected function rest(): void
{
$this->construct = [];
$this->install = [];
$this->update = [];
$this->uninstall = [];
$this->preflightActive = false;
$this->preflightBucket = ['install' => [], 'uninstall' => [], 'discover_install' => [], 'update' => []];
$this->postflightActive = false;
$this->postflightBucket = ['install' => [], 'uninstall' => [], 'discover_install' => [], 'update' => []];
}
/**
* build the install class
*

View File

@ -125,6 +125,9 @@ final class InstallScript implements GetScriptInterface
*/
public function get(object $extension): string
{
// purge the object
$this->rest();
// loop over methods and types
foreach ($this->methods as $method)
{
@ -160,6 +163,24 @@ final class InstallScript implements GetScriptInterface
return $this->build();
}
/**
* Reset all bucket at the start of each build
*
* @return void
* @since 3.2.0
*/
protected function rest(): void
{
$this->construct = [];
$this->install = [];
$this->update = [];
$this->uninstall = [];
$this->preflightActive = false;
$this->preflightBucket = ['install' => [], 'uninstall' => [], 'discover_install' => [], 'update' => []];
$this->postflightActive = false;
$this->postflightBucket = ['install' => [], 'uninstall' => [], 'discover_install' => [], 'update' => []];
}
/**
* build the install class
*

View File

@ -125,6 +125,9 @@ final class InstallScript implements GetScriptInterface
*/
public function get(object $extension): string
{
// purge the object
$this->rest();
// loop over methods and types
foreach ($this->methods as $method)
{
@ -160,6 +163,24 @@ final class InstallScript implements GetScriptInterface
return $this->build();
}
/**
* Reset all bucket at the start of each build
*
* @return void
* @since 3.2.0
*/
protected function rest(): void
{
$this->construct = [];
$this->install = [];
$this->update = [];
$this->uninstall = [];
$this->preflightActive = false;
$this->preflightBucket = ['install' => [], 'uninstall' => [], 'discover_install' => [], 'update' => []];
$this->postflightActive = false;
$this->postflightBucket = ['install' => [], 'uninstall' => [], 'discover_install' => [], 'update' => []];
}
/**
* build the install class
*