Skip to content

Commit

Permalink
Merge branch 'master' into l10n_master
Browse files Browse the repository at this point in the history
  • Loading branch information
Devolicious authored Aug 21, 2018
2 parents 9bc9d9a + d0ffee0 commit 7bcb56f
Show file tree
Hide file tree
Showing 44 changed files with 269 additions and 1,258 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG-5.X.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## 5.0.8 / 2018-08-07

* [AdminList] Fix admin list empty url [#2071](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/2071) ([@dannyvw](https://github.com/dannyvw))
* [NodeBundle] Remove unused vardumper use [#2067](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/2067) ([@acrobat](https://github.com/acrobat))
* [MediaBundle] Skip test if ghostscript is not installed [#2066](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/2066) ([@acrobat](https://github.com/acrobat))
* [AdminBundle] #2050 Fixed issue in refreshing ck editor (don't do a destroy if the … [#2064](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/2064) ([@janb87](https://github.com/janb87))
* [AdminListBundle] fixed form options source in admin list controller [#2056](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/2056) ([@mdxpl](https://github.com/mdxpl))
* [KunstmaanTranslatorBundle] export all translations, use correct locales [#2055](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/2055) ([@sandergo90](https://github.com/sandergo90))
* [GeneratorBundle] Fix xpath for publish modal in behat tests [#2052](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/2052) ([@acrobat](https://github.com/acrobat))
* [AdminBundle] Remove id of nested form item containers [#2049](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/2049) ([@SpadXIII](https://github.com/SpadXIII))
* [AdminBundle] fixed BC break in CreateUserCommand [#2043](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/2043) ([@deZinc](https://github.com/deZinc))
* [AdminBundle] remove hardcopy of ckeditor [#2041](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/2041) ([@FVKVN](https://github.com/FVKVN))
* [AdminBundle] added missing translations to main language [#2038](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/2038) ([@Devolicious](https://github.com/Devolicious))
* [MediaBundle] Fixed BackgroundFilterLoader issue [#2028](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/2028) ([@deZinc](https://github.com/deZinc))


## 5.0.7 / 2018-06-21

* [PagePartBundle] Refactor HeaderPagePart entity test [#2024](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/2024) ([@Devolicious](https://github.com/Devolicious))
Expand Down
10 changes: 5 additions & 5 deletions UPGRADE-5.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ General
-------

* The `symfony/assetic-bundle` package was removed from our dependencies as it was unused since version 5.0. If your code depends on assetic, add the dependency to your project `composer.json`.
* The `symfony/swiftmailer-bundle` package was removed from our dependencies as it was unused. If your code depends on `symfony/swiftmailer-bundle`, add the dependency to your project `composer.json`.
* The `sensio/distribution-bundle` package was removed from our dependencies as it was unused since version 5.0. If your code depends on `sensio/distribution-bundle` for executing composer after update/install scripts, add the dependency to your project `composer.json`.
* The version constraint for `fos/user-bundle` is updated to `^2.0` to allow new minor releases. If your code isn't compatible with the new changes of the user-bundle, update/add a custom version constraint for the `fos/user-bundle` in your `composer.json`. Eg `"friendsofsymfony/user-bundle": "2.0.*"`

AdminBundle
-----------
Expand Down Expand Up @@ -66,18 +66,18 @@ NodeBundle
* `InitAclCommand::__construct()` now takes an instance of `Doctrine\ORM\EntityManagerInterface` as the first argument. Not passing it is deprecated and will throw a `TypeError` in 6.0.
* `CronUpdateNodeCommand` and `InitAclCommand` have been marked as final.
* `Possibility to change the icon of your page.`: The possibility already exists to change the icon in the sidebar tree of your page. This was already available by yml configuration. I've added a new interface, TreeIconInterface that can be implemented and that will return the icon that should be used.
* The unused `WidgetsController::selectNodesLazySearch` action is deprecated and will be removed in 6.0.
* The unused `WidgetsController::selectNodesLazySearch` action is deprecated and will be removed in 6.0.
* Injecting the container in the `SlugRouter` is deprecated and will be removed in 6.0. Inject the required services instead.
* The `service` method of `Kunstmaan\NodeBundle\Entity\PageInterface` is deprecated and will be removed in 6.0. Implement the `Kunstmaan\NodeBundle\Controller\SlugActionInterface`
and use the `getControllerAction` method to specify a controller action with your custom page logic instead.

and use the `getControllerAction` method to specify a controller action with your custom page logic instead.
* Button to export page template is now disabled by default. You can enable it by setting the `enable_export_page_template` value to true inside the `kunstmaan_node` configuration.

SearchBundle
------------

* `SetupIndexCommand::__construct()`, `PopulateIndexCommand::__construct()` and `DeleteIndexCommand::__construct()` now takes an instance of `Kunstmaan\SearchBundle\Configuration\SearchConfigurationChain` as the first argument. Not passing it is deprecated and will throw a `TypeError` in 6.0.
* `SetupIndexCommand`, `PopulateIndexCommand` and `DeleteIndexCommand` have been marked as final.

SeoBundle
---------

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"doctrine/doctrine-migrations-bundle": "^1.3",
"symfony/swiftmailer-bundle": "^2.3|^3.0",
"symfony/monolog-bundle": "~2.8|~3.0",
"symfony/security-acl": "~2.8|~3.0",
"sensio/framework-extra-bundle": "^5.0",
"incenteev/composer-parameter-handler": "^2.0",

"friendsofsymfony/user-bundle": "2.0.*",
"friendsofsymfony/user-bundle": "^2.0",
"knplabs/knp-menu-bundle": "~2.0",
"guzzlehttp/guzzle": "~6.1",
"white-october/pagerfanta-bundle": "~1.0",
Expand Down Expand Up @@ -94,7 +95,7 @@
"kunstmaan/tagging-bundle": "self.version"
},
"conflict": {
"friendsofsymfony/user-bundle": "<2.0.0, >=2.1.0"
"friendsofsymfony/user-bundle": "<2.0.0"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions groundcontrol/admin-bundle.tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ adminBundle.tasks.scripts = createScriptsTask({
adminBundle.config.srcPath + 'vendor_bower/Sortable/Sortable.js',
adminBundle.config.srcPath + 'vendor_bower/mjolnic-bootstrap-colorpicker/dist/js/bootstrap-colorpicker.min.js',
adminBundle.config.srcPath + 'vendor_bower/jquery-typewatch/jquery.typewatch.js',
'./src/Kunstmaan/AdminBundle/Resources/public/default-theme/ckeditor/ckeditor.js',
'./src/Kunstmaan/AdminBundle/Resources/public/default-theme/ckeditor/adapters/jquery.js',
'./node_modules/ckeditor/ckeditor.js',
'./node_modules/ckeditor/adapters/jquery.js',
adminBundle.config.srcPath + 'js/**/*.js'
],
dest: adminBundle.config.distPath + 'js',
Expand Down
3 changes: 3 additions & 0 deletions src/Kunstmaan/AdminBundle/Command/ApplyAclCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

/**
* Symfony CLI command to apply the {@link AclChangeSet} with status {@link AclChangeSet::STATUS_NEW} to their entities
*
* @final since 5.1
* NEXT_MAJOR extend from `Command` and remove `$this->getContainer` usages
*/
class ApplyAclCommand extends ContainerAwareCommand
{
Expand Down
21 changes: 18 additions & 3 deletions src/Kunstmaan/AdminBundle/Command/CreateUserCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,27 @@ protected function execute(InputInterface $input, OutputInterface $output)
// Attach groups
$groupOutput = [];


foreach (explode(',', $groupOption) as $groupId) {
$group = $this->groups[$groupId];
$groupOutput[] = $group->getName();

if ($group instanceof Group) {
if ((int)$groupId === 0) {
foreach ($this->groups as $value) {
if ($groupId === $value->getName()) {
$group = $value;
break;
}
}
} else {
$group = $this->groups[$groupId];
}

if (isset($group) && $group instanceof Group) {
$groupOutput[] = $group->getName();
$user->getGroups()->add($group);
} else {
throw new \RuntimeException(
'The selected group(s) can\'t be found.'
);
}
}

Expand Down
3 changes: 3 additions & 0 deletions src/Kunstmaan/AdminBundle/Command/UpdateAclCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

/**
* Permissions update of ACL entries for all nodes for given role.
*
* @final since 5.1
* NEXT_MAJOR extend from `Command` and remove `$this->getContainer` usages
*/
class UpdateAclCommand extends ContainerAwareCommand
{
Expand Down
2 changes: 1 addition & 1 deletion src/Kunstmaan/AdminBundle/Controller/DefaultController.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function indexAction()
* The admin of the index page
*
* @Route("/adminindex", name="KunstmaanAdminBundle_homepage_admin")
* @Template()
* @Template("@KunstmaanAdmin/Default/editIndex.html.twig")
*
* @param \Symfony\Component\HttpFoundation\Request $request
*
Expand Down
12 changes: 6 additions & 6 deletions src/Kunstmaan/AdminBundle/EventListener/LoginListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Kunstmaan\AdminBundle\Entity\BaseUser;
use Kunstmaan\AdminBundle\Helper\VersionCheck\VersionChecker;
use Monolog\Logger;
use Psr\Log\LoggerInterface;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;

Expand All @@ -14,7 +14,7 @@
class LoginListener
{
/**
* @var Logger
* @var LoggerInterface
*/
private $logger;

Expand All @@ -26,10 +26,10 @@ class LoginListener
/**
* Constructor
*
* @param Logger $logger The logger
* @param VersionChecker $versionChecker The version checker
* @param LoggerInterface $logger The logger
* @param VersionChecker $versionChecker The version checker
*/
public function __construct(Logger $logger, VersionChecker $versionChecker)
public function __construct(LoggerInterface $logger, VersionChecker $versionChecker)
{
$this->logger = $logger;
$this->versionChecker = $versionChecker;
Expand All @@ -46,7 +46,7 @@ public function onSecurityInteractiveLogin(InteractiveLoginEvent $event)
$user = $event->getAuthenticationToken()->getUser();

if ($user instanceof UserInterface) {
$this->logger->addInfo($user . ' successfully logged in to the cms');
$this->logger->info($user . ' successfully logged in to the cms');
$this->versionChecker->periodicallyCheck();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected function getChangePasswordAction()

return new AdminPanelAction(
array(
'path' => 'KunstmaanAdminBundle_user_change_password',
'path' => 'KunstmaanUserManagementBundle_settings_users_edit',
'params' => array('id' => $user->getId())
),
ucfirst($user->getUsername()),
Expand Down
17 changes: 17 additions & 0 deletions src/Kunstmaan/AdminBundle/Resources/config/commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,20 @@ services:
arguments: ['@doctrine.orm.entity_manager']
tags:
- { name: console.command }

Kunstmaan\AdminBundle\Command\UpdateAclCommand:
arguments:
- '@kunstmaan_admin.acl.manager'
- '@doctrine.orm.entity_manager'
- '@kunstmaan_admin.security.acl.permission.map'
- '%security.role_hierarchy.roles%'
tags:
- { name: console.command }

Kunstmaan\AdminBundle\Command\ApplyAclCommand:
arguments:
- '@kunstmaan_admin.acl.manager'
- '@doctrine.orm.entity_manager'
- '@kunstmaan_utilities.shell'
tags:
- { name: console.command }
25 changes: 5 additions & 20 deletions src/Kunstmaan/AdminBundle/Resources/config/routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,13 @@ KunstmaanAdminBundle_settings_exception:
type: annotation
prefix: /%kunstmaan_admin.admin_prefix%/settings/exception

# Change user password route
KunstmaanAdminBundle_user_change_password:
path: /%kunstmaan_admin.admin_prefix%/settings/users/{id}/edit
defaults: { _controller: FOSUserBundle:ChangePassword:changePassword }
methods: [GET, POST]

###########################
## fos_userbundle routes ##
###########################

fos_user_security_login:
path: /%kunstmaan_admin.admin_prefix%/login
defaults: { _controller: FOSUserBundle:Security:login }

fos_user_security_check:
path: /%kunstmaan_admin.admin_prefix%/login_check
defaults: { _controller: FOSUserBundle:Security:check }

fos_user_security_logout:
path: /%kunstmaan_admin.admin_prefix%/logout
defaults: { _controller: FOSUserBundle:Security:logout }
fos_user_security:
resource: '@FOSUserBundle/Resources/config/routing/security.xml'
prefix: /%kunstmaan_admin.admin_prefix%

fos_user_profile:
resource: '@FOSUserBundle/Resources/config/routing/profile.xml'
Expand All @@ -49,9 +35,8 @@ fos_user_resetting:
prefix: /%kunstmaan_admin.admin_prefix%/resetting

fos_user_change_password:
path: /%kunstmaan_admin.admin_prefix%/profile/change-password
defaults: { _controller: FOSUserBundle:ChangePassword:changePassword }
methods: [GET, POST]
resource: '@FOSUserBundle/Resources/config/routing/change_password.xml'
prefix: /%kunstmaan_admin.admin_prefix%/profile

##########################
## Google OAuth Sign In ##
Expand Down
20 changes: 2 additions & 18 deletions src/Kunstmaan/AdminBundle/Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,25 +325,9 @@ services:
- '@kunstmaan_admin.cache'
tags:
- { name: kunstmaan_admin.toolbar_collector, template: 'KunstmaanAdminBundle:Toolbar:bundles_version.html.twig', id: kuma_bundle_versions }

kunstmaan_admin.datacollector.exception:
class: '%kunstmaan_admin.toolbar.collector.exception.class%'
arguments: ["@doctrine.orm.entity_manager"]
tags:
- { name: kunstmaan_admin.toolbar_collector, template: 'KunstmaanAdminBundle:Toolbar:exception.html.twig', id: kuma_exception }

Kunstmaan\AdminBundle\Command\UpdateAclCommand:
arguments:
- '@kunstmaan_admin.acl.manager'
- '@doctrine.orm.entity_manager'
- '@kunstmaan_admin.security.acl.permission.map'
- '%security.role_hierarchy.roles%'
tags:
- { name: console.command }

Kunstmaan\AdminBundle\Command\ApplyAclCommand:
arguments:
- '@kunstmaan_admin.acl.manager'
- '@doctrine.orm.entity_manager'
- '@kunstmaan_utilities.shell'
tags:
- { name: console.command }
- { name: kunstmaan_admin.toolbar_collector, template: 'KunstmaanAdminBundle:Toolbar:exception.html.twig', id: kuma_exception }
Loading

0 comments on commit 7bcb56f

Please sign in to comment.