Skip to content
  •  
  •  
  •  
65 changes: 19 additions & 46 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,14 @@ jobs:
strategy:
matrix:
php:
- '8.0'
- '8.3'
steps:
- uses: actions/checkout@v4

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: 'pdo_sqlite, gd'
tools: cs2pr
- uses: actions/checkout@v5

- uses: "ramsey/composer-install@v3"
- uses: ibexa/gh-workflows/actions/composer-install@main
with:
dependency-versions: "highest"
gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }}

- name: Run code style check
run: composer run-script check-cs -- --format=checkstyle | cs2pr
Expand All @@ -47,20 +40,12 @@ jobs:
- '8.1'

steps:
- uses: actions/checkout@v4

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: pdo_sqlite, gd
tools: cs2pr
- uses: actions/checkout@v5

- uses: "ramsey/composer-install@v3"
- uses: ibexa/gh-workflows/actions/composer-install@main
with:
dependency-versions: "highest"
composer-options: "--prefer-dist --no-progress"
gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }}

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
Expand Down Expand Up @@ -99,19 +84,13 @@ jobs:
- '8.1'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
- uses: ibexa/gh-workflows/actions/composer-install@main
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: pdo_pgsql, gd
tools: cs2pr

- uses: ramsey/composer-install@v2
with:
dependency-versions: "highest"
gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
php-extensions: 'pdo_pgsql, gd'

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
Expand Down Expand Up @@ -154,19 +133,13 @@ jobs:
- '8.1'

steps:
- uses: actions/checkout@v3

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: pdo_mysql, gd
tools: cs2pr
- uses: actions/checkout@v5

- uses: ramsey/composer-install@v2
- uses: ibexa/gh-workflows/actions/composer-install@main
with:
dependency-versions: "highest"
gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
php-extensions: 'pdo_mysql, gd'

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"matthiasnoback/symfony-dependency-injection-test": "^4.0",
"ibexa/doctrine-schema": "~4.6.0@dev",
"ibexa/http-cache": "~4.6.0@dev",
"ibexa/code-style": "^1.3.x-dev",
"ibexa/code-style": "^2.2.x-dev",
"ibexa/notifications": "~4.6.0@dev",
"ibexa/phpstan": "~4.6.x-dev",
"ibexa/test-rest": "^0.1.x-dev",
Expand Down
140 changes: 85 additions & 55 deletions phpstan-baseline-8.0.neon

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions phpstan-baseline-8.3.neon
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,3 @@ parameters:
message: "#^Parameter \\#2 \\$length of function array_chunk expects int\\<1, max\\>, int given\\.$#"
count: 1
path: src/lib/UI/Module/ContentTree/NodeFactory.php

-
message: "#^Deprecated in PHP 8\\.0\\: Required parameter \\$translator follows optional parameter \\$name\\.$#"
count: 1
path: tests/lib/Tab/TabRegistryTest.php

-
message: "#^Deprecated in PHP 8\\.0\\: Required parameter \\$twig follows optional parameter \\$name\\.$#"
count: 1
path: tests/lib/Tab/TabRegistryTest.php
120 changes: 0 additions & 120 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -12798,12 +12798,6 @@ parameters:
count: 1
path: src/lib/UI/Config/Provider/Languages.php

-
message: '#^Method Ibexa\\AdminUi\\UI\\Config\\Provider\\Languages\:\:__construct\(\) has parameter \$siteAccesses with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: src/lib/UI/Config/Provider/Languages.php

-
message: '#^Method Ibexa\\AdminUi\\UI\\Config\\Provider\\Languages\:\:getConfig\(\) return type has no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
Expand All @@ -12828,12 +12822,6 @@ parameters:
count: 1
path: src/lib/UI/Config/Provider/Languages.php

-
message: '#^PHPDoc tag @param has invalid value \(string\[\]\)\: Unexpected token "\\n ", expected variable at offset 193 on line 4$#'
identifier: phpDoc.parseError
count: 1
path: src/lib/UI/Config/Provider/Languages.php

-
message: '#^Method Ibexa\\AdminUi\\UI\\Config\\Provider\\Locations\:\:getConfig\(\) return type has no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
Expand Down Expand Up @@ -14694,12 +14682,6 @@ parameters:
count: 1
path: tests/bundle/Templating/Twig/LimitationValueRenderingExtensionTest.php

-
message: '#^Method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) invoked with 3 parameters, 1\-2 required\.$#'
identifier: arguments.count
count: 1
path: tests/bundle/Templating/Twig/LimitationValueRenderingExtensionTest.php

-
message: '#^Parameter \#1 \$name of method Twig\\Loader\\LoaderInterface\:\:getSourceContext\(\) expects string, int\|string given\.$#'
identifier: argument.type
Expand Down Expand Up @@ -14844,12 +14826,6 @@ parameters:
count: 2
path: tests/lib/EventListener/RequestLocaleListenerTest.php

-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertNull\(\) with null will always evaluate to true\.$#'
identifier: method.alreadyNarrowedType
count: 2
path: tests/lib/EventListener/SetViewParametersListenerTest.php

-
message: '#^Method Ibexa\\Tests\\AdminUi\\EventListener\\SetViewParametersListenerTest\:\:createFieldMock\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject&Symfony\\Component\\Form\\FormInterface\.$#'
identifier: return.type
Expand All @@ -14868,18 +14844,6 @@ parameters:
count: 1
path: tests/lib/EventListener/SetViewParametersListenerTest.php

-
message: '#^Result of method Ibexa\\AdminUi\\EventListener\\SetViewParametersListener\:\:setContentEditViewTemplateParameters\(\) \(void\) is used\.$#'
identifier: method.void
count: 1
path: tests/lib/EventListener/SetViewParametersListenerTest.php

