Download the PHP package umanit/life-page-bundle without Composer

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

UmanIT - Life Page

This bundle allows you to set up a life page on your site. A certain number of predefines checkers are available and automatically configured depending on your actual project configuration.

Installation

Use the package manager composer to install the extension.

Load the bundle into your Symfony project.

Import the route file:

Or, if your prefer customize it, adapt the default declaration:

That’s it! Your life page should now be accessible at the path /_life and some checks already done if your configuration meets the requirements.

Available checkers

The following checkers are available. Each of them are automatically configured if possible, but you can manually use them if needed.

  1. DoctrineChecker
  2. PommChecker
  3. FosElasticaChecker
  4. SmtpMailerChecker
  5. SwiftmailerChecker
  6. MessengerChecker

DoctrineChecker

Using an entity manager, tries to connect to the database.

Automatic configuration

If the service doctrine.orm.default_entity_manager exists, a checker is added using it.

PommChecker

Using Pomm, retrieves the default session and tries to get client encoding.

Automatic configuration

If the service pomm.default_session exists, a checker is added using it.

FosElasticaChecker

Using a client, tries to get the server version.

Automatic configuration

If the service fos_elastica.client.default exists, a checker is added using it.

SmtpMailerChecker

Using a mailer transport, and only if it’s an instance of SmtpTransport, tries to execute a NOOP command on the SMTP server.

Automatic configuration

If the service mailer.default_transport exists, a checker is added using it.

⚠️ If the service is not an instance of SmtpTransport, the checker will be ignored.

SwiftmailerChecker

Using SwiftMailer instance, tries to ping the transport.

Automatic configuration

If the service swiftmailer.mailer.default exists, a checker is added using it.

MessengerChecker

Using a messenger transport, and only if it’s an instance of MessageCountAwareInterface, tries to count available messages.

Automatic configuration

For each service tagged with messenger.receiver, a checker will be added.

⚠️ If the service is not an instance of MessageCountAwareInterface, the checker will be ignored.

Adding a custom checker

Create a service which extends the CheckerInterface and tag it with umanit_life_page.service_checker. Your checker should now be displayed on the life page.

The method getName is used to name the checker on the page while the check method is used to determine the status to display. If it’s true then OK is shown, if it’s false then KO is shown and if it’s null the checker is ignored.

Check only specific services

By adding your own service checker service, you can check only specific services if needed. You need to follow this steps:

  1. Tag some of your services checker with a custom tag ;
  2. declare a new service using the class Umanit\LifePageBundle\Checker\ServiceChecker
    • The service must use a tagged_iterator as argument, using your custom tag from the previous step.
    • The service must be tag with umanit_life_page.service_checker_collection and have a unique type value.

Example:

Once it’s done you can access to the check using the path /_life/{type}, so with our example /_life/critical.

The bundle is already providing the critical type and all of it’s checker are using it.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT


All versions of life-page-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.3
symfony/framework-bundle Version ^4.4|^5.0|^6.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 umanit/life-page-bundle contains the following files

Loading the files please wait ....