Download the PHP package tourze/symfony-dependency-service-loader without Composer

On this page you can find all versions of the php package tourze/symfony-dependency-service-loader. 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 symfony-dependency-service-loader

Symfony Dependency Service Loader

简体中文

这个包为 Symfony Dependency Injection 组件提供了 AutoExtension 基类,用于自动加载服务配置。

特性

安装

使用方法

使用 AutoExtension

继承 AutoExtension 类:

配置文件结构

支持以下配置文件结构:

services.yaml(基础配置)

services_dev.yaml(开发环境)

services_test.yaml(测试环境)

使用 Doctrine 连接扩展

如果你的 Bundle 需要 Doctrine 连接配置,可以使用 AppendDoctrineConnectionExtension

此扩展会:

配置规则

允许的文件

只允许以下配置文件:

其他 YAML 文件会触发 InvalidYamlConfigurationException 异常

配置要求

  1. 必须包含 _defaults:所有配置文件必须包含 services._defaults 配置
  2. 禁止使用 exclude:服务配置中禁止使用 exclude 配置
  3. 必须包含 services:配置必须包含 services 顶级键

示例配置

错误配置(缺少 _defaults):

错误配置(使用 exclude):

正确配置

异常

可能抛出的异常:

Bundle 目录结构示例

环境配置加载逻辑

最佳实践

  1. 明确配置:避免使用 exclude,明确定义每个服务
  2. 环境分离:将环境特定的服务放在对应的配置文件中
  3. 统一标准:所有配置文件都应包含 _defaults 配置
  4. 配置验证:该扩展会自动验证配置文件的完整性和正确性

系统要求

许可证

MIT License

作者

  1. tourze 创始作者

All versions of symfony-dependency-service-loader with dependencies

PHP Build Version
Package Version
Requires composer-runtime-api Version ^2.0
symfony/config Version ^7.3
symfony/dependency-injection Version ^7.3
symfony/polyfill-php85 Version ^1.31
symfony/yaml Version ^7.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 tourze/symfony-dependency-service-loader contains the following files

Loading the files please wait ...