Skip to content

Commit

Permalink
Merge branch '2.4' of https://github.com/sulu/sulu into 2.5
Browse files Browse the repository at this point in the history
 Conflicts:
	phpstan-baseline.neon
	src/Sulu/Bundle/MediaBundle/Controller/CollectionController.php
	src/Sulu/Bundle/MediaBundle/Controller/MediaController.php
  • Loading branch information
alexander-schranz committed May 2, 2024
2 parents f334081 + ac60a66 commit ff9e21e
Show file tree
Hide file tree
Showing 17 changed files with 116 additions and 200 deletions.
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,18 @@ $foo->doSomething();

- [ ] Create a documentation PR
- [ ] Add breaking changes to UPGRADE.md

<!--
Dear Contributors,
Thank you for contributing to the Sulu ecosystem!
We appreciate your effort to improve our project.
If you need assistance or have questions about your pull request, our team is here to help.
Please join our Slack channel for support: https://sulu.io/services/support#chat.
Best Regards,
The Sulu Core Team
-->
160 changes: 0 additions & 160 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2115,11 +2115,6 @@ parameters:
count: 2
path: src/Sulu/Bundle/AudienceTargetingBundle/Controller/TargetGroupController.php

-
message: "#^Parameter \\#1 \\$id of method Sulu\\\\Component\\\\Rest\\\\AbstractRestController\\:\\:responseGetById\\(\\) expects string, int given\\.$#"
count: 1
path: src/Sulu/Bundle/AudienceTargetingBundle/Controller/TargetGroupController.php

-
message: "#^Parameter \\#2 \\$fieldDescriptors of method Sulu\\\\Component\\\\Rest\\\\RestHelperInterface\\:\\:initializeListBuilder\\(\\) expects array\\<Sulu\\\\Component\\\\Rest\\\\ListBuilder\\\\FieldDescriptorInterface\\>, array\\<Sulu\\\\Component\\\\Rest\\\\ListBuilder\\\\FieldDescriptorInterface\\>\\|null given\\.$#"
count: 1
Expand Down Expand Up @@ -8035,16 +8030,6 @@ parameters:
count: 1
path: src/Sulu/Bundle/ContactBundle/Controller/AccountController.php

-
message: "#^Parameter \\#1 \\$id of method Sulu\\\\Component\\\\Rest\\\\AbstractRestController\\:\\:responseDelete\\(\\) expects string, int given\\.$#"
count: 1
path: src/Sulu/Bundle/ContactBundle/Controller/AccountController.php

-
message: "#^Parameter \\#1 \\$id of method Sulu\\\\Component\\\\Rest\\\\AbstractRestController\\:\\:responseGetById\\(\\) expects string, int given\\.$#"
count: 1
path: src/Sulu/Bundle/ContactBundle/Controller/AccountController.php

-
message: "#^Parameter \\#1 \\$json of function json_decode expects string, mixed given\\.$#"
count: 2
Expand Down Expand Up @@ -8370,16 +8355,6 @@ parameters:
count: 1
path: src/Sulu/Bundle/ContactBundle/Controller/ContactController.php

-
message: "#^Parameter \\#1 \\$id of method Sulu\\\\Component\\\\Rest\\\\AbstractRestController\\:\\:responseDelete\\(\\) expects string, int given\\.$#"
count: 1
path: src/Sulu/Bundle/ContactBundle/Controller/ContactController.php

-
message: "#^Parameter \\#1 \\$id of method Sulu\\\\Component\\\\Rest\\\\AbstractRestController\\:\\:responseGetById\\(\\) expects string, int given\\.$#"
count: 1
path: src/Sulu/Bundle/ContactBundle/Controller/ContactController.php

-
message: "#^Parameter \\#1 \\$listBuilder of method Sulu\\\\Bundle\\\\ContactBundle\\\\Controller\\\\ContactController\\:\\:prepareListResponse\\(\\) expects Sulu\\\\Component\\\\Rest\\\\ListBuilder\\\\Doctrine\\\\DoctrineListBuilder, Sulu\\\\Component\\\\Rest\\\\ListBuilder\\\\ListBuilderInterface given\\.$#"
count: 1
Expand Down Expand Up @@ -8485,16 +8460,6 @@ parameters:
count: 1
path: src/Sulu/Bundle/ContactBundle/Controller/ContactTitleController.php

