Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/master' into 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrebenchuk committed Jan 18, 2016
2 parents 5fdc394 + c984724 commit 90b4715
Show file tree
Hide file tree
Showing 702 changed files with 17,237 additions and 9,617 deletions.
104 changes: 103 additions & 1 deletion UPGRADE-1.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ UPGRADE FROM 1.8 to 1.9

####AddressBundle
- `oro_address.address.manager` service was marked as private
- Validation `AbstractAddress::isRegionValid` was moved to `Oro\Bundle\AddressBundle\Validator\Constraints\ValidRegion` constraint

####CalendarBundle
- `oro_calendar.calendar_provider.user` service was marked as private
Expand All @@ -29,11 +30,92 @@ UPGRADE FROM 1.8 to 1.9

####DataAuditBundle
- `Oro\Bundle\DataAuditBundle\EventListener\KernelListener` added to the class cache and constructor have container as performance improvement
- `Oro\Bundle\DataAuditBundle\Entity\AbstractAudit` has `@InheritanceType("SINGLE_TABLE")`
- `audit-grid` and `audit-history-grid` based on `Oro\Bundle\DataAuditBundle\Entity\AbstractAudit` now. Make join to get your entity on grid

####DataGridBundle
- `Oro\Bundle\DataGridBundle\Datagrid\Builder::DATASOURCE_PATH` marked as deprecated. Use `Oro\Bundle\DataGridBundle\Datagrid\Common\DatagridConfiguration::DATASOURCE_PATH`.
- `Oro\Bundle\DataGridBundle\Datagrid\Builder::DATASOURCE_TYPE_PATH` marked as deprecated. Use `Oro\Bundle\DataGridBundle\Datagrid\Common\DatagridConfiguration::getAclResource`.
- `Oro\Bundle\DataGridBundle\Datagrid\Builder::DATASOURCE_ACL_PATH` marked as deprecated. Use `Oro\Bundle\DataGridBundle\Datagrid\Common\DatagridConfiguration::getAclResource`.
- `Oro\Bundle\DataGridBundle\Datagrid\Builder::BASE_DATAGRID_CLASS_PATH` marked as deprecated. Use `Oro\Bundle\DataGridBundle\Datagrid\Common\DatagridConfiguration::BASE_DATAGRID_CLASS_PATH`.
- `Oro\Bundle\DataGridBundle\Datagrid\Builder::DATASOURCE_SKIP_ACL_CHECK` marked as deprecated. Use `Oro\Bundle\DataGridBundle\Datagrid\Common\DatagridConfiguration::isDatasourceSkipAclApply`.
- `Oro\Bundle\DataGridBundle\Datagrid\Builder::DATASOURCE_SKIP_COUNT_WALKER_PATH` marked as deprecated. Use `Oro\Bundle\DataGridBundle\Datagrid\Common\DatagridConfiguration::DATASOURCE_SKIP_COUNT_WALKER_PATH`.
- Option "acl_resource" moved from option "source" to root node of datagrid configuration:

Before

```
datagrid:
acme-demo-grid:
... # some configuration
source:
acl_resource: 'acme_demo_entity_view'
... # some configuration
```

Now

```
datagrid:
acme-demo-grid:
acl_resource: 'acme_demo_entity_view'
... # some configuration
```

- Option of datagrid "skip_acl_check" is deprecated, use option "skip_acl_apply" instead. Logic of this option was also changed. Before this option caused ignorance of option "acl_resource". Now it is responsible only for indication whether or not ACL should be applied to source query of the grid. See [advanced_grid_configuration.md](.src/Oro/Bundle/DataGridBundle/Resources/doc/backend/advanced_grid_configuration.md) for use cases.

Before

```
datagrid:
acme-demo-grid:
... # some configuration
options:
skip_acl_check: true
```

Now

```
datagrid:
acme-demo-grid:
... # some configuration
source:
skip_acl_apply: true
... # some configuration
```

