Skip to content

Commit a858f48

Browse files
committed
Replaced ConfigResolver with ConfigResolverInterface across codebase and updated references.
1 parent 95f8269 commit a858f48

4 files changed

Lines changed: 9 additions & 279 deletions

File tree

phpstan-baseline.neon

Lines changed: 0 additions & 270 deletions
Original file line numberDiff line numberDiff line change
@@ -498,78 +498,6 @@ parameters:
498498
count: 1
499499
path: src/bundle/Core/DependencyInjection/Configuration/ConfigParser.php
500500

501-
-
502-
message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\:\:__construct\(\) has parameter \$groupsBySiteAccess with no value type specified in iterable type array\.$#'
503-
identifier: missingType.iterableValue
504-
count: 1
505-
path: src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php
506-
507-
-
508-
message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\:\:logTooEarlyLoadedListIfNeeded\(\) has parameter \$paramName with no type specified\.$#'
509-
identifier: missingType.parameter
510-
count: 1
511-
path: src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php
512-
513-
-
514-
message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\:\:logTooEarlyLoadedListIfNeeded\(\) should return string but empty return statement found\.$#'
515-
identifier: return.empty
516-
count: 4
517-
path: src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php
518-
519-
-
520-
message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\:\:logTooEarlyLoadedListIfNeeded\(\) should return string but return statement is missing\.$#'
521-
identifier: return.missing
522-
count: 1
523-
path: src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php
524-
525-
-
526-
message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\:\:setSiteAccess\(\) has no return type specified\.$#'
527-
identifier: missingType.return
528-
count: 1
529-
path: src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php
530-
531-
-
532-
message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\:\:setUndefinedStrategy\(\) has no return type specified\.$#'
533-
identifier: missingType.return
534-
count: 1
535-
path: src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php
536-
537-
-
538-
message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\:\:warnAboutTooEarlyLoadedParams\(\) has no return type specified\.$#'
539-
identifier: missingType.return
540-
count: 1
541-
path: src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php
542-
543-
-
544-
message: '#^Parameter \#1 \$string of function strtolower expects string, string\|null given\.$#'
545-
identifier: argument.type
546-
count: 1
547-
path: src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php
548-
549-
-
550-
message: '#^Parameter \#2 \$haystack of function in_array expects array, array\|bool\|float\|int\|string\|null given\.$#'
551-
identifier: argument.type
552-
count: 1
553-
path: src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php
554-
555-
-
556-
message: '#^Property Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\:\:\$groupsBySiteAccess type has no value type specified in iterable type array\.$#'
557-
identifier: missingType.iterableValue
558-
count: 1
559-
path: src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php
560-
561-
-
562-
message: '#^Property Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\:\:\$siteAccess \(Ibexa\\Core\\MVC\\Symfony\\SiteAccess\) does not accept Ibexa\\Core\\MVC\\Symfony\\SiteAccess\|null\.$#'
563-
identifier: assign.propertyType
564-
count: 1
565-
path: src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php
566-
567-
-
568-
message: '#^Property Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\:\:\$tooEarlyLoadedList type has no value type specified in iterable type array\.$#'
569-
identifier: missingType.iterableValue
570-
count: 1
571-
path: src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php
572-
573501
-
574502
message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\\ContainerConfigResolver\:\:resolveNamespaceAndScope\(\) return type has no value type specified in iterable type array\.$#'
575503
identifier: missingType.iterableValue
@@ -19800,198 +19728,6 @@ parameters:
1980019728
count: 1
1980119729
path: tests/bundle/Core/ChainConfigResolverTest.php
1980219730

