Download the PHP package fotobank/strauss without Composer

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

fotobank/strauss

A tool to prefix namespaces and classnames in PHP files to avoid autoloading collisions.

A fork of Strauss for Composer for PHP.

The primary use case is WordPress plugins, where different plugins active in a single WordPress install could each include different versions of the same library. The version of the class loaded would be whichever plugin registered the autoloader first, and all subsequent instantiations of the class will use that version, with potentially unpredictable behaviour and missing functionality.

Breaking Changes

Use

Require as normal with Composer:

composer require --dev fotobank/strauss

and use vendor/bin/strauss to execute.

Or, download strauss.phar from releases,

Then run it from the root of your project folder using php strauss.phar.

Its use should be automated in Composer scripts.

or

Configuration

Strauss potentially requires zero configuration, but likely you'll want to customize a little, by adding in your composer.json an extra/strauss object. The following is the default config, where the namespace_prefix and classmap_prefix are determined from your composer.json's autoload or name key and packages is determined from the require key:

The following configuration is inferred:

The following configuration is default:

The rest of the configuration:

Autoloading

Strauss uses Composer's own tools to generate a classmap file in the target_directory and creates an autoload.php alongside it, so in many projects autoloading is just a matter of:

If you prefer to use Composer's autoloader, add your target_directory (default vendor-prefixed) to your autoload classmap and Strauss will not create its own autoload.php when run. Then run composer dump-autoload to include the newly copied and prefixed files in Composer's own classmap.

Motivation & Comparison to Mozart

Benefits over Mozart:

Strauss will read the Mozart configuration from your composer.json to enable a seamless migration.

Acknowledgements

Coen Jacobs, Brian Henry and all the contributors to Mozart, particularly those who wrote nice issues.


All versions of strauss with dependencies

PHP Build Version
Package Version
Requires composer/composer Version *
json-mapper/json-mapper Version ^2.2
symfony/console Version ^4|^5
symfony/finder Version ^4|^5
league/flysystem Version ^1.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 fotobank/strauss contains the following files

Loading the files please wait ....