Download the PHP package ricardoper/micra without Composer

On this page you can find all versions of the php package ricardoper/micra. 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 micra

PHP Micra Framework for CLI Apps

Micra is a CLI framework for your apps with a minimum overhead based on Symfony Components.

Table of Contents


How to Install

Run this command from the directory in which you want to install your new Micra Framework.

NOTE:

Most Relevant Folders

Global Helpers

Global Helpers for Development Only

Configurations

You can add as many configurations files as you want (/configs). These files will be automatically preload and merged in the container based on selected environment.

If you have an environment called "sandbox" and you want to overwrite some configuration only for this environment, you need to create a subfolder "sandbox" in /configs. Something like that /configs/sandbox. Then create the file that includes the configuration that you need to replace and the respective keys and values inside it.

/configs/logger.php

/configs/local/logger.php

Results of name for the environment:

NOTE: You can see the example in this framework for the local environment.

Configurations Dot Notation

You can use dot notation to get values from configurations.

/configs/example.php

If you want the host value for MySQL type:

Commands

The start point of your tasks.

You can add as many Commands as you want in a cleaning way (/app/Commands).

After add your Command, you can enable or disable it in config/[env/]commands.php configuration file.

NOTE: To have helpers you must extend the Commands with ControllerAbstract located in \App\Kernel\Abstracts.

Enable it in config/[env/]commands.php:

Commands Helpers

Inbuilt commands

Run Commands

To run Commands use micra PHP executable.

If you need help:

If you need Command help:

Models

Manages the data, logic and rules of the application.

You can add as many Models as you want in a cleaning way (/app/Models).

After add your Models, you use it for, for example, in a Controller.

NOTE: To have helpers you must extend the Model with ModelAbstract located in \App\Kernel\Abstracts.

Models Helpers

Services Providers

Define bindings and inject dependencies.

You can add as many Services Providers as you want in a cleaning way (/app/Services).

After add your Services Provider, you can enable or disable it in configs/services.php configuration file.

NOTE: Service Providers must respect the ServiceProviderInterface located in \App\Kernel\Interfaces.

Enable it in configs/services.php:

Handlers

Handles specified behaviors of the application.

You can override the following Handlers in a cleaning way (/app/Handlers):

After add your Handler, you can enable or disable it in configs/app.php configuration file.

Database Support

Medoo is implemented out of box as a Service Provider. The use is optional and is not enabled by default.

To enable database support with Medoo you need to add this library/vendor with Composer:

Once installed you need to enable the Service Provider in configs/services.php:

Now you are ready to use it...

If you need more details, documentation, api reference, please visit Medoo webpage: https://medoo.in/

NOTES:

Exceptions

You have some Exceptions out the box, located in \App\Kernel\Exceptions, than you can use it:

Logging

Logging is always enabled and you can see all the output in /storage/logs/app-[date].log.

NOTE: Logs will with more than 7 days will be deleted automatically by the Logger.

Benchmarks

Some numbers for Hello Command...

Machine:
Intel® Core™ i5-8400 CPU @ 2.80GHz × 6
16Gb RAM
SSD

Versions:
Ubuntu 20.04 LTS
Docker v19.03.8
PHP v7.4.3
PHP v7.2.24
Zend OPcache enabled

PHP v7.2 PHP v7.4
Linux Time - real 0m0.057s 0m0.054s
Linux Time - user 0m0.026s 0m0.024s
Linux Time - sys sys 0m0.031s sys 0m0.030s
PHP - Time 0.016968s 0.015434s
PHP - Max Memory 2414 KB 2294 KB
PHP - Allocated Memory 4096 KB 4096 KB



Enjoy the simplicity :oP


All versions of micra with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2.5
psr/log Version ^1.1
pimple/pimple Version ^3.3
symfony/console Version ^5.0
vlucas/phpdotenv Version ^4.1
symfony/var-dumper Version ^5.0
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 ricardoper/micra contains the following files

Loading the files please wait ....