-
message: "#^Parameter \\#1 \\$id of method Sulu\\\\Component\\\\Rest\\\\AbstractRestController\\:\\:responseDelete\\(\\) expects string, int given\\.$#"
count: 1
path: src/Sulu/Bundle/ContactBundle/Controller/ContactTitleController.php

-
message: "#^Parameter \\#1 \\$id of method Sulu\\\\Component\\\\Rest\\\\AbstractRestController\\:\\:responseGetById\\(\\) expects string, int given\\.$#"
count: 1
path: src/Sulu/Bundle/ContactBundle/Controller/ContactTitleController.php

-
message: "#^Parameter \\#1 \\$item of method Sulu\\\\Bundle\\\\ContactBundle\\\\Controller\\\\ContactTitleController\\:\\:addAndUpdateTitles\\(\\) expects array, mixed given\\.$#"
count: 1
Expand Down Expand Up @@ -8535,16 +8500,6 @@ parameters:
count: 1
path: src/Sulu/Bundle/ContactBundle/Controller/PositionController.php

-
message: "#^Parameter \\#1 \\$id of method Sulu\\\\Component\\\\Rest\\\\AbstractRestController\\:\\:responseDelete\\(\\) expects string, int given\\.$#"
count: 1
path: src/Sulu/Bundle/ContactBundle/Controller/PositionController.php

-
message: "#^Parameter \\#1 \\$id of method Sulu\\\\Component\\\\Rest\\\\AbstractRestController\\:\\:responseGetById\\(\\) expects string, int given\\.$#"
count: 1
path: src/Sulu/Bundle/ContactBundle/Controller/PositionController.php

-
message: "#^Parameter \\#1 \\$item of method Sulu\\\\Bundle\\\\ContactBundle\\\\Controller\\\\PositionController\\:\\:addAndUpdatePositions\\(\\) expects array, mixed given\\.$#"
count: 1
Expand Down Expand Up @@ -14005,21 +13960,11 @@ parameters:
count: 1
path: src/Sulu/Bundle/MediaBundle/Content/Types/SingleMediaSelection.php

-
message: "#^If condition is always true\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/AbstractMediaController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\AbstractMediaController\\:\\:getData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/AbstractMediaController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\AbstractMediaController\\:\\:getUploadedFile\\(\\) should return Symfony\\\\Component\\\\HttpFoundation\\\\File\\\\UploadedFile but returns mixed\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/AbstractMediaController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Collection\\\\Manager\\\\CollectionManagerInterface\\:\\:getById\\(\\) invoked with 8 parameters, 2\\-6 required\\.$#"
count: 1
Expand All @@ -14040,36 +13985,6 @@ parameters:
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/CollectionController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\CollectionController\\:\\:checkSystemCollection\\(\\) has no return type specified\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/CollectionController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\CollectionController\\:\\:checkSystemCollection\\(\\) has parameter \\$id with no type specified\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/CollectionController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\CollectionController\\:\\:checkSystemCollection\\(\\) has parameter \\$parent with no type specified\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/CollectionController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\CollectionController\\:\\:deleteAction\\(\\) has parameter \\$id with no type specified\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/CollectionController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\CollectionController\\:\\:getAction\\(\\) has parameter \\$id with no type specified\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/CollectionController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\CollectionController\\:\\:getOffset\\(\\) has parameter \\$limit with no type specified\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/CollectionController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\CollectionController\\:\\:getRequestParameter\\(\\) should return string but returns mixed\\.$#"
count: 1
Expand All @@ -14080,21 +13995,6 @@ parameters:
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/CollectionController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\CollectionController\\:\\:putAction\\(\\) has parameter \\$id with no type specified\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/CollectionController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\CollectionController\\:\\:saveEntity\\(\\) has parameter \\$id with no type specified\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/CollectionController.php

-
message: "#^Parameter \\#1 \\$value of function intval expects array\\|bool\\|float\\|int\\|resource\\|string\\|null, mixed given\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/CollectionController.php

-
message: "#^Parameter \\#2 \\$collections of class Sulu\\\\Bundle\\\\MediaBundle\\\\Api\\\\RootCollection constructor expects array, array\\<Sulu\\\\Bundle\\\\MediaBundle\\\\Api\\\\Collection\\>\\|Doctrine\\\\ORM\\\\Tools\\\\Pagination\\\\Paginator given\\.$#"
count: 1
Expand All @@ -14105,16 +14005,6 @@ parameters:
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/CollectionController.php