- Services with tag `oro_datagrid.extension.formatter.property` was marked as private
- JS collection models format changed to maintain compatibility with Backbone collections: now it is always list of models, and additional parameters are passed through the options

- Grid merge uses distinct policy

```
grid-name:
source:
value: 1
grid-name:
source:
value: 2
```

will result

```
grid-name:
source:
value: 2
```

instead of

```
grid-name:
source:
value:
- 1
- 2
```

####DistributionBundle:
- Fix `priority` attribute handling for `routing.options_resolver` tag to be conform Symfony standards. New behaviour: the higher the priority, the sooner the resolver gets executed.

Expand All @@ -54,6 +136,7 @@ UPGRADE FROM 1.8 to 1.9
- `oro_entity.entity_hierarchy_provider` service was marked as private.
- `oro_entity.entity_hierarchy_provider.class` parameter was removed.
- `oro_entity.entity_hierarchy_provider.all` service was added. It can be used if you need a hierarchy of all entities but not only configurable ones.
- Class `Oro\Bundle\EntityBundle\Provider\EntityContextProvider` was moved to `Oro\Bundle\ActivityBundle\Provider\ContextGridProvider` and `oro_entity.entity_context_provider` service was moved to `oro_activity.provider.context_grid`.

####EntityConfigBundle
- Removed `optionSet` field type deprecated since v1.4. Existing options sets are converted to `Select` or `Multi-Select` automatically during the Platform update.
Expand Down Expand Up @@ -133,12 +216,16 @@ after:
- Added `Oro\Bundle\ImportExportBundle\Formatter\ExcelDateTimeTypeFormatter` as default formatter for the date, time and datetime types in `Oro\Bundle\ImportExportBundle\Serializer\Normalizer\DateTimeNormalizer`. This types exported/imported depends on the application locale and timezone and recognized as dates in Microsoft Excel.
- `Oro\Bundle\ImportExportBundle\Field\DatabaseHelper::getRegistry` is deprecated. Use class methods instead of disposed registry
- Services with tag `oro_importexport.normalizer` was marked as private
- Allow to omit empty identity fields. To use this feature set `Use As Identity Field` option to `Only when not empty
` (-1 or `Oro\Bundle\ImportExportBundle\Field\FieldHelper::IDENTITY_ONLY_WHEN_NOT_EMPTY` in a code)

####InstallerBundle
- `Oro\Bundle\InstallerBundle\EventListener\RequestListener` added to the class cache as performance improvement

####LayoutBundle
- `Oro\Bundle\LayoutBundle\EventListener\ThemeListener` added to the class cache as performance improvement
- The theme definition should be placed at theme folder and named `theme.yml`, for example `DemoBundle/Resources/views/layouts/first_theme/theme.yml`
- Deprecated method: placed at `Resources/config/oro/` and named `layout.yml`, for example `DemoBundle/Resources/config/oro/layout.yml`

####LocaleBundle
- `Oro\Bundle\LocaleBundle\EventListener\LocaleListener` added to the class cache and constructor have container as performance improvement
Expand All @@ -150,6 +237,9 @@ after:
- `Oro\Bundle\NavigationBundle\Event\AddMasterRequestRouteListener` added to the class cache as performance improvement
- `Oro\Bundle\NavigationBundle\Event\RequestTitleListener` added to the class cache as performance improvement

####NoteBundle
- Added parameter `DoctrineHelper $doctrineHelper` to constructor of `\Oro\Bundle\NoteBundle\Placeholder\PlaceholderFilter`