-
message: '#^Result of method Ibexa\\AdminUi\\EventListener\\SetViewParametersListener\:\:setUserUpdateViewTemplateParameters\(\) \(void\) is used\.$#'
identifier: method.void
count: 1
path: tests/lib/EventListener/SetViewParametersListenerTest.php

-
message: '#^Access to protected property Ibexa\\AdminUi\\Form\\Data\\ContentTranslationData\:\:\$fieldsData\.$#'
identifier: property.protected
Expand Down Expand Up @@ -16878,90 +16842,6 @@ parameters:
count: 1
path: tests/lib/Tab/TabGroupTest.php

-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertSame\(\) with array\{''tab1'', ''tab2''\} and array\<Ibexa\\Contracts\\AdminUi\\Tab\\TabInterface\> will always evaluate to false\.$#'
identifier: method.impossibleType
count: 1
path: tests/lib/Tab/TabRegistryTest.php

-
message: '#^Method Ibexa\\Contracts\\AdminUi\\Tab\\AbstractTab@anonymous/tests/lib/Tab/TabRegistryTest\.php\:158\:\:renderView\(\) has parameter \$parameters with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: tests/lib/Tab/TabRegistryTest.php

-
message: '#^Method Ibexa\\Contracts\\AdminUi\\Tab\\AbstractTab@anonymous/tests/lib/Tab/TabRegistryTest\.php\:158\:\:renderView\(\) should return string but returns null\.$#'
identifier: return.type
count: 1
path: tests/lib/Tab/TabRegistryTest.php

-
message: '#^Method Ibexa\\Tests\\AdminUi\\Tab\\TabRegistryTest\:\:createTabGroup\(\) has parameter \$tabs with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: tests/lib/Tab/TabRegistryTest.php

-
message: '#^Method Ibexa\\Tests\\AdminUi\\Tab\\TabRegistryTest\:\:testAddTabGroup\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: tests/lib/Tab/TabRegistryTest.php

-
message: '#^Method Ibexa\\Tests\\AdminUi\\Tab\\TabRegistryTest\:\:testAddTabGroupWithSameIdentifier\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: tests/lib/Tab/TabRegistryTest.php

-
message: '#^Method Ibexa\\Tests\\AdminUi\\Tab\\TabRegistryTest\:\:testAddTabToExistingGroup\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: tests/lib/Tab/TabRegistryTest.php

-
message: '#^Method Ibexa\\Tests\\AdminUi\\Tab\\TabRegistryTest\:\:testAddTabToNonExistentGroup\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: tests/lib/Tab/TabRegistryTest.php

-
message: '#^Method Ibexa\\Tests\\AdminUi\\Tab\\TabRegistryTest\:\:testGetTabFromGroup\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: tests/lib/Tab/TabRegistryTest.php

-
message: '#^Method Ibexa\\Tests\\AdminUi\\Tab\\TabRegistryTest\:\:testGetTabFromGroupWhenGroupDoesNotExist\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: tests/lib/Tab/TabRegistryTest.php

-
message: '#^Method Ibexa\\Tests\\AdminUi\\Tab\\TabRegistryTest\:\:testGetTabFromGroupWhenTabDoesNotExist\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: tests/lib/Tab/TabRegistryTest.php

-
message: '#^Method Ibexa\\Tests\\AdminUi\\Tab\\TabRegistryTest\:\:testGetTabsByGroupName\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: tests/lib/Tab/TabRegistryTest.php

-
message: '#^Method Ibexa\\Tests\\AdminUi\\Tab\\TabRegistryTest\:\:testGetTabsByGroupNameWhenGroupDoesNotExist\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: tests/lib/Tab/TabRegistryTest.php

-
message: '#^Property Ibexa\\Tests\\AdminUi\\Tab\\TabRegistryTest\:\:\$groupName has no type specified\.$#'
identifier: missingType.property
count: 1
path: tests/lib/Tab/TabRegistryTest.php

-
message: '#^Method Ibexa\\Tests\\AdminUi\\Translation\\Extractor\\LimitationTranslationExtractorTest\:\:testExtract\(\) has no return type specified\.$#'
identifier: missingType.return
Expand Down
17 changes: 12 additions & 5 deletions src/bundle/Command/CompileAssetsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,21 @@ protected function configure(): void
;
}

protected function initialize(InputInterface $input, OutputInterface $output): void
{
protected function initialize(
InputInterface $input,
OutputInterface $output
): void {
$timeout = $input->getOption('timeout');

if (!is_numeric($timeout)) {
throw new InvalidArgumentException('Timeout value has to be an integer.');
}
}

protected function execute(InputInterface $input, OutputInterface $output): int
{
protected function execute(
InputInterface $input,
OutputInterface $output
): int {
$timeout = (float)$input->getOption('timeout');
$env = $input->getOption('env');
$configName = $input->getOption('config-name');
Expand Down Expand Up @@ -98,7 +102,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
sprintf('Evaluating command <comment>%s</comment>', $yarnEncoreCommand)
));

$process->run(static function ($type, $buffer) use ($output, $debugFormatter, $process) {
$process->run(static function (
$type,
$buffer
) use ($output, $debugFormatter, $process) {
$output->write(
$debugFormatter->progress(
spl_object_hash($process),
Expand Down
6 changes: 4 additions & 2 deletions src/bundle/Controller/AllNotificationsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@

final class AllNotificationsController extends Controller
{
public function renderAllNotificationsPageAction(Request $request, int $page): Response
{
public function renderAllNotificationsPageAction(
Request $request,
int $page
): Response {
return $this->forward(
NotificationController::class . '::renderNotificationsPageAction',
[
Expand Down
Loading
Loading