Download the PHP package alighorbani1381/command-manager without Composer

On this page you can find all versions of the php package alighorbani1381/command-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package command-manager

👑 What's Command Manager?

it's a laravel package that help you to running chain of commands with call just single artisan command.

it's very useful for automation flow of normalizing data and other stuff needs to run command after any new deploy as easy as adding php artisan command_manager:execute command into your CI/CD pipelines.

⬇️ Installation

You can install the package via composer:

Then you must run migrations to command manager add the tables that it needs to work with.

You may also publish config file:

After running above command you can find file in your config folder command-manager.php

in this files array exist that you can add your command in the commands key inside it

🚀 Usage

To run command automatically we have 3 steps that must be doing if you don't do one of these steps commands manager throw an exception!

1- First you must make your command, and extended from AutomaticCommand if you don't extend Automatic Command see the exception when commands run

2- Register your command in the laravel console kernel! it's very important because if you don't register your command in kernel laravels can't find this command to run it!

3- Add your command into commands list that called automatically by command manager.

Tada 🎉 your job is finished!

Now You can use the below actions to run command or managing it

To check your command is successfully registered on command manager you can run php artisan command_manager:status command it's check the registration of command and if your registration has problem throw the exceptions that you fix it

💎 Commands

This command Showing Status of Commands in the table that you can see which commands pend to run and which commands already run before, it's similar php artisan migrate:status command.


This command Executing Commands that you register in the commands key in array config file.


if you need to reset your command manager (remove all the history of running command and detect all commands as a new command) you can run this command.

⚠️ Warning: if you run this command its remove all the history of running command in your system, command manager detect all the commands in the list of config file.


💡 Automatic Command Features

In this version of package we have 2 simple feature that allows you to manage command with more control.

😴💻️ Maintenance mode

Sometimes we have a command that will be applied special changes that need to turn off any database modification operation (INSERT, UPDATE, DELETE) and for this reason we must put system in Maintenance mode that we define in our system.

to use this feature you should follow these steps

1- Register Maintenance Mode

in config/command-manager.php

you add your functionality of turning on/off maintenance mode as a callable closure or array!

2- Activating on your command

all sets done ✅ your command will be run in maintenance mode!


📚️ Versioning

Sometimes you register command and run it with command manager, after a while you need to run again this command (after bug fixed or improve command logic) but command manager don't detect this command as a new command in this situation you should use versioning feature that command manager supported!

to add version you must use semantic versioning if you don't know about version please read below link 👇️👇️

🔗 https://semver.org

be default all of new command has version 1.0.0 if you need to run again as a new version it's easy as overwrite property in your command class.

⚠️ to set new version please add a verison that number bigger than the newest version that already run before!

⚠️ Don't Change Signature of your command because command manager detect commands from their signature and if you change it Command manager detect command as a new command even if ran before


❌ Exceptions

Command Manager has a some exceptions that you may see it when running one of these commands

php artisan command_manager:status

php artisan command_manager:execute

Exception Reason
BadCommandCallException Doesn't register your command in laravel kernel!
NotAutomaticCommandException Your command doesn't extended from Automatic Command Class

.


.

🏁 A little view of Product Backlog


All versions of command-manager with dependencies

PHP Build Version
Package Version
Requires php Version 8.0.*|8.1.*|8.2.*
laravel/framework Version 8.*|9.*|10.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package alighorbani1381/command-manager contains the following files

Loading the files please wait ....