Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/api/field_type_storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ which you must implement in your Field Type. The interface contains the followin
|`toFieldDefinition`|Converts the other way around.|
|`getIndexColumn()`|Returns the storage column which is used for indexing either `sort_key_string` or `sort_key_int`.|

Just like a Type, a Legacy Converter needs to be registered and tagged in the [service container](../api/service_container.md).
Just like a Type, a Legacy Converter needs to be registered and tagged in the [service container](../api/public_php_api.md#service-container).

#### Registering a converter

Expand Down
2 changes: 1 addition & 1 deletion docs/api/field_type_type_and_value.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ If you need to inject other services into your Type class, skip using the `paren
Like most API components, Field Types use the [Symfony service tag mechanism]([[= symfony_doc =]]/service_container/tags.html).

A service can be assigned one or several tags, with specific parameters.
When the [service container](../api/service_container.md) is compiled into a PHP file,
When the [service container](../api/public_php_api.md#service-container) is compiled into a PHP file,
tags are read by `CompilerPass` implementations that add extra handling for tagged services.
Each service tagged as `ibexa.field_type` is added to a [registry](http://martinfowler.com/eaaCatalog/registry.html) using the `alias` key as its unique `fieldTypeIdentifier` e.g. `ezstring`.
Each Field Type must also inherit from the abstract `ibexa.field_type` service.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/field_types_reference/measurementfield.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ or a pair of values that defines a range.
### Input expectations

To create a value, you use a service that implements `Ibexa\Contracts\Measurement\MeasurementServiceInterface`.
You must inject the service directly with [dependency injection](../../api/service_container.md).
You must inject the service directly with [dependency injection](../../api/public_php_api.md#service-container).
The service contains the following API endpoints:

- `buildSimpleValue` that is used to handle a single value
Expand Down
15 changes: 15 additions & 0 deletions docs/api/public_php_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,18 @@ try {
$output->writeln("<error>Permission denied on content with id $contentId</error>");
}
```

## Service container

[[= product_name =]] uses the [Symfony service container]([[=symfony_doc=]]/service_container.html) for dependency resolution.

[Symfony dependency injection]([[=symfony_doc=]]/components/dependency_injection.html) ensures that any required services are available in your custom code
(for example, controllers) when you inject them into the constructor.

Symfony service container uses service tags to dedicate services to a specific purpose. They are usually used for extension points.

[[= product_name =]] exposes multiple features using service tags, for example, Field Types.

!!! tip

For a list of all service tags exposed by Symfony, see its [reference documentation]([[=symfony_doc=]]/reference/dic_tags.html).
Comment on lines +162 to +164
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a follow up: we should have a similar page with Ibexa service tags.

2 changes: 1 addition & 1 deletion docs/api/public_php_api_browsing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

To retrieve a Content item and its information, you need to make use of the [`ContentService`](https://github.com/ibexa/core/blob/main/src/contracts/Repository/ContentService.php).

The service should be [injected into the constructor of your command or controller](../api/service_container.md).
The service should be [injected into the constructor of your command or controller](../api/public_php_api.md#service-container).

!!! tip "Console commands"

Expand Down
2 changes: 1 addition & 1 deletion docs/api/public_php_api_search.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To do this, you can use the [`SearchService`](#searchservice) or [Repository fil
[`SearchService`](https://github.com/ibexa/core/blob/main/src/contracts/Repository/SearchService.php)
enables you to perform search queries using the PHP API.

The service should be [injected into the constructor of your command or controller](../api/service_container.md).
The service should be [injected into the constructor of your command or controller](../api/public_php_api.md#service-container).

!!! tip "SearchService in the Back Office"

Expand Down
32 changes: 0 additions & 32 deletions docs/api/service_container.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/guide/config_dynamic.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ You can also use the [autowire feature]([[= symfony_doc =]]/service_container/au

!!! tip

For more information about dependency injection, see [Service container](../api/service_container.md).
For more information about dependency injection, see [Service container](../api/public_php_api.md#service-container).

!!! note

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ These files contain additional settings and point to the general (not environmen

!!! note

Configuration is tightly related to the [service container](../api/service_container.md).
Configuration is tightly related to the [service container](../api/public_php_api.md#service-container).
To fully understand it, you must be familiar with the service container and [its configuration]([[= symfony_doc =]]/service_container.html#service-parameters).

Basic configuration handling in [[= product_name =]] is similar to what is commonly possible with Symfony.
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/custom_policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The content Repository uses [Roles and Policies](permissions.md) to give Users access to different functions of the system.

Any bundle can expose available Policies via a `PolicyProvider` which can be added to IbexaCoreBundle's [service container](../api/service_container.md) extension.
Any bundle can expose available Policies via a `PolicyProvider` which can be added to IbexaCoreBundle's [service container](../api/public_php_api.md#service-container) extension.

## PolicyProvider

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/devops.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Clearing file cache using the Symfony cache:clear command

Symfony provides a command for clearing cache. It will delete all file-based caches, which mainly consist of a Twig template, a [service container](../api/service_container.md), and the Symfony route cache, but also everything else stored in the cache folder. Out of the box on a single-server setup this includes Content cache. For further information on the command's use, see its help text:
Symfony provides a command for clearing cache. It will delete all file-based caches, which mainly consist of a Twig template, a [service container](../api/public_php_api.md#service-container), and the Symfony route cache, but also everything else stored in the cache folder. Out of the box on a single-server setup this includes Content cache. For further information on the command's use, see its help text:

``` bash
php bin/console --env=prod cache:clear -h
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/multisite/injecting_siteaccess.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Injecting SiteAccess

The [service container](../../api/service_container.md) exposes the SiteAccess through the `Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessService` service, which fulfills the `Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessServiceInterface` contract.
The [service container](../../api/public_php_api.md#service-container) exposes the SiteAccess through the `Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessService` service, which fulfills the `Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessServiceInterface` contract.
This means you can inject it into any custom service constructor, type hinting that contract.
You can get the current SiteAccess from that service by calling the `SiteAccessServiceInterface::getCurrent` method.

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/multisite/siteaccess_aware_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ acme_example:
### Mapping to internal settings

Semantic configuration must always be mapped to internal key/value settings within the service container.
You usually do it in the [service container](../../api/service_container.md) extension.
You usually do it in the [service container](../../api/public_php_api.md#service-container) extension.

``` php
<?php
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/payment/payment_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ that was provided by the payment gateway. For this, the interface provides the `
A payment plugin (and most payment gateways) requires storing the return URLs in the extended data of the `PaymentInstruction` entity.
This is because the related basket/order ID needs to be appended to the URL to determine the basket
and the related payment instruction for further processing in the returning URL requests.
It is impossible to configure the URLs via the [service container](../../api/service_container.md), as the basket ID is determined dynamically.
It is impossible to configure the URLs via the [service container](../../api/public_php_api.md#service-container), as the basket ID is determined dynamically.

You must implement this interface for every payment plugin,
if more than the standard fields like amount are necessary for the payment process.
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/persistence_cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ This service is an instance of `Symfony\Component\Cache\Adapter\TagAwareAdapterI

##### With service container

Like any other service, you can also get the cache service with the [service container](../api/service_container.md) like so:
Like any other service, you can also get the cache service with the [service container](../api/public_php_api.md#service-container) like so:

``` php
// Getting the cache service in PHP
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/search/extend_solr.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Each mapper implements two methods, by the same name, but accepting different ar
- `::accept(Location $content)`
- `::mapFields(Location $content)`

Mappers can be used on the extension points by registering them with the [service container](../../api/service_container.md) by using service tags, as follows:
Mappers can be used on the extension points by registering them with the [service container](../../api/public_php_api.md#service-container) by using service tags, as follows:

- All block documents
- `ContentFieldMapper`
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/search/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Content Search explicitly refuses to accept Criteria and Sort Clauses implementi

#### Configuring custom Criterion and Sort Clause handlers

After you have implemented your Criterion / Sort Clause and its handler, you will need to configure the handler for the [service container](../../api/service_container.md) by using dedicated service tags for each type of search. Doing so will automatically register it and handle your Criterion / Search Clause when it is given as a parameter to one of the Search Service methods.
After you have implemented your Criterion / Sort Clause and its handler, you will need to configure the handler for the [service container](../../api/public_php_api.md#service-container) by using dedicated service tags for each type of search. Doing so will automatically register it and handle your Criterion / Search Clause when it is given as a parameter to one of the Search Service methods.

Available tags for Criterion handlers in Legacy Storage Engine are:

Expand Down
8 changes: 4 additions & 4 deletions docs/releases/ez_platform_v3.0_deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ For more information, see the Doctrine connection configuration example in the [

## Field Types

The following tags used to register Field Type features in the [service container](https://doc.ibexa.co/en/latest/guide/service_container) have been renamed:
The following tags used to register Field Type features in the [service container](https://doc.ibexa.co/en/latest/guide/api/public_php_api.md#service-container) have been renamed:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broken link

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link and the others will be fixed when this PR is merged (because the releases section uses absolute links, they only work after merging).


|Former name|New name|
|-----------|--------|
Expand Down Expand Up @@ -90,7 +90,7 @@ The following Symfony Service definitions that provide extension point to create

The `ezstudio.installer.studio_installer` service has been renamed to the FQCN-named
service `EzSystems\EzPlatformEnterpriseEditionInstallerBundle\Installer\Installer`.
Deprecated `ezplatform.ee.installer.class` [service container](https://doc.ibexa.co/en/latest/guide/service_container) parameter has been removed.
Deprecated `ezplatform.ee.installer.class` [service container](https://doc.ibexa.co/en/latest/guide/api/public_php_api.md#service-container) parameter has been removed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broken link


See [eZ Platform v3.0 project update instructions](https://doc.ibexa.co/en/latest/updating/4_8_upgrade_rest/#custom-installers) for upgrade details.

Expand Down Expand Up @@ -475,7 +475,7 @@ Do not store the values globally. Every time the value is needed call `ConfigRes

#### AbstractController

The `eZ\Bundle\EzPublishCoreBundle\Controller` now extends `Symfony\Bundle\FrameworkBundle\Controller\AbstractController` instead of `Symfony\Bundle\FrameworkBundle\Controller\Controller` which has limited access to the [service container](https://doc.ibexa.co/en/latest/guide/service_container).
The `eZ\Bundle\EzPublishCoreBundle\Controller` now extends `Symfony\Bundle\FrameworkBundle\Controller\AbstractController` instead of `Symfony\Bundle\FrameworkBundle\Controller\Controller` which has limited access to the [service container](https://doc.ibexa.co/en/latest/guide/api/public_php_api.md#service-container).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broken link

For details, see [Service Subscribers Locators](https://symfony.com/doc/5.0/service_container/service_subscribers_locators.html).

The `Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand` is deprecated, use `Symfony\Component\Console\Command\Command` instead.
Expand Down Expand Up @@ -691,7 +691,7 @@ The deprecated `Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesserI

### Symfony service container

The deprecated Symfony [service container](https://doc.ibexa.co/en/latest/guide/service_container) parameters ending with `.class` have been removed, services relying on them now have their classes defined explicitly.
The deprecated Symfony [service container](https://doc.ibexa.co/en/latest/guide/api/public_php_api.md#service-container) parameters ending with `.class` have been removed, services relying on them now have their classes defined explicitly.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broken link

To properly decorate a Symfony service, use the `decorates` attribute instead.
For the full list of the dropped parameters, see
[kernel documentation.](https://github.com/ezsystems/ezpublish-kernel/blob/master/doc/bc/1.0/dropped-container-parameters.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/updating/from_1.x_2.x/update_db_to_2.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ Version v2.5.18 introduces new entity managers.
To ensure that they work in multi-repository setups, you must update the GraphQL schema.
You do this manually by following this procedure:

1. Update your project to v2.5.18 and run the `php bin/console cache:clear` command to generate the [service container](../../api/service_container.md).
1. Update your project to v2.5.18 and run the `php bin/console cache:clear` command to generate the [service container](../../api/public_php_api.md#service-container).

1. Run the following command to discover the names of the new entity managers.
Take note of the names that you discover:
Expand Down
2 changes: 1 addition & 1 deletion docs/updating/from_2.5/update_code/9_update_other.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ If your code uses them, you must rewrite it to use the permission resolver.

## Service container parameters

A number of Symfony [service container](../../../api/service_container.md) parameters [have been dropped](https://github.com/ezsystems/ezplatform-kernel/blob/v1.0.0/doc/bc/1.0/dropped-container-parameters.md).
A number of Symfony [service container](../../../api/public_php_api.md#service-container) parameters [have been dropped](https://github.com/ezsystems/ezplatform-kernel/blob/v1.0.0/doc/bc/1.0/dropped-container-parameters.md).

Check if your code uses such invalid parameters: search for them by using the `ezpublish\..*\.class` regular expression pattern.
When found, replace all the occurrences with fully-qualified class names.
Expand Down
3 changes: 1 addition & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ nav:
- 'Data migration API': 'api/public_php_api_managing_migrations.md'
- 'User API': 'api/public_php_api_managing_users.md'
- 'Shop API': 'api/shop_business_api.md'
- 'URL API': 'api/public_php_api_url_service.md'
- 'Service container': 'api/service_container.md'
- 'URL API': 'api/public_php_api_url_service.md'
- Field Type:
- 'Field Type API': 'api/field_type_api.md'
- 'Type and Value': 'api/field_type_type_and_value.md'
Expand Down