Download the PHP package spiral-packages/maintenance without Composer

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

This is my package maintenance

PHP Latest Version on Packagist GitHub Tests Action Status Total Downloads

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Requirements

Make sure that your server is configured with following PHP version and extensions:

Installation

You can install the package via composer:

After package install you need to register bootloader from the package.

Note: if you are using spiral-packages/discoverer, you don't need to register bootloader by yourself.

Configuration

By default, the package uses file driver for storing information about maintenance mode. If you have multiple instances of your application you need to use cache driver with storage that will be accessed from all instances.

Usage

Include Spiral\Maintenance\Middleware\PreventRequestInMaintenanceModeMiddleware in your application for routes that should not have access during maintenance mode.

To enable maintenance mode, execute the down command:

By default, response code for maintenance mode is 503, but you may set custom response code

To disable maintenance mode, use the up command:

When your application is in maintenance mode the middleware throws Spiral\Maintenance\Exception\MaintenanceModeHttpException with defined status code.

Spiral Framework allows you to pre-render a maintenance mode view that will be returned to the very beginning of the request cycle. You may pre-render a template of your choice using App\ErrorHandler\ViewRenderer. By default, it looks for a template in a folder app/views/exception/{statusCode}.dark.php

You can create a new view file app/views/exception/503.dark.php:

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of maintenance with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
spiral/serializer Version ^3.0
spiral/core Version ^3.0
spiral/cache Version ^3.0
spiral/boot Version ^3.0
spiral/console Version ^3.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 spiral-packages/maintenance contains the following files

Loading the files please wait ....