Each time you run Fusion, it retrieves all current settings from the inner config
array, a monolithic data consisting of sequential and associative entries. This
page explains the schema of the build
part of these entries. A task group that
updates/upgrades all packages to the latest possible version or regenerates the
existing cache and mutable directories if there is no new version of a package.
On This Page
Image
The image
entry configures the helper task responsible for collecting
internal metadata files. These files are
located inside the current working directory
and represent the current state.
Task
The task
entry contains the fully qualified class name that implements the
functionality.
$config["tasks"]["build"]["image"]["task"] = \Valvoid\Fusion\Tasks\Image\Image::class;
Build
The build
entry configures the main task in this group responsible for
collecting the latest possible versions
of external metadata files.
These files are located outside the
current working directory
and represent the new state.
Task
The task
entry contains the fully qualified class name that implements the
functionality.
$config["tasks"]["build"]["build"]["task"] = \Valvoid\Fusion\Tasks\Build\Build::class;
Source
By default, the build task begins with the collected internal root metadata. If
the optional source
entry is specified with an
inline source
string, the task will instead build from the provided external metadata source.
For example, to build from an external metadata source and then replace the current working directory content with the built content of the Fusion package manager, you could set the source value like this:
$config["tasks"]["build"]["build"]["source"] = "valvoid.com/valvoid/fusion/1.0.0";
Environment Version
The version
entry contains a parsed semantic version core that represents the
current environment. A package is considered compatible (buildable) with this
environment if this version passes the package's metadata
version pattern.
By default, the normalizer of the task sets the current runtime environment:
$config["tasks"]["build"]["build"]["environment"]["php"]["version"] = [
"major" => PHP_MAJOR_VERSION,
"minor" => PHP_MINOR_VERSION,
"patch" => PHP_RELEASE_VERSION,
// placeholder
"release" => "",
"build" => ""
];
Categorize
The categorize
entry configures the helper task responsible for evaluating
the collected metadata. It determines which external packages must be
downloaded and which internal packages can be reused.
Task
The task
entry contains the fully qualified class name that implements the
functionality.
$config["tasks"]["build"]["categorize"]["task"] = \Valvoid\Fusion\Tasks\Categorize\Categorize::class;
Efficiently
The efficiently
entry contains a boolean flag that controls the decision behavior.
By default, to identify reusable internal packages, the task compares the external and
internal metadata:
$config["tasks"]["build"]["categorize"]["efficiently"] = true;
Setting the value to false
disables the comparison, forcing a refresh of all
packages.
Download
The download
entry configures the helper task responsible for handling
packages categorized as downloadable. It downloads these external packages into
the packages
directory within the root package's cache.
Task
The task
entry contains the fully qualified class name that implements the
functionality.
$config["tasks"]["build"]["download"]["task"] = \Valvoid\Fusion\Tasks\Download\Download::class;
Copy
The copy
entry configures the helper task responsible for handling
packages categorized as reusable. It copies these internal packages into the
packages
directory within the root package's cache.
Task
The task
entry contains the fully qualified class name that implements the
functionality.
$config["tasks"]["build"]["copy"]["task"] = \Valvoid\Fusion\Tasks\Copy\Copy::class;
Extend
The extend
entry configures the helper task responsible for managing
package extensions. It
relocates all extensions within the cached packages
directory into their
corresponding packages and generates an
extensions.php
file
in each package's cache directory.
Task
The task
entry contains the fully qualified class name that implements the
functionality.
$config["tasks"]["build"]["extend"]["task"] = \Valvoid\Fusion\Tasks\Extend\Extend::class;
Inflate
The inflate
entry configures the helper task responsible for individual
code parsing. It collects all loadable
code files
within the cached packages
directory and caches them relative to the package
root inside the
nested loadable
cache directory.
Task
The task
entry contains the fully qualified class name that implements the
functionality.
$config["tasks"]["build"]["inflate"]["task"] = \Valvoid\Fusion\Tasks\Inflate\Inflate::class;
Register
The register
entry configures the helper task responsible for bundling
inflated top-level loadable files
of each package into a
common Autoloader.php
class
and caching it inside the non-nested (root) package structure.
Task
The task
entry contains the fully qualified class name that implements the
functionality.
$config["tasks"]["build"]["register"]["task"] = \Valvoid\Fusion\Tasks\Register\Register::class;
Snap
The snap
entry configures the helper task responsible for caching
dependency versions.
It creates a snapshot file for each type of metadata:
Task
The task
entry contains the fully qualified class name that implements the
functionality.
$config["tasks"]["build"]["snap"]["task"] = \Valvoid\Fusion\Tasks\Snap\Snap::class;
Stack
The stack
entry configures the helper task responsible for combining
individual packages into a unified new state. It moves these packages
into
the state
directory within the root package's cache.
Task
The task
entry contains the fully qualified class name that implements the
functionality.
$config["tasks"]["build"]["stack"]["task"] = \Valvoid\Fusion\Tasks\Stack\Stack::class;
Shift
The shift
entry configures the helper task responsible for
transferring the new state from the cached state
directory into the
current working directory.
It moves the downloaded packages entirely and only shifts the
cache and
mutable directories
for recycled packages.
Task
The task
entry contains the fully qualified class name that implements the
functionality.
$config["tasks"]["build"]["shift"]["task"] = \Valvoid\Fusion\Tasks\Shift\Shift::class;