Download the PHP package cosmologist/symfony-common-bundle without Composer

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

SymfonyCommonBundle

Useful features for Symfony, Doctrine, Twig etc.

Debug

Easy way to start debug with RunnerCommand

If you are using PhpStorm, then an easy way to use this feature is to create an external tool (File-> Settings-> Tools-> External Tools) with parameters:

After that, select Tools -> External Tools -> Runner - the command will try to execute a function or method from where the cursor is currently located.
At this point, execution will not automatically stop at the specified location - you must manually set a breakpoint.

Doctrine

Extra DBAL events

Cosmologist\Bundle\SymfonyCommonBundle\Doctrine\ExtraConnection is Doctrine DBAL-connection wrapper that add useful features and methods to DBAL.

Activation

Add the wrapper_class parameter to the Doctrine DBAL connection configuration in config.yml to use:

Additional DBAL-events

postBeginTransaction, postCommit, postRollback

Helper methods

Connection::fetchAllIndexed prepares and executes an SQL query and returns the result as an associative array, each row in the result set array is indexed by the value of the first column.

Doctrine Utils

Get Doctrine utils

Get real class of Doctrine entity (resolve entity proxy class)
Supports Doctrine < 3.x and Doctrine > 3.x

Simple way to get doctrine entity metadata

Get the target class name of the given association path (ie "contact.user") recursively

Get entity identifier field name (does not support multiple identifiers - throws DoctrineUtilsException)

Get entity identifier value (does not support multiple identifiers - throws DoctrineUtilsException)

Determine if the object or FQCN is a Doctrine entity (under Doctrine control) or not

Get the readable alias for the doctrine entity

Perform recursively join operation of the given association path (ie "contact.user.type")

Attention: method doesn't care about alias uniqueness

Add a join to the query once Merge multipleDoctrine\Common\Collections\Criteriainto a oneDoctrine\Common\Collections\Criteria`

Routing

Forwards to another URI.
Like Symfony\Bundle\FrameworkBundle\Controller\Controller::forward, but using URI.

Security

Command for interactive setup ACLs and ACEs

ROLE_SUPER_USER

Cosmologist\Bundle\SymfonyCommonBundle\Security\Voter\SuperUserRoleVoter adds a special role "ROLE_SUPER_USER" which effectively bypasses any, and all security checks.

The service Crypto

The service Crypto provides functions for the simple symmetric encryption.
The framework.secret used as a key to encryption.

Dependency Injection

Convenient way to get a Reference to a Doctrine DBAL connection

Convenient way to get a Reference to a Doctrine EntityManager

Store key as attribute in configuration

Useful for:

Usage:

Config like this:

comes out like:

ServiceBridge

A convenient way to dynamically access symfony services.

Call Symfony services over HTTP

Include routing.yml
Send POST-request

URL example:

or

Method arguments must be passed as POST parameters. ServiceBridge automatically fetches a Doctrine entity if the method expects an argument of the entity (the hint type of the argument).

The method arguments should be passed as POST-parameters.
ServiceBridge fetch entity from Doctrine automatically, by the identifier from request, if method expects entity argument (argument type-hint).

Caution: Use security access_control option to restrict access to the service controller.

Return types to response types map

Static access to the service container from anywhere

Twig

Pagination template (Bootstrap friendly)

Inject any callable to the Twig

See also: umpirsky/twig-php-function

Monolog

Monolog activation strategy for Symfony 3.x to skip the 404 HttpException records.

Monolog NotFoundActivationStrategy (activation_strategy, excluded_404s and excluded_http_codes options) does not work in Symfony 3.0 as currently monolog-bundle injects a reference to request from the service container into the NotFoundActivationStrategy.

TODO

Usage

BrowserKit

Add the specified HTTP-header to the prepared BrowserKit request `

Dump configuration files for external related applications

Useful when you want to deduplicate application parameters (like db-connections, paths etc) and store related external applications configurations (backup-systems, crontab etc) inside the project.

Example

Configuration for abstract backup-system

Configuration file template:

Define parameters for dist:

Run dumper:

And config should be dumped to app/cache/prod/external_config/backup.yml (without .twig extension)


All versions of symfony-common-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
cosmologist/gears Version ^3.0.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 cosmologist/symfony-common-bundle contains the following files

Loading the files please wait ....