Download the PHP package zyos/install-bundle without Composer
On this page you can find all versions of the php package zyos/install-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zyos/install-bundle
More information about zyos/install-bundle
Files in zyos/install-bundle
Package install-bundle
Short Description Command execution automation process for Symfony
License MIT
Informations about the package install-bundle
User Manual — ZyosInstallBundle Commands
Bundle: ZyosInstallBundle
Framework: Symfony LTS >=
Manual version: 1.0
Language: English
Table of Contents
- Introduction
- Requirements and global configuration
- Command
zyos:install - Command
zyos:cli - Command
zyos:filesystem - Command
zyos:source - Command
zyos:validate - Error policy reference (
if_error) - Available validators reference
- Recommended deployment flow
- Troubleshooting common issues
1. Introduction
Installation
If you don't use flex (you should), you need to enable the package manually:
It is necessary to create the configuration file in the path:
The ZyosInstallBundle provides a set of Symfony Console commands (zyos:*) that automate deployment and verification tasks for a Symfony application. Each command is executed from the command line using bin/console and covers a specific phase of the deployment lifecycle:
| Command | Purpose |
|---|---|
zyos:install |
Executes configured Symfony commands in priority order |
zyos:cli |
Executes configured operating system (shell) commands |
zyos:filesystem |
Creates directories, symbolic links, and directory mirrors |
zyos:source |
Generates a full diagnostic report of the environment |
zyos:validate |
Validates the existence and permissions of critical paths |
Note: The
zyos:echocommand is internal and hidden; it is used exclusively for testing the execution pipeline. It does not appear in the public command listing.
2. Requirements and global configuration
2.1 Listing available commands
To verify the bundle is correctly installed, run:
Expected output:
2.2 Main configuration file
All commands read their configuration from config/packages/zyos_install.yaml. The general structure is:
2.3 The {{ env }} placeholder
Inside command arguments, you can use the {{ env }} placeholder to have the bundle automatically insert the current environment name. Standard Symfony parameters such as %kernel.project_dir% are also supported.
3. Command zyos:install
3.1 Description
Executes in priority order the Symfony commands configured under the install key of zyos_install.yaml. This is the central command of a deployment process: once all commands finish successfully, it creates a lock file that prevents accidental re-execution.
3.2 Syntax
| Element | Type | Required | Description |
|---|---|---|---|
<environment> |
Argument | Yes | Name of the target environment (dev, prod, staging, etc.) |
--show-output |
Option | No | Streams each executed command's output to the console |
3.3 Usage examples
3.4 Terminal preview
On error:
3.5 Configuring install entries
| Key | Description |
|---|---|
command |
Name of the Symfony command to execute |
arguments |
Arguments and options to pass to the command |
environments |
Environments where this entry applies |
enable |
true to execute, false to skip |
if_error |
Error handling policy (see section 8) |
priority |
Execution order; lower values run first |
3.6 Lock file mechanism
- After a successful
zyos:install, a lock file specific to the environment is created. - If the lock file already exists, the command refuses to run to protect the environment.
- To run the install again, you must manually remove the lock file.
Warning: Never delete the production lock file without first verifying the application state. The lock file is a safeguard against accidental duplicate installations.
4. Command zyos:cli
4.1 Description
Executes operating system (shell) commands configured under the cli key of zyos_install.yaml. Unlike zyos:install, this command runs system binaries (such as mkdir, chmod, composer, bash scripts, etc.) instead of Symfony commands.
Important: This command requires the lock file for the corresponding environment to exist. You must run
zyos:installbeforezyos:cli.
4.2 Syntax
| Element | Type | Required | Description |
|---|---|---|---|
<environment> |
Argument | Yes | Name of the target environment |
--show-output |
Option | No | Streams real-time stdout/stderr output from each process |
4.3 Usage examples
4.4 Terminal preview
With --show-output:
4.5 Configuring cli entries
| Key | Description |
|---|---|
command |
Array of command tokens. The first element is the binary |
environments |
Environments where this entry applies |
enable |
true activates the entry; false skips it |
if_error |
Error policy (see section 8) |
priority |
Execution order; lower number = higher priority |
Note: The command is defined as a token array (not a string). This is equivalent to calling
Process(['mkdir', '-p', '/path'])from the Symfony Process component, preventing shell injection vulnerabilities.
5. Command zyos:filesystem
5.1 Description
Performs filesystem operations: creates directories, creates symbolic links, and mirrors (recursive copy) directories. All operations are configured under the filesystem key of zyos_install.yaml.
Important: Like
zyos:cli, this command requires the lock file for the environment to exist.
5.2 Syntax
| Element | Type | Required | Description |
|---|---|---|---|
<environment> |
Argument | Yes | Name of the target environment |
--mirror |
Option | No | Runs only mirror type operations |
--symlink |
Option | No | Runs only symlink type operations |
--directory |
Option | No | Runs only directory type operations |
--show-output |
Option | No | Prints details for each operation (path, type, permissions, etc.) |
5.3 Usage examples
5.4 Terminal preview
With --show-output:
On error:
5.5 Operation types
| Type | source |
destination |
Description |
|---|---|---|---|
directory |
Path to create | Not applicable | Creates the directory specified in source |
symlink |
Link target path | Link path | Creates a symbolic link from destination → source |
mirror |
Source directory | Destination directory | Recursively copies source to destination |
5.6 Configuring filesystem entries
Warning: For
symlinkandmirroroperations, bothsourceanddestinationare required. If either is missing, the command will throw a configuration error before executing any operation.
6. Command zyos:source
6.1 Description
Generates a full diagnostic report of the runtime environment. It requires no arguments or application changes: it simply gathers information about the bundle, Symfony, PHP, and the server, and presents it in structured tables with visual status indicators.
This command always returns exit code 0 (success), as it is purely informational.
6.2 Syntax
No additional arguments or options are accepted.
6.3 Terminal preview
6.4 Status indicators
| Symbol | Color | Meaning |
|---|---|---|
✔ |
Green | Correct or optimal state |
⚠ |
Yellow | Warning — review soon |
✘ |
Red | Error or critical state |
6.5 Automatic diagnostic thresholds
The command automatically evaluates these conditions and reports them in the Diagnostics section:
| Condition | Level |
|---|---|
| Bundle path does not exist on disk | warning |
PHP memory_limit < 512 MB |
warning |
| OPcache disabled | warning |
Xdebug loaded in prod environment |
warning |
Debug mode active in prod environment |
warning |
| RAM usage ≥ 90% | warning |
| Swap usage ≥ 50% | warning |
| Disk usage ≥ 75% | warning |
| Disk usage ≥ 90% | critical |
7. Command zyos:validate
7.1 Description
Verifies that critical files, directories, and paths exist and meet the configured permission requirements. It runs individual validators against each path and presents a detailed report with the status of each check.
The command returns exit code 0 if all validations pass, or exit code 1 if any validation fails.
7.2 Syntax
| Element | Type | Required | Description |
|---|---|---|---|
<environment> |
Argument | Yes | Name of the environment to validate |
--only-errors |
Option | No | Shows only entries with failures |
7.3 Usage examples
7.4 Terminal preview
7.5 Result meanings
| Badge | Icon | Description |
|---|---|---|
PASSED (green) |
✔ |
All validators for that entry passed successfully |
FAILED (red) |
✘ |
One or more validators failed |
NOT AVAILABLE (yellow) |
⚠ |
The file or directory does not exist on disk |
7.6 Configuring validate entries
| Key | Description |
|---|---|
filepath |
Path to validate; supports Symfony parameter placeholders |
type |
Expected type: file or directory |
environments |
Environments where this validation applies |
enable |
true activates the entry; false skips it |
validations |
List of validators to run against the path |
8. Error policy reference (if_error)
The if_error key controls what happens when a command or operation fails. It applies to the zyos:install, zyos:cli, and zyos:filesystem commands.
| Value | Behavior |
|---|---|
none |
Ignores the error. The command is marked as successful and the pipeline continues executing subsequent commands normally. Useful for optional operations. |
stop |
Stops the pipeline. When the command fails, all subsequent commands are marked as Skipped and are not executed. The final result is FAILURE. |
default |
Standard behavior. Exit code 0 → SUCCESS; any other code → FAILURE. The pipeline may or may not continue depending on the configuration. |
Visual example with stop:
Warning: Configuring
if_error: noneon critical commands (such as database migrations) can hide serious errors. Use it only for genuinely optional operations.
9. Available validators reference
The following validators can be used in the validations key of zyos:validate entries:
| Validator | Description |
|---|---|
exists |
Verifies that the path exists in the filesystem |
is_dir |
Verifies that the path is a directory |
is_file |
Verifies that the path is a regular file |
is_readable |
Verifies that the path has read permissions |
is_writable |
Verifies that the path has write permissions |
is_executable |
Verifies that the path has execute permissions |
is_link |
Verifies that the path is a symbolic link |
is_absolute_path |
Verifies that the path is absolute (not relative) |
filepath_perms |
Verifies specific permissions on the path |
Note: If a validator name is not registered in the bundle, the command will display the
⚠icon and the messagevalidator not foundnext to that validator, indicating a configuration error.
10. Recommended deployment flow
The recommended order for running the commands in a production deployment is as follows:
Full bash deployment script:
11. Troubleshooting common issues
Error: "Environment [prod] is not configured"
Cause: The specified environment is not in the environments list of zyos_install.yaml.
Solution: Add the environment to the configuration:
Error: "Lock file already exists for environment [prod]"
Cause: The zyos:install prod command was already executed successfully and created a lock file.
Solution: Delete the lock file manually and run again:
Warning: In production, make sure you truly want to re-run the install before deleting the lock file.
Error: "Lock file does not exist for environment [prod]" (in zyos:cli or zyos:filesystem)
Cause: The zyos:cli and zyos:filesystem commands require zyos:install to have been run first.
Solution: Run zyos:install prod before using the other commands directly.
Error: "Configuration key zyos_install.install is missing"
Cause: The config/packages/zyos_install.yaml file does not exist or has a syntax error.
Solution:
Commands marked as Skipped
Cause: A previous command in the pipeline failed with if_error: stop policy.
Solution:
- Identify the command that showed
Errorin the output. -
Run that command in isolation with
--show-outputto see the full error: - Fix the problem and run again.
Validation shows NOT AVAILABLE for all paths
Cause: The zyos:filesystem prod command has not been run yet, so the directories do not exist.
Solution: Run the full flow in order:
All versions of install-bundle with dependencies
symfony/console Version *
symfony/filesystem Version *
symfony/process Version *