-
message: "#^Parameter \\#3 \\$limit of method Sulu\\\\Bundle\\\\MediaBundle\\\\Collection\\\\Manager\\\\CollectionManagerInterface\\:\\:get\\(\\) expects int\\|null, mixed given\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/CollectionController.php

-
message: "#^Parameter \\#3 \\$limit of method Sulu\\\\Bundle\\\\MediaBundle\\\\Collection\\\\Manager\\\\CollectionManagerInterface\\:\\:getTree\\(\\) expects int, mixed given\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/CollectionController.php

-
message: "#^Parameter \\#5 \\$depth of method Sulu\\\\Bundle\\\\MediaBundle\\\\Collection\\\\Manager\\\\CollectionManagerInterface\\:\\:getTree\\(\\) expects int, mixed given\\.$#"
count: 1
Expand Down Expand Up @@ -14145,11 +14035,6 @@ parameters:
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/CollectionController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\FormatController\\:\\:cgetAction\\(\\) has no return type specified\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/FormatController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\FormatController\\:\\:getRequestParameter\\(\\) should return string but returns mixed\\.$#"
count: 1
Expand All @@ -14175,11 +14060,6 @@ parameters:
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/MediaController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\MediaController\\:\\:deleteVersionAction\\(\\) has no return type specified\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/MediaController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\MediaController\\:\\:getListBuilder\\(\\) has parameter \\$types with no value type specified in iterable type array\\.$#"
count: 1
Expand All @@ -14190,11 +14070,6 @@ parameters:
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/MediaController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\MediaController\\:\\:getListRepresentation\\(\\) has no return type specified\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/MediaController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\MediaController\\:\\:getRequestParameter\\(\\) should return string but returns mixed\\.$#"
count: 1
Expand All @@ -14220,16 +14095,6 @@ parameters:
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/MediaController.php

-
message: "#^Parameter \\#1 \\$id of method Sulu\\\\Component\\\\Rest\\\\AbstractRestController\\:\\:responseDelete\\(\\) expects string, int given\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/MediaController.php

-
message: "#^Parameter \\#1 \\$id of method Sulu\\\\Component\\\\Rest\\\\AbstractRestController\\:\\:responseGetById\\(\\) expects string, int given\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/MediaController.php

-
message: "#^Parameter \\#2 \\$fieldDescriptors of method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\MediaController\\:\\:getListBuilder\\(\\) expects array\\<Sulu\\\\Component\\\\Rest\\\\ListBuilder\\\\FieldDescriptorInterface\\>, array\\<Sulu\\\\Component\\\\Rest\\\\ListBuilder\\\\FieldDescriptorInterface\\>\\|null given\\.$#"
count: 1
Expand Down Expand Up @@ -14270,16 +14135,6 @@ parameters:
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/MediaController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\MediaFormatController\\:\\:cpatchAction\\(\\) has no return type specified\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/MediaFormatController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\MediaFormatController\\:\\:cpatchAction\\(\\) has parameter \\$id with no type specified\\.$#"
count: 1
path: src/Sulu/Bundle/MediaBundle/Controller/MediaFormatController.php

-
message: "#^Method Sulu\\\\Bundle\\\\MediaBundle\\\\Controller\\\\MediaFormatController\\:\\:getRequestParameter\\(\\) should return string but returns mixed\\.$#"
count: 1
Expand Down Expand Up @@ -18145,11 +18000,6 @@ parameters:
count: 2
path: src/Sulu/Bundle/MediaBundle/Tests/Unit/Media/Manager/MediaManagerTest.php

-
message: "#^Parameter \\#1 \\$uploadedFile of method Sulu\\\\Bundle\\\\MediaBundle\\\\Media\\\\Manager\\\\MediaManager\\:\\:save\\(\\) expects Symfony\\\\Component\\\\HttpFoundation\\\\File\\\\UploadedFile, null given\\.$#"
count: 2
path: src/Sulu/Bundle/MediaBundle/Tests/Unit/Media/Manager/MediaManagerTest.php

