Download the PHP package teknoo/recipe without Composer

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

Teknoo Software - Recipe library

Latest Stable Version Latest Unstable Version Total Downloads License PHPStan

Inspired by cooking, allows the creation of dynamic algorithm, called here recipe, following the #east programming and using middleware, configurable via DI or any configuration, if a set of conditions (ingredients) are available.

A complete documentation is available in documentation/README.md

Quick Example

<?php

declare(strict_types=1);

use Teknoo\Recipe\Dish\DishClass;
use Teknoo\Recipe\Ingredient\Ingredient;
use Teknoo\Recipe\Recipe;
use Teknoo\Recipe\Chef;
use Teknoo\Recipe\ChefInterface;
use Teknoo\Recipe\Promise\Promise;

require 'vendor/autoload.php';

$recipe = new Recipe();

$recipe = $recipe->require(
    new Ingredient(\DateTime::class, 'date')
);

$recipe = $recipe->cook(
    function (\DateTime $date, ChefInterface $chef): void {
        $date = $date->setTimezone(new \DateTimeZone('UTC'));

        $chef->continue(['date' => $date]);
    },
    'convertToUTC'
);

$recipe = $recipe->cook(
    function (\DateTime $date, ChefInterface $chef): void {
        $immutable = \DateTimeImmutable::createFromMutable($date);

        $chef->finish($immutable);
    },
    'immutableDate'
);

$output = '';
$recipe = $recipe->given(
    new DishClass(
        \DateTimeImmutable::class,
        new Promise(
            function (\DateTimeImmutable $immutable) use (&$output): void {
                $output = $immutable->format('Y-m-d H:i:s T');
            },
            function (\Throwable $error) use (&$output): void {
                $output = $error->getMessage();
            }
        )
    )
);

$chef = new Chef;
$chef->read($recipe);
$chef->process(['date' => new \DateTime('2020-06-27 00:00:00', new \DateTimeZone('Europe/Paris'))]);

//Show : 2020-06-26 22:00:00 UTC
echo $output.PHP_EOL;

Others examples are available into demo

A complete documentation is available in documentation/README.md

Support this project

This project is free and will remain free. It is fully supported by the activities of the EIRL. If you like it and help me maintain it and evolve it, don't hesitate to support me on Patreon or Github.

Thanks :) Richard.

Credits

EIRL Richard Déloge - https://deloge.io - Lead developer. SASU Teknoo Software - https://teknoo.software

About Teknoo Software

Teknoo Software is a PHP software editor, founded by Richard Déloge, as part of EIRL Richard Déloge. Teknoo Software's goals : Provide to our partners and to the community a set of high quality services or software, sharing knowledge and skills.

License

Recipe is licensed under the MIT License - see the licenses folder for details.

Installation & Requirements

To install this library with composer, run this command :

composer require teknoo/recipe

This library requires :

* PHP 8.1+
* A PHP autoloader (Composer is recommended)
* Teknoo/Immutable.
* Teknoo/States.

News from Teknoo Recipe 4.0

This library requires PHP 8.1 or newer. Some change causes bc breaks.

News from Teknoo Recipe 3.1

This library requires PHP 8.0 or newer.

News from Teknoo Recipe 3.0

This library requires PHP 8.0 or newer. Some change causes bc breaks.

News from Teknoo Recipe 2.0

This library requires PHP 7.4 or newer. Some change causes bc breaks :

Contribute :)

You are welcome to contribute to this project. Fork it on Github


All versions of recipe with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
teknoo/immutable Version ^3.0.18
teknoo/states Version ^6.4.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 teknoo/recipe contains the following files

Loading the files please wait ....