Download the PHP package stellarwp/foundation-container without Composer

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

Foundation Container

[!WARNING] This is a read-only repository! For pull requests or issues, see stellarwp/foundation.

The DI Container configuration and Service Provider implementation, utilizing di52.

Installation

Container Configuration

Create a new ContainerAdapter, by passing in an instance of di52:

Here is an example Service Provider:

Environment Variable Configuration

This library uses the Dot package to set and fetch configuration values, which are initially provided via Environment Variables, either manually set or via an .env file utilizing vlucas/phpdotenv to read them.

Each Service Provider will have access to Dot via the $this->config property, it is best practice to only access configuration variables from a Service Provider and never in your concrete classes.

Making a config.php

A sample config.php for a project. Note: we fall back to sane defaults if the environment variable isn't available.

Inside a Provider, we can then access deep variables with dot notation, e.g.

💡 If using a config.php in a WordPress plugin, simply add your configured $_ENV vars in your wp-config.php.


All versions of foundation-container with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
adbario/php-dot-notation Version >=2.5
lucatume/di52 Version >=4.1
stellarwp/container-contract Version ^1.1
vlucas/phpdotenv Version >=4.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 stellarwp/foundation-container contains the following files

Loading the files please wait ...