Skip to content

Commit

Permalink
Merge branch '6.x' into feature/entity-manager-interface
Browse files Browse the repository at this point in the history
  • Loading branch information
delboy1978uk authored Mar 25, 2024
2 parents 124cf78 + d1bc2f5 commit a72d6e5
Show file tree
Hide file tree
Showing 228 changed files with 708 additions and 1,460 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4.0.1
- uses: actions/cache@v4.0.2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/subtree-split.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
user_email: 'cms@kunstmaan.be'

- name: Cache splitsh-lite
uses: actions/cache@v4.0.1
uses: actions/cache@v4.0.2
with:
path: |
./splitsh
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG-6.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ This changelog references the relevant changes (bug and security fixes) done in
To get the diff for a specific change, go to https://github.com/kunstmaan/KunstmaanBundlesCMS/commit/XXX where XXX is the change hash
To get the diff between two versions, go to https://github.com/kunstmaan/KunstmaanBundlesCMS/compare/6.3.0...6.3.1

## 6.3.1 / 2024-03-24

* [AllBundles] Fix php-cs-fixer issues [#3353](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3353) ([@acrobat](https://github.com/acrobat))
* [AdminListBundle] Fix doctrine related unit tests [#3345](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3345) ([@acrobat](https://github.com/acrobat))
* Apply nullable_type_declaration_for_default_null_value and skip fully_qualified_strict_types [#3332](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3332) ([@acrobat](https://github.com/acrobat))
* [AllBundles] Symfony 6 compatibility fixes [#3322](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3322) ([@acrobat](https://github.com/acrobat))

## 6.3.0 / 2023-12-20

* [CookieBundle] Deprecate entity controller action method [#3297](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3297) ([@acrobat](https://github.com/acrobat))
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG-6.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
CHANGELOG for 6.4.x
===================

This changelog references the relevant changes (bug and security fixes) done in 6.4 minor versions.

To get the diff for a specific change, go to https://github.com/kunstmaan/KunstmaanBundlesCMS/commit/XXX where XXX is the change hash
To get the diff between two versions, go to https://github.com/kunstmaan/KunstmaanBundlesCMS/compare/6.4.0...6.4.1

## 6.4.0-alpha1 / 2024-03-24

* [NodeBundle] Fix php8 deprecation in ExternalUrlValidator [#3361](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3361) ([@acrobat](https://github.com/acrobat))
* [AllBundles] Various phpdoc return type fixes [#3360](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3360) ([@acrobat](https://github.com/acrobat))
* [AllBundles] Fix return type deprecations and add missing return types [#3357](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3357) ([@acrobat](https://github.com/acrobat))
* [AllBundles] Fix gedmo sibblings deprecation [#3356](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3356) ([@acrobat](https://github.com/acrobat))
* [AllBundles] Fix issues with adminlist configurator deprecations [#3354](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3354) ([@acrobat](https://github.com/acrobat))
* [AdminList] Fix AdminLists [#3352](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3352) ([@dannyvw](https://github.com/dannyvw))
* [FormBundle] Remove empty_data from ChoiceFormSubmissionType [#3349](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3349) ([@dannyvw](https://github.com/dannyvw))
* [AdminListBundle] Deprecate configurator getBundleName/getEntityName methods [#3347](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3347) ([@acrobat](https://github.com/acrobat))
* [AdminBundle] Add extra blocks to authentication layout [#3342](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3342) ([@dannyvw](https://github.com/dannyvw))
* [MediaBundle] - allow custom view vars in chooser [#3337](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3337) ([@delboy1978uk](https://github.com/delboy1978uk))
* [NodeBundle] View parent nodes from list [#3334](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3334) ([@dannyvw](https://github.com/dannyvw))
* [AdminBundle] Add hide sidebar configuration [#3333](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3333) ([@dannyvw](https://github.com/dannyvw))
* [SearchBundle, NodeSearchBundle] : change `nGram` to `ngram` [#3331](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3331) ([@delboy1978uk](https://github.com/delboy1978uk))
* [DashboardBundle] Fix controller route attribute resolver in DashboardWidget [#3325](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3325) ([@acrobat](https://github.com/acrobat))
* [AllBundles] Switch Route and Validator annotations to attributes [#3323](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3323) ([@acrobat](https://github.com/acrobat))
* [FormBundle] Fix draft version form page [#3304](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3304) ([@dannyvw](https://github.com/dannyvw))
* [RedirectBundle] Add order by to redirect admin list [#3300](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3300) ([@dannyvw](https://github.com/dannyvw))
* [PagePartBundle] Allow deleting nested sub-entities [#3292](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3292) ([@acrobat](https://github.com/acrobat))
* [AllBundle] Add compatibility for new PUBLIC_ACCESS role [#3120](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/3120) ([@acrobat](https://github.com/acrobat))
7 changes: 7 additions & 0 deletions UPGRADE-6.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
UPGRADE FROM 6.3 to 6.4
========================

AdminListBundle
-----------

- The methods `getBundleName` and `getEntityName` of `Kunstmaan\AdminListBundle\AdminList\Configurator\AbstractAdminListConfigurator` are deprecated. Implement the `getEntityClass` method instead.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function buildListActions()
$listRoute = [
'path' => 'kunstmaanadminbundle_admin_exception_resolve_all',
'params' => [],
];
];

$this->addListAction(
new SimpleListAction(
Expand Down
10 changes: 2 additions & 8 deletions src/Kunstmaan/AdminBundle/Controller/ExceptionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@ public function indexAction(Request $request)
return parent::doIndexAction($this->getAdminListConfigurator(), $request);
}

/**
* @return RedirectResponse
*/
#[Route(path: '/resolve_all', name: 'kunstmaanadminbundle_admin_exception_resolve_all', methods: ['POST'])]
public function resolveAllAction(Request $request)
public function resolveAllAction(Request $request): RedirectResponse
{
if (!$this->isCsrfTokenValid('exception-resolve_all', $request->request->get('token'))) {
return new RedirectResponse($this->generateUrl('kunstmaanadminbundle_admin_exception'));
Expand All @@ -51,11 +48,8 @@ public function resolveAllAction(Request $request)
);
}

/**
* @return RedirectResponse
*/
#[Route(path: '/toggle_resolve/{id}', name: 'kunstmaanadminbundle_admin_exception_toggle_resolve', methods: ['POST'])]
public function toggleResolveAction(Request $request, Exception $model)
public function toggleResolveAction(Request $request, Exception $model): RedirectResponse
{
if (!$this->isCsrfTokenValid('exception-resolve-item', $request->request->get('token'))) {
return new RedirectResponse($this->generateUrl('kunstmaanadminbundle_admin_exception'));
Expand Down
10 changes: 5 additions & 5 deletions src/Kunstmaan/AdminBundle/Entity/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function hasRole($role)
*
* @param Role $role
*
* @return GroupInterface
* @return static
*
* @throws \InvalidArgumentException
*/
Expand All @@ -161,7 +161,7 @@ public function addRole($role)
*
* @param string $role
*
* @return GroupInterface
* @return static
*/
public function removeRole($role)
{
Expand All @@ -178,7 +178,7 @@ public function removeRole($role)
*
* @param Role[] $roles array of Role objects
*
* @return GroupInterface
* @return static
*/
public function setRoles(array $roles)
{
Expand All @@ -193,7 +193,7 @@ public function setRoles(array $roles)
/**
* Directly set the ArrayCollection of Roles. Type hinted as Collection which is the parent of (Array|Persistent)Collection.
*
* @return GroupInterface
* @return static
*/
public function setRolesCollection(Collection $collection)
{
Expand All @@ -217,7 +217,7 @@ public function getName()
*
* @param string $name New name of the group
*
* @return GroupInterface
* @return static
*/
public function setName($name)
{
Expand Down
30 changes: 2 additions & 28 deletions src/Kunstmaan/AdminBundle/Entity/UserInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ interface UserInterface extends SymfonyUserInterface, \Serializable
public function getId();

/**
* Sets the username.
*
* @param string $username
*
* @return static
Expand All @@ -31,31 +29,23 @@ public function setUsername($username);
public function setSalt($salt);

/**
* Gets email.
*
* @return string
* @return string|null
*/
public function getEmail();

/**
* Sets the email.
*
* @param string $email
*
* @return static
*/
public function setEmail($email);

/**
* Gets the plain password.
*
* @return string
* @return string|null
*/
public function getPlainPassword();

/**
* Sets the plain password.
*
* @param string $password
*
* @return static
Expand All @@ -72,8 +62,6 @@ public function setPlainPassword($password);
public function setPassword($password);

/**
* Tells if the the given user has the super admin role.
*
* @return bool
*/
public function isSuperAdmin();
Expand All @@ -86,24 +74,18 @@ public function isSuperAdmin();
public function setEnabled($boolean);

/**
* Sets the super admin status.
*
* @param bool $boolean
*
* @return static
*/
public function setSuperAdmin($boolean);

/**
* Gets the confirmation token.
*
* @return string|null
*/
public function getConfirmationToken();

/**
* Sets the confirmation token.
*
* @param string|null $confirmationToken
*
* @return static
Expand Down Expand Up @@ -141,17 +123,13 @@ public function hasRole($role);
public function setRoles(array $roles);

/**
* Adds a role to the user.
*
* @param string $role
*
* @return static
*/
public function addRole($role);

/**
* Removes a role to the user.
*
* @param string $role
*
* @return static
Expand Down Expand Up @@ -182,15 +160,11 @@ public function getGroupNames();
public function hasGroup($name);

/**
* Add a group to the user groups.
*
* @return static
*/
public function addGroup(GroupInterface $group);

/**
* Remove a group from the user groups.
*
* @return static
*/
public function removeGroup(GroupInterface $group);
Expand Down
20 changes: 4 additions & 16 deletions src/Kunstmaan/AdminBundle/Event/AdaptSimpleFormEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ public function __construct(Request $request, $formType, $data, $options = [])
$this->options = $options;
}

/**
* @return TabPane|null
*/
public function getTabPane()
public function getTabPane(): ?TabPane
{
return $this->tabPane;
}
Expand All @@ -54,10 +51,7 @@ public function setTabPane(TabPane $tabPane)
$this->tabPane = $tabPane;
}

/**
* @return Request
*/
public function getRequest()
public function getRequest(): Request
{
return $this->request;
}
Expand All @@ -67,10 +61,7 @@ public function setRequest(Request $request)
$this->request = $request;
}

/**
* @return string
*/
public function getFormType()
public function getFormType(): string
{
return $this->formType;
}
Expand All @@ -93,10 +84,7 @@ public function setData($data)
$this->data = $data;
}

/**
* @return array
*/
public function getOptions()
public function getOptions(): array
{
return $this->options;
}
Expand Down
10 changes: 2 additions & 8 deletions src/Kunstmaan/AdminBundle/Event/DeepCloneAndSaveEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ public function __construct($entity, $clonedEntity)
$this->clonedEntity = $clonedEntity;
}

/**
* @return DeepCloneAndSaveEvent
*/
public function setClonedEntity($clonedEntity)
public function setClonedEntity($clonedEntity): DeepCloneAndSaveEvent
{
$this->clonedEntity = $clonedEntity;

Expand All @@ -38,10 +35,7 @@ public function getClonedEntity()
return $this->clonedEntity;
}

/**
* @return DeepCloneAndSaveEvent
*/
public function setEntity($entity)
public function setEntity($entity): DeepCloneAndSaveEvent
{
$this->entity = $entity;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,7 @@ private function getIp(Request $request): string
return $this->ip;
}

/**
* @return array|string
*/
private function getUserAgent(Request $request)
private function getUserAgent(Request $request): array|string
{
if (!$this->userAgent) {
$this->userAgent = $request->headers->get('User-Agent');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ public function __construct(string $userClass)
$this->userClass = $userClass;
}

/**
* @return void
*/
public function buildForm(FormBuilderInterface $builder, array $options)
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('current_password', PasswordType::class, [
Expand Down Expand Up @@ -54,10 +51,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
;
}

/**
* @return void
*/
public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefault('data_class', $this->userClass);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@

final class NewPasswordType extends AbstractType
{
/**
* @return void
*/
public function buildForm(FormBuilderInterface $builder, array $options)
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('plainPassword', RepeatedType::class, [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@

final class PasswordRequestType extends AbstractType
{
/**
* @return void
*/
public function buildForm(FormBuilderInterface $builder, array $options)
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('email', TextType::class, [
Expand Down
Loading

0 comments on commit a72d6e5

Please sign in to comment.