-
message: "#^Property Sulu\\\\Bundle\\\\MediaBundle\\\\Media\\\\Manager\\\\MediaManagerTest\\:\\:\\$categoryManager is never read, only written\\.$#"
count: 1
Expand Down Expand Up @@ -28080,16 +27930,6 @@ parameters:
count: 1
path: src/Sulu/Bundle/SecurityBundle/Controller/UserController.php

-
message: "#^Parameter \\#1 \\$id of method Sulu\\\\Component\\\\Rest\\\\AbstractRestController\\:\\:responseDelete\\(\\) expects string, int given\\.$#"
count: 1
path: src/Sulu/Bundle/SecurityBundle/Controller/UserController.php

-
message: "#^Parameter \\#1 \\$id of method Sulu\\\\Component\\\\Rest\\\\AbstractRestController\\:\\:responseGetById\\(\\) expects string, int given\\.$#"
count: 1
path: src/Sulu/Bundle/SecurityBundle/Controller/UserController.php

-
message: "#^Property Sulu\\\\Bundle\\\\SecurityBundle\\\\Controller\\\\UserController\\:\\:\\$doctrineListBuilderFactory \\(Doctrine\\\\ORM\\\\EntityManagerInterface\\) does not accept Sulu\\\\Component\\\\Rest\\\\ListBuilder\\\\Doctrine\\\\DoctrineListBuilderFactoryInterface\\.$#"
count: 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @flow
import React from 'react';
import {computed} from 'mobx';
import {CircularProgressbar as ReactCircularProgressbar} from 'react-circular-progressbar';
import circularProgressbarStyles from './circularProgressbar.scss';

Expand All @@ -16,21 +17,18 @@ export default class CircularProgressbar extends React.PureComponent<Props> {
size: 100,
};

handlePercentageText = (percentage: number) => {
const {hidePercentageText} = this.props;
@computed get percentageText() {
const {hidePercentageText, percentage} = this.props;

if (hidePercentageText) {
return null;
}

return `${percentage}%`;
};
}

render() {
const {
size,
percentage,
} = this.props;
const {size, percentage} = this.props;
const sizeStyle = {
width: size,
height: size,
Expand All @@ -47,8 +45,8 @@ export default class CircularProgressbar extends React.PureComponent<Props> {
text: circularProgressbarStyles.text,
background: circularProgressbarStyles.background,
}}
percentage={percentage}
textForPercentage={this.handlePercentageText} // eslint-disable-line react/jsx-handler-names
text={this.percentageText}
value={percentage}
/>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,15 @@ exports[`Render a CircularProgressbar 1`] = `
"
fill-opacity="0"
stroke-width="8"
style="stroke-dasharray: 289.02652413026095px 289.02652413026095px; stroke-dashoffset: NaNpx;"
style="stroke-dasharray: 289.02652413026095px 289.02652413026095px; stroke-dashoffset: 115.61060965210439px;"
/>
<text
class="text"
x="50"
y="50"
>
60%
</text>
</svg>
</div>
</div>
Expand Down Expand Up @@ -81,8 +88,15 @@ exports[`Render a CircularProgressbar in a different size 1`] = `
"
fill-opacity="0"
stroke-width="8"
style="stroke-dasharray: 289.02652413026095px 289.02652413026095px; stroke-dashoffset: NaNpx;"
style="stroke-dasharray: 289.02652413026095px 289.02652413026095px; stroke-dashoffset: 115.61060965210439px;"
/>
<text
class="text"
x="50"
y="50"
>
60%
</text>
</svg>
</div>
</div>
Expand Down Expand Up @@ -125,7 +139,7 @@ exports[`Render a CircularProgressbar without the progress info in the center 1`
"
fill-opacity="0"
stroke-width="8"
style="stroke-dasharray: 289.02652413026095px 289.02652413026095px; stroke-dashoffset: NaNpx;"
style="stroke-dasharray: 289.02652413026095px 289.02652413026095px; stroke-dashoffset: 115.61060965210439px;"
/>
</svg>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function getTreeById($id, $locale);
*
* @param string $locale the locale which the collection should be return
* @param int $offset
* @param int $limit
* @param int|null $limit
* @param string $search
* @param int $depth maximum depth for query
* @param array $sortBy
Expand Down

0 comments on commit ff9e21e

Please sign in to comment.