Download the PHP package alexanderallen/panettone without Composer

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

Image by @blackieshoot at Unsplash

GitHub Actions Workflow Status Coveralls License Version

Panettone

Panettone is a CLI tool for extracting PHP types from Open API schemas. Types are generated by interpreting the data model (schema) of Open API documents. Unlike Api Platform's schema generator, it does not determine types using path and operations.

Update September 2024

Update July 2024

Pre-release 0.2.3 introduces an initial set of functional structures to be used in the future for Open API parsing.

Installation

composer require alexanderallen/panettone
vendor/bin/panettone --help

As Panettone is not a CLI tool and not a library, I recommend that you install it to your project's tools directory, as such:

mkdir -p tools
cd tools
composer require alexanderallen/panettone
cd ..
vendor/bin/panettone --help

Example

vendor/bin/panettone schema/my-saucy-schema.yaml tmp vendor/alexanderallen/panettone/test/schema/settings.ini

In the example above, Panettone will:

Usage

vendor/bin/panettone --help

Description:
  Generate PHP types from Open API sources.

Usage:
  panettone <input> [<output> [<config>]]

Arguments:
  input                 Path to Open Api source file in YAML format
  output                Destination for generated files
  config                Path to .ini configuration file [default: "settings.ini"]

Options:
  -h, --help            Display help for the given command. When no command is given display help for the panettone command
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  Generates PHP types from a Open API source.

Configuration

Panettone is configured by placing a settings.ini in the directory from where you are executing Panettone, usually where your composer.json is.

Below is a list of the currently supported configuration options. Do note that the [file], [class] segments are required when using the options listed under them.

; Enable detailed logging during type generation.
debug = true

[file]
; Path where to dump the generated file.
output_path = "tmp"

; Namespace for all generated files.
namespace = "Panettone"

; Comment to apply to every generated file.
comment = "Example file comments are configured in settings.ini."

[class]
nullable = true
default = null

Testing

Tests are located in the tests directory. PHPUnit is installed separately in the tools/phpunit directory.

To test, first use Composer to install PHPUnit then run the test script.

composer -d tools/phpunit install
. tools/phpunit/test

Coverage

Coverage details are gathered during testing in Github and pushed to Coveralls.


All versions of panettone with dependencies

PHP Build Version
Package Version
Requires psr/log Version ^3.0
symfony/console Version ^6.0
loophp/collection Version ^7.5
cebe/php-openapi Version ^1.7
nette/php-generator Version ^4.1
widmogrod/php-functional Version dev-master
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 alexanderallen/panettone contains the following files

Loading the files please wait ....