####PlatformBundle
- Bundle now has priority `-200` and it is loaded right after main Symfony bundles
- Services with tag `doctrine.event_listener` was marked as private
Expand All @@ -161,10 +251,15 @@ after:
- `Oro\Bundle\SecurityBundle\Owner\OwnerTreeInterface` is changed. New method `buildTree` added (due to performance issues). It should be called once after all `addDeepEntity` calls. See [OwnerTreeProvider](./src/Oro/Bundle/SecurityBundle/Owner/OwnerTreeProvider.php) method `fillTree`. Implementation example [OwnerTree](./src/Oro/Bundle/SecurityBundle/Owner/OwnerTree.php).
- Bundle now contains part of Symfony security configuration (ACL configuration and access decision manager strategy)
- `Oro\Bundle\SecurityBundle\Http\Firewall\ContextListener` added to the class cache and constructor have container as performance improvement
- `Oro\Bundle\SecurityBundle\Authentication\Token\UsernamePasswordOrganizationTokenFactoryInterface` and its implementation `Oro\Bundle\SecurityBundle\Authentication\Token\UsernamePasswordOrganizationTokenFactory` were introduced to encapsulate creation of `UsernamePasswordOrganizationToken` in `Oro\Bundle\SecurityBundle\Authentication\Provider\UsernamePasswordOrganizationAuthenticationProvider` and `Oro\Bundle\SecurityBundle\Http\Firewall\OrganizationBasicAuthenticationListener`
- `Oro\Bundle\SecurityBundle\Authentication\Token\OrganizationRememberMeTokenFactoryInterface` and its implementation `Oro\Bundle\SecurityBundle\Authentication\Token\OrganizationRememberMeTokenFactory` were introduced to encapsulate creation of `OrganizationRememberMeToken` in `Oro\Bundle\SecurityBundle\Authentication\Provider\UsernamePasswordOrganizationAuthenticationProvider`

####SidebarBundle
- `Oro\Bundle\SidebarBundle\EventListener\RequestHandler` added to the class cache as performance improvement

####SSOBundle
- `Oro\Bundle\SSOBundle\Security\OAuthTokenFactoryInterface` and its implementation `Oro\Bundle\SSOBundle\Security\OAuthTokenFactory` were introduced to encapsulate creation of `OAuthToken` in `Oro\Bundle\SSOBundle\Security\OAuthProvider`

####SoapBundle
- Bundle now contains configuration of security firewall `wsse_secured`
- `Oro\Bundle\SoapBundle\EventListener\LocaleListener` added to the class cache and constructor have container as performance improvement
Expand All @@ -176,15 +271,22 @@ after:
- `/Resources/translations/tooltips.*.yml` deprecated since 1.9.0. Will be removed in 1.11.0. Use `/Resources/translations/messages.*.yml` instead

####UiBundle
- Added `assets_version_strategy` parameter which can be used to automatically update `assets_version` parameter. Possible values are:
- null - the assets version stays unchanged
- time_hash - a hash of the current time (default strategy)
- incremental - the next assets version is the previous version is incremented by one (e.g. 'ver1' -> 'ver2' or '1' -> '2')
- Removed `assets_version` global variable from TWIG. Use `asset_version` or `asset` TWIG functions instead
- Added possibility to group tabs in dropdown for tabs panel. Added options to tabPanel function. Example: `{{ tabPanel(tabs, {useDropdown: true}) }}`
- Added possibility to set content for specific tab. Example: `{{ tabPanel([{label: 'Tab', content: 'Tab content'}]) }}`
- `Oro\Bundle\UIBundle\EventListener\ContentProviderListener` added to the class cache and constructor have container as performance improvement
- Services with tag `oro_ui.content_provider` was marked as private
- Services with tag `oro_formatter` was marked as private
- Class `Oro\Bundle\UIBundle\Tools\ArrayUtils` marked as deprecated. Use `Oro\Component\PhpUtils\ArrayUtil` instead.

####UserBundle
- Bundle now contains configuration of security providers (`chain_provider`, `oro_user`, `in_memory`), encoders and security firewalls (`login`, `reset_password`, `main`)
- Bundle DI extension `OroUserExtension` has been updated to make sure that `main` security firewall is always the last in list
- `Oro\Bundle\UserBundle\Security\WsseTokenFactoryInterface` and its implementation `Oro\Bundle\UserBundle\Security\WsseTokenFactory` were introduced to encapsulate creation of `WsseToken` in `Oro\Bundle\UserBundle\Security\WsseAuthProvider`

