Download the PHP package debuss-a/piccolo-framework without Composer

On this page you can find all versions of the php package debuss-a/piccolo-framework. 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 piccolo-framework

Piccolo Framework

The framework of the Piccolo skeleton: a PSR-15 application built on Laminas Stratigility and Mezzio components (without mezzio/mezzio), with a scoped container, attribute-based routing, and support for the FrankenPHP worker mode.

What it provides

Namespace Content
Piccolo\Kernel Boots the application: paths, configuration, environment, PHP settings, container
Piccolo\Application The PSR-15 application: middleware pipeline, routes, one container scope per request
Piccolo\Runtime SapiRunner (PHP-FPM, built-in server, ...) and FrankenPhpWorkerRunner, chosen automatically
Piccolo\ServiceProvider HTTP factories (Diactoros), logger (Monolog), router (FastRoute), error handler, Problem Details, CORS, templates (Plates)
Piccolo\Middleware RequestIdMiddleware, HttpCacheMiddleware, ApiAcceptHeaderMiddleware, LazyLoadingMiddleware
Piccolo\Http Handler (base class of the request handlers), error logging, request identifier
Piccolo\Console cache:clear, cache:warmup, routes:list
Piccolo\Paths The directories of the application, and the helpers app_path(), config_path(), storage_path(), ...

Application layout

The kernel expects this layout, from the root directory given to Kernel::boot():

The definitions of config/container.php are registered after the providers of the framework, so they can replace them (another logger, another PSR-7 implementation with new HttpFactoryServiceProvider(...), ...).

Lifetimes and worker mode

Lifetime Framework services
Singleton configuration, environment, paths, PSR-17 factories, logger, router and routing middlewares, pipeline, application, error handler, Problem Details, CORS, template renderer
Scoped none: for the services of the application with a per-request state (unit of work, current user, ...)
Transient the classes that are not registered: request handlers, middlewares, ...

Each request is handled in its own scope: the middlewares and handlers piped or routed as class names are resolved from it, and the scope is disposed once the response is created.

When the script is run by a FrankenPHP worker (frankenphp_handle_request() exists and $_SERVER['FRANKENPHP_WORKER'] is set), the kernel is booted once, and the requests are handled in a loop. After each request, the singletons holding a state are reset (Monolog buffers and processors, the request identifier, ...) and the garbage collector runs. The worker stops after MAX_REQUESTS requests (unlimited by default) so that FrankenPHP restarts it.

Rule of thumb in a worker: never keep a request state in a singleton: make the service scoped, or reset it (implement Piccolo\Container\Resettable, or register a hook with $builder->onReset()).

Tests


All versions of piccolo-framework with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
borschphp/config Version ^1.4
debuss-a/attribute-routing Version ^3.0
debuss-a/awareness Version ^1.2
debuss-a/piccolo-container Version ^0.1
debuss-a/server-request-factory Version ^1.0
laminas/laminas-diactoros Version ^3.8
laminas/laminas-httphandlerrunner Version ^2.13
laminas/laminas-stratigility Version ^4.3
league/plates Version ^3.6
mezzio/mezzio-cors Version ^1.16
mezzio/mezzio-fastroute Version ^3.14
mezzio/mezzio-helpers Version ^5.20
mezzio/mezzio-platesrenderer Version ^2.14
mezzio/mezzio-problem-details Version ^1.19
mezzio/mezzio-router Version ^4.2
mezzio/mezzio-template Version ^3.0
monolog/monolog Version ^3.10
psr/container Version ^2.0
psr/http-factory Version ^1.1
psr/http-message Version ^2.0
psr/http-server-handler Version ^1.0
psr/http-server-middleware Version ^1.0
psr/log Version ^3.0
symfony/console Version ^8.1
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 debuss-a/piccolo-framework contains the following files

Loading the files please wait ...