Download the PHP package nucleos/sonata-auto-configure-bundle without Composer

On this page you can find all versions of the php package nucleos/sonata-auto-configure-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 sonata-auto-configure-bundle

SonataAutoConfigureBundle

Latest Stable Version Latest Unstable Version

Total Downloads Monthly Downloads Daily Downloads

Continuous Integration Code Coverage

Tries to auto configure your admin classes and extensions, so you don't have to.

This is a fork of the no longer maintained kunicmarko/sonata-auto-configure-bundle.

Documentation

Installation

1. Add dependency with Composer

2. Enable the bundle for all Symfony environments:

Configuration

How does it work

This bundle tries to guess some stuff about your admin class. You only have to create your admin classes and be sure that the admin directory is included in auto discovery and that autoconfigure is enabled.

This bundle will tag your admin classes with sonata.admin, then we find all admin classes and if autoconfigure is enabled we take the class name. If you defined a suffix in the config (by default it is Admin) we remove it to get the name of the entity, so if you had CategoryAdmin we get Category.

After that we check if the Admin attribute is present, attributes have a higher priority than our guesses. If no attribute is defined or some of the values that are mandatory are not present we still try to guess.

First, we set the label and based on previous example it will be Category.

Then, we set the admin code which will be the service id, in our case it is the class name.

After, we try to find the Category entity in the list of namespaces you defined (by default it is just App\Entity). If the entity is not found an exception is thrown and you will probably need to use an attribute to define the entity. You can set the manager_type attribute per namespace.

By default we will take manager_type from attributes, if they are not present we will take it from the namespace definition. If you define the entity in your attribute but not the manager_type then we will take the manager type from the bundle configuration that will be available as a sonata_auto_configure.admin.manager_type parameter.

Then we try to guess a controller, same as for the entity we try to guess it in the list of namespaces but we add a suffix (as in most situations people name it CategoryController) that you can disable in configuration. If there is no controller we leave it as null and sonata will add its default controller.

And that is it. We have all the info we need for defining an admin class, if you used some of the other tag options when defining your admin class you will have to use attribute or register admin on your own with autoconfigure: false that would look like:

Attribute

AdminExtension


All versions of sonata-auto-configure-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
doctrine/inflector Version ^2.0.4
sonata-project/admin-bundle Version ^4.7
symfony/config Version ^6.4 || ^7.0
symfony/dependency-injection Version ^6.4 || ^7.0
symfony/http-kernel Version ^6.4 || ^7.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 nucleos/sonata-auto-configure-bundle contains the following files

Loading the files please wait ....