####WorkflowBundle
- Constructor of `Oro\Bundle\WorkflowBundle\Model\Process` changed. New argument: `ConditionFactory $conditionFactory`
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"symfony/icu": "~1.1",
"symfony/swiftmailer-bundle": "2.3.*",
"symfony/monolog-bundle": "2.7.*",
"sensio/distribution-bundle": "2.3.14",
"sensio/distribution-bundle": "4.0.3",
"sensio/framework-extra-bundle": "2.3.4",
"incenteev/composer-parameter-handler": "2.1.0",
"jms/job-queue-bundle": "1.2.*",
Expand Down Expand Up @@ -75,7 +75,8 @@
"components/font-awesome": "~4.3.0",
"piwik/device-detector": "~3.0",
"oro/jsplumb": "~1.7",
"oro/moment-timezone": "0.3.*"
"oro/moment-timezone": "0.3.*",
"vakata/jstree": "^3.2"
},
"require-dev": {
"sensio/generator-bundle": "2.5.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Oro\Bundle\EntityBundle\Tools\EntityClassNameHelper;
use Oro\Bundle\EntityConfigBundle\Config\ConfigManager;
use Oro\Bundle\ActivityBundle\Manager\ActivityManager;
use Oro\Bundle\ActivityBundle\Event\SearchAliasesEvent;
use Oro\Bundle\FormBundle\Autocomplete\ConverterInterface;
use Oro\Bundle\SearchBundle\Engine\Indexer;
use Oro\Bundle\SearchBundle\Query\Result\Item;
Expand Down Expand Up @@ -183,17 +184,14 @@ protected function searchById($targetsString)
*/
public function convertItem($item)
{
$this->dispatcher->dispatch(PrepareResultItemEvent::EVENT_NAME, new PrepareResultItemEvent($item));

/** @var Item $item */
$text = $item->getRecordTitle();
$className = $item->getEntityName();

$entityMapParameter = $this->mapper->getEntityMapParameter($className, 'title_fields');

if ($text === null && $entityMapParameter) {
$this->dispatcher->dispatch(PrepareResultItemEvent::EVENT_NAME, new PrepareResultItemEvent($item));
$text = $item->getRecordTitle();
}

if (strlen($text) === 0 && !$entityMapParameter) {
$text = $this->translator->trans('oro.entity.item', ['%id%' => $item->getRecordId()]);
}
Expand Down Expand Up @@ -406,6 +404,10 @@ protected function getSearchAliases()
$aliases[] = $alias;
}
}
/** dispatch oro_activity.search_aliases event */
$event = new SearchAliasesEvent($aliases, $targetEntityClasses);
$this->dispatcher->dispatch(SearchAliasesEvent::EVENT_NAME, $event);
$aliases = $event->getAliases();

return $aliases;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function contextAction($activity, $id)
throw new AccessDeniedException();
}

$entityTargets = $this->get('oro_entity.entity_context_provider')->getSupportedTargets($entity);
$entityTargets = $this->get('oro_activity.provider.context_grid')->getSupportedTargets($entity);
$entityClassAlias = $this->get('oro_entity.entity_alias_resolver')->getPluralAlias($entityClass);

return [
Expand Down Expand Up @@ -93,12 +93,14 @@ public function contextAction($activity, $id)
*/
public function contextGridAction($activity, $id, $entityClass = null)
{
$gridName = $this->get('oro_entity.entity_context_provider')->getContextGridByEntity($entityClass);
$entityClass = $this->get('oro_entity.routing_helper')->resolveEntityClass($entityClass);
$gridName = $this->get('oro_activity.provider.context_grid')->getContextGridByEntity($entityClass);

// Need to specify parameters for Oro\Bundle\ActivityBundle\EventListener\Datagrid\ContextGridListener
$params = [
'activityClass' => $activity,
'activityId' => $id
'activityId' => $id,
'class_name' => $entityClass,
];

return [
Expand Down
Loading

0 comments on commit 90b4715

Please sign in to comment.