Download the PHP package cspray/annotated-container without Composer

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

AnnotatedContainer

Unit Tests

A Dependency Injection framework for creating an autowired, feature-rich, PSR-11 compatible Container using PHP 8 Attributes!

Quick Start

This quick start is intended to get you familiar with Annotated Container's core functionality and get a working Container created. First, a simple example showing how an interface can be aliased to a concrete Service. After that we'll show you how to get a Container to create the Service.

Code Example

This example is built upon in the docs. Check out the tutorials for more examples of Annotated Container's functionality!

Bootstrapping Your Container

Annotated Container ships with a built-in CLI tool to easily create a configuration detailing how to build your Container and a corresponding Cspray\AnnotatedContainer\Bootstrap\Bootstrap implementation to create your Container using that configuration. It is highly recommended to use the provided tooling to create your Container.

The CLI tool offers extensive documentation detailing how to run commands and what options are available. If you're ever looking for more info run: ./vendor/bin/annotated-container help

The first step is to create the configuration. By default, the tooling will look at your composer.json to determine what directories to scan and create a directory that the ContainerDefinition can be cached in. Run the following command to complete this step.

The configuration file will be created in the root of your project named "annotated-container.xml". The cache directory will also be created in the root of your project named ".annotated-container-cache". Check out the command's help documentation for available options, including how to customize these values.

Be sure to review the generated configuration! A "normal" Composer setup might result in a configuration that looks like the following. If there are any directories that should be scanned but aren't listed in <source></source> be sure to include them. Conversely, if there are directories included that shouldn't be scanned be sure to remove them.

Now, bootstrap your Container in your app.

Installation

Choose a Backing Container

AnnotatedContainer does not provide any of the actual Container functionality. We provide Attributes and definition objects that can determine how actual implementations are intended to be setup. AnnotatedContainer currently supports the following backing Containers:

rdlowrey/auryn

php-di/php-di

illuminate/container

Documentation

This library is thoroughly documented in-repo under the /docs directory. The documentation is split into three parts; Tutorials, How Tos, and References.

Tutorials are where you'll want to start. It'll expand on the examples in the "Quick Start" and teach you how to do most of the things you'll want to do with the library. This documentation tends to split the difference between the amount of code and the amount of explanation.

How Tos are where you'll go to get step-by-step guides on how to achieve specific functionality. These documents tend to be more code and less explanation. We assume you've gotten an understanding of the library and have questions on how to do something beyond the "normal" use cases.

References are where you can get into the real internal, technical workings of the library. List of APIs and more technically-explicit documentation can be found here. References may be a lot of code, a lot of explanation, or a split between the two depending on the context.

Roadmap

The Roadmap can be found in the annotated-container Project page.

External Resources

Notable Libraries Using Annotated Container

Blog Posts

Demos


All versions of annotated-container with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-dom Version *
ext-libxml Version *
composer-runtime-api Version ^2
brick/varexporter Version ^0.3.7
cspray/annotated-container-adr Version ^3
cspray/annotated-container-attribute Version ^1.3
cspray/annotated-target Version ^v0.3
cspray/precision-stopwatch Version ^0.2.0
cspray/typiphy Version ^0.3
nikic/php-parser Version ^4.10
ocramius/package-versions Version ^2.7
psr/container Version ^2.0
psr/log Version ^2 || ^3
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 cspray/annotated-container contains the following files

Loading the files please wait ....