19803-
-
19804-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:getResolver\(\) has parameter \$groupsBySiteAccess with no value type specified in iterable type array\.$#'
19805-
identifier: missingType.iterableValue
19806-
count: 1
19807-
path: tests/bundle/Core/ConfigResolverTest.php
19808-
19809-
-
19810-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:hasParameterProvider\(\) has no return type specified\.$#'
19811-
identifier: missingType.return
19812-
count: 1
19813-
path: tests/bundle/Core/ConfigResolverTest.php
19814-
19815-
-
19816-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:parameterProvider\(\) has no return type specified\.$#'
19817-
identifier: missingType.return
19818-
count: 1
19819-
path: tests/bundle/Core/ConfigResolverTest.php
19820-
19821-
-
19822-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterDefaultScope\(\) has no return type specified\.$#'
19823-
identifier: missingType.return
19824-
count: 1
19825-
path: tests/bundle/Core/ConfigResolverTest.php
19826-
19827-
-
19828-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterDefaultScope\(\) has parameter \$expectedValue with no type specified\.$#'
19829-
identifier: missingType.parameter
19830-
count: 1
19831-
path: tests/bundle/Core/ConfigResolverTest.php
19832-
19833-
-
19834-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterDefaultScope\(\) has parameter \$paramName with no type specified\.$#'
19835-
identifier: missingType.parameter
19836-
count: 1
19837-
path: tests/bundle/Core/ConfigResolverTest.php
19838-
19839-
-
19840-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterFailedNull\(\) has no return type specified\.$#'
19841-
identifier: missingType.return
19842-
count: 1
19843-
path: tests/bundle/Core/ConfigResolverTest.php
19844-
19845-
-
19846-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterFailedWithException\(\) has no return type specified\.$#'
19847-
identifier: missingType.return
19848-
count: 1
19849-
path: tests/bundle/Core/ConfigResolverTest.php
19850-
19851-
-
19852-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterGlobalScope\(\) has no return type specified\.$#'
19853-
identifier: missingType.return
19854-
count: 1
19855-
path: tests/bundle/Core/ConfigResolverTest.php
19856-
19857-
-
19858-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterGlobalScope\(\) has parameter \$expectedValue with no type specified\.$#'
19859-
identifier: missingType.parameter
19860-
count: 1
19861-
path: tests/bundle/Core/ConfigResolverTest.php
19862-
19863-
-
19864-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterGlobalScope\(\) has parameter \$paramName with no type specified\.$#'
19865-
identifier: missingType.parameter
19866-
count: 1
19867-
path: tests/bundle/Core/ConfigResolverTest.php
19868-
19869-
-
19870-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterRelativeScope\(\) has no return type specified\.$#'
19871-
identifier: missingType.return
19872-
count: 1
19873-
path: tests/bundle/Core/ConfigResolverTest.php
19874-
19875-
-
19876-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterRelativeScope\(\) has parameter \$expectedValue with no type specified\.$#'
19877-
identifier: missingType.parameter
19878-
count: 1
19879-
path: tests/bundle/Core/ConfigResolverTest.php
19880-
19881-
-
19882-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterRelativeScope\(\) has parameter \$paramName with no type specified\.$#'
19883-
identifier: missingType.parameter
19884-
count: 1
19885-
path: tests/bundle/Core/ConfigResolverTest.php
19886-
19887-
-
19888-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterSpecificScope\(\) has no return type specified\.$#'
19889-
identifier: missingType.return
19890-
count: 1
19891-
path: tests/bundle/Core/ConfigResolverTest.php
19892-
19893-
-
19894-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterSpecificScope\(\) has parameter \$expectedValue with no type specified\.$#'
19895-
identifier: missingType.parameter
19896-
count: 1
19897-
path: tests/bundle/Core/ConfigResolverTest.php
19898-
19899-
-
19900-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterSpecificScope\(\) has parameter \$paramName with no type specified\.$#'
19901-
identifier: missingType.parameter
19902-
count: 1
19903-
path: tests/bundle/Core/ConfigResolverTest.php
19904-
19905-
-
19906-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetSetDefaultScope\(\) has no return type specified\.$#'
19907-
identifier: missingType.return
19908-
count: 1
19909-
path: tests/bundle/Core/ConfigResolverTest.php
19910-
19911-
-
19912-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetSetUndefinedStrategy\(\) has no return type specified\.$#'
19913-
identifier: missingType.return
19914-
count: 1
19915-
path: tests/bundle/Core/ConfigResolverTest.php
19916-
19917-
-
19918-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterNoNamespace\(\) has no return type specified\.$#'
19919-
identifier: missingType.return
19920-
count: 1
19921-
path: tests/bundle/Core/ConfigResolverTest.php
19922-
19923-
-
19924-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterNoNamespace\(\) has parameter \$defaultMatch with no type specified\.$#'
19925-
identifier: missingType.parameter
19926-
count: 1
19927-
path: tests/bundle/Core/ConfigResolverTest.php
19928-
19929-
-
19930-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterNoNamespace\(\) has parameter \$expectedResult with no type specified\.$#'
19931-
identifier: missingType.parameter
19932-
count: 1
19933-
path: tests/bundle/Core/ConfigResolverTest.php
19934-
19935-
-
19936-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterNoNamespace\(\) has parameter \$globalMatch with no type specified\.$#'
19937-
identifier: missingType.parameter
19938-
count: 1
19939-
path: tests/bundle/Core/ConfigResolverTest.php
19940-
19941-
-
19942-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterNoNamespace\(\) has parameter \$groupMatch with no type specified\.$#'
19943-
identifier: missingType.parameter
19944-
count: 1
19945-
path: tests/bundle/Core/ConfigResolverTest.php
19946-
19947-
-
19948-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterNoNamespace\(\) has parameter \$scopeMatch with no type specified\.$#'
19949-
identifier: missingType.parameter
19950-
count: 1
19951-
path: tests/bundle/Core/ConfigResolverTest.php
19952-
19953-
-
19954-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterWithNamespaceAndScope\(\) has no return type specified\.$#'
19955-
identifier: missingType.return
19956-
count: 1
19957-
path: tests/bundle/Core/ConfigResolverTest.php
19958-
19959-
-
19960-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterWithNamespaceAndScope\(\) has parameter \$defaultMatch with no type specified\.$#'
19961-
identifier: missingType.parameter
19962-
count: 1
19963-
path: tests/bundle/Core/ConfigResolverTest.php
19964-
19965-
-
19966-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterWithNamespaceAndScope\(\) has parameter \$expectedResult with no type specified\.$#'
19967-
identifier: missingType.parameter
19968-
count: 1
19969-
path: tests/bundle/Core/ConfigResolverTest.php
19970-
19971-
-
19972-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterWithNamespaceAndScope\(\) has parameter \$globalMatch with no type specified\.$#'
19973-
identifier: missingType.parameter
19974-
count: 1
19975-
path: tests/bundle/Core/ConfigResolverTest.php
19976-
19977-
-
19978-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterWithNamespaceAndScope\(\) has parameter \$groupMatch with no type specified\.$#'
19979-
identifier: missingType.parameter
19980-
count: 1
19981-
path: tests/bundle/Core/ConfigResolverTest.php
19982-
19983-
-
19984-
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterWithNamespaceAndScope\(\) has parameter \$scopeMatch with no type specified\.$#'
19985-
identifier: missingType.parameter
19986-
count: 1
19987-
path: tests/bundle/Core/ConfigResolverTest.php
19988-
19989-
-
19990-
message: '#^Parameter \#1 \$container of class Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver constructor expects Symfony\\Component\\DependencyInjection\\ContainerInterface, PHPUnit\\Framework\\MockObject\\MockObject given\.$#'
19991-
identifier: argument.type
19992-
count: 1
19993-
path: tests/bundle/Core/ConfigResolverTest.php
19994-
1999519731
-
1999619732
message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\ChainConfigResolverPassTest\:\:addResolverProvider\(\) has no return type specified\.$#'
1999719733
identifier: missingType.return
@@ -43620,12 +43356,6 @@ parameters:
4362043356
count: 1
4362143357
path: tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php
4362243358

