Download the PHP package zlikavac32/symfony-extras without Composer

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

Symfony extras

Build Status

This repository adds a few extra functionality that I miss in the Symfony components. Functionality is currently only DIC and console related.

Table of contents

  1. Introduction
  2. Installation
  3. Usage
    1. Runnable
    2. Dynamic service decorators and service linker
    3. Dynamic event dispatchers
    4. Dynamic composite services
  4. Examples

Introduction

Idea of this library is to use what you need. No dependency is explicitly required as no code is run by default. It provides few things, like various compiler passes to make a life a bit easier.

Compiler passes are all idempotent.

Installation

Recommended installation is through Composer.

Usage

Different concepts exist in this library.

Runnable

symfony/console is a great package, but one can get into trouble when trying to decorate commands. This library defines \Zlikavac32\SymfonyExtras\Command\Runnable\Runnable interface which is then injected into \Zlikavac32\SymfonyExtras\Command\Runnable\RunnableCommand.

DIC compiler pass that automates this is provided in \Zlikavac32\SymfonyExtras\DependencyInjection\Compiler\ConsoleRunnablePass.

Read more about this concept in docs/runnable.md.

Dynamic service decorators and service linker

Symfony provides out of the box service decoration, but it can get messy when there is to much decoration involved. This library offers two compiler passes to tackle that. First is \Zlikavac32\SymfonyExtras\DependencyInjection\Compiler\DecoratorPass and the second is \Zlikavac32\SymfonyExtras\DependencyInjection\Compiler\ServiceLinkerPass.

Idea is to define template services that are decorators, and then tag services that need decoration. Since certain decorators need other services or arguments, service linker is used to link services through tags.

Read more about this concept in docs/linker.md.

Dynamic event dispatchers

Symfony provides \Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass to register event dispatchers. Compiler pass that can automate that process is provided in \Zlikavac32\SymfonyExtras\DependencyInjection\Compiler\EventDispatcherPass.

Read more about this concept in docs/dynamic-event-dispatcher.md.

Dynamic composite services

Certain services have composite nature in a sense that they require other services either in their constructor, or through method injection. Symfony provides solution in some degree through tagged service injection. This library provides compiler pass in \Zlikavac32\SymfonyExtras\DependencyInjection\Compiler\DynamicCompositePass that provides a bit more functionality.

Read more about this concept in docs/dynamic-composite.md.

One might say that here is to much magic involved, but if you understand how it all works, there is hardly any magic left.

buildMapOfTagsAndServiceIds()

Method findTaggedServiceIds() on the \Symfony\Component\DependencyInjection\ContainerBuilder finds tags in linear time depending on the number of services, so for M queries and N services, we have N * M operations.

Function buildMapOfTagsAndServiceIds() provided in this repo builds a map of tag names to the sets of service ids that are tagged with them. If we assume access to the hash map is in constant time, now we have N + M operations.

Do note that by not calling findTaggedServiceIds(), method \Symfony\Component\DependencyInjection\ContainerBuilder::findUnusedTags() will return more tags than it should. If you relay on that method, then this library is not for you.

Examples

Check examples folder for examples.


All versions of symfony-extras with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
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 zlikavac32/symfony-extras contains the following files

Loading the files please wait ....