43623-
-
43624-
message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\SiteAccess\\ConfigResolverInterface\:\:expects\(\)\.$#'
43625-
identifier: method.notFound
43626-
count: 1
43627-
path: tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php
43628-
4362943359
-
4363043360
message: '#^Call to an undefined method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ConfigurableMatcherFactoryInterface\:\:expects\(\)\.$#'
4363143361
identifier: method.notFound

src/bundle/Core/DependencyInjection/Configuration/Parser/LocationView.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser;
99

10-
use Ibexa\Bundle\Core\DependencyInjection\Configuration\ConfigResolver;
1110
use Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface;
11+
use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
1212

1313
class LocationView extends View
1414
{
@@ -18,10 +18,10 @@ class LocationView extends View
1818
public function preMap(array $config, ContextualizerInterface $contextualizer): void
1919
{
2020
$scopes = array_merge(
21-
[ConfigResolver::SCOPE_GLOBAL],
21+
[ConfigResolverInterface::SCOPE_GLOBAL],
2222
$config['siteaccess']['list'],
2323
array_keys($config['siteaccess']['groups']),
24-
[ConfigResolver::SCOPE_DEFAULT]
24+
[ConfigResolverInterface::SCOPE_DEFAULT]
2525
);
2626

2727
foreach ($scopes as $scope) {

src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware;
99

10-
use Ibexa\Bundle\Core\DependencyInjection\Configuration\ConfigResolver;
10+
use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
1111
use Symfony\Component\DependencyInjection\ContainerInterface;
1212

1313
class Contextualizer implements ContextualizerInterface

tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware;
99

10-
use Ibexa\Bundle\Core\DependencyInjection\Configuration\ConfigResolver;
1110
use Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\Contextualizer;
1211
use Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface;
12+
use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
1313
use PHPUnit\Framework\TestCase;
1414
use Symfony\Component\DependencyInjection\ContainerBuilder;
1515
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -458,22 +458,22 @@ public function testFullMapConfigArray(
458458

459459
$hasParameterMap = [
460460
[
461-
$this->namespace . '.' . ConfigResolver::SCOPE_DEFAULT . '.' . $testId,
461+
$this->namespace . '.' . ConfigResolverInterface::SCOPE_DEFAULT . '.' . $testId,
462462
true,
463463
],
464464
[
465-
$this->namespace . '.' . ConfigResolver::SCOPE_GLOBAL . '.' . $testId,
465+
$this->namespace . '.' . ConfigResolverInterface::SCOPE_GLOBAL . '.' . $testId,
466466
true,
467467
],
468468
];
469469

470470
$getParameterMap = [
471471
[
472-
$this->namespace . '.' . ConfigResolver::SCOPE_DEFAULT . '.' . $testId,
472+
$this->namespace . '.' . ConfigResolverInterface::SCOPE_DEFAULT . '.' . $testId,
473473
$defaultValue,
474474
],
475475
[
476-
$this->namespace . '.' . ConfigResolver::SCOPE_GLOBAL . '.' . $testId,
476+
$this->namespace . '.' . ConfigResolverInterface::SCOPE_GLOBAL . '.' . $testId,
477477
$globalValue,
478478
],
479479
];

0 commit comments

Comments
 (0)