Skip to content

Commit

Permalink
Rename App namespace to Surfnet/Tiqr
Browse files Browse the repository at this point in the history
  • Loading branch information
MKodde committed Jan 15, 2024
1 parent 04f9684 commit a8f3202
Show file tree
Hide file tree
Showing 57 changed files with 175 additions and 184 deletions.
2 changes: 1 addition & 1 deletion bin/console
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env php
<?php
use App\Kernel;
use Surfnet\Tiqr\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Debug\Debug;
Expand Down
60 changes: 30 additions & 30 deletions ci/qa/phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
ignoreErrors:
-
message: "#^Parameter \\#3 \\$response of method App\\\\Tiqr\\\\AuthenticationRateLimitServiceInterface\\:\\:authenticate\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#3 \\$response of method Surfnet\\\\Tiqr\\\\Tiqr\\\\AuthenticationRateLimitServiceInterface\\:\\:authenticate\\(\\) expects string, mixed given\\.$#"
count: 1
path: ../../src/Controller/AuthenticationController.php

Expand All @@ -11,52 +11,52 @@ parameters:
path: ../../src/Controller/TiqrAppApiController.php

-
message: "#^Parameter \\#1 \\$enrollmentEnrollmentKey of method App\\\\Tiqr\\\\TiqrServiceInterface\\:\\:getEnrollmentSecret\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#1 \\$enrollmentEnrollmentKey of method Surfnet\\\\Tiqr\\\\Tiqr\\\\TiqrServiceInterface\\:\\:getEnrollmentSecret\\(\\) expects string, mixed given\\.$#"
count: 1
path: ../../src/Controller/TiqrAppApiController.php

-
message: "#^Parameter \\#1 \\$enrollmentSecret of method App\\\\Tiqr\\\\TiqrServiceInterface\\:\\:finalizeEnrollment\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#1 \\$enrollmentSecret of method Surfnet\\\\Tiqr\\\\Tiqr\\\\TiqrServiceInterface\\:\\:finalizeEnrollment\\(\\) expects string, mixed given\\.$#"
count: 1
path: ../../src/Controller/TiqrAppApiController.php

-
message: "#^Parameter \\#1 \\$enrollmentSecret of method App\\\\Tiqr\\\\TiqrServiceInterface\\:\\:validateEnrollmentSecret\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#1 \\$enrollmentSecret of method Surfnet\\\\Tiqr\\\\Tiqr\\\\TiqrServiceInterface\\:\\:validateEnrollmentSecret\\(\\) expects string, mixed given\\.$#"
count: 1
path: ../../src/Controller/TiqrAppApiController.php

-
message: "#^Parameter \\#1 \\$identifier of method App\\\\Tiqr\\\\TiqrServiceInterface\\:\\:getSariForSessionIdentifier\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#1 \\$identifier of method Surfnet\\\\Tiqr\\\\Tiqr\\\\TiqrServiceInterface\\:\\:getSariForSessionIdentifier\\(\\) expects string, mixed given\\.$#"
count: 4
path: ../../src/Controller/TiqrAppApiController.php

-
message: "#^Parameter \\#1 \\$key of method App\\\\Tiqr\\\\TiqrServiceInterface\\:\\:getEnrollmentMetadata\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#1 \\$key of method Surfnet\\\\Tiqr\\\\Tiqr\\\\TiqrServiceInterface\\:\\:getEnrollmentMetadata\\(\\) expects string, mixed given\\.$#"
count: 1
path: ../../src/Controller/TiqrAppApiController.php

-
message: "#^Parameter \\#1 \\$sessionKey of method App\\\\Tiqr\\\\AuthenticationRateLimitServiceInterface\\:\\:authenticate\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#1 \\$sessionKey of method Surfnet\\\\Tiqr\\\\Tiqr\\\\AuthenticationRateLimitServiceInterface\\:\\:authenticate\\(\\) expects string, mixed given\\.$#"
count: 1
path: ../../src/Controller/TiqrAppApiController.php

-
message: "#^Parameter \\#1 \\$userId of method App\\\\Tiqr\\\\TiqrUserRepositoryInterface\\:\\:getUser\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#1 \\$userId of method Surfnet\\\\Tiqr\\\\Tiqr\\\\TiqrUserRepositoryInterface\\:\\:getUser\\(\\) expects string, mixed given\\.$#"
count: 1
path: ../../src/Controller/TiqrAppApiController.php

-
message: "#^Parameter \\#2 \\$context of static method App\\\\WithContextLogger\\:\\:from\\(\\) expects array\\<string, string\\>, array\\<string, mixed\\> given\\.$#"
message: "#^Parameter \\#2 \\$context of static method Surfnet\\\\Tiqr\\\\WithContextLogger\\:\\:from\\(\\) expects array\\<string, string\\>, array\\<string, mixed\\> given\\.$#"
count: 1
path: ../../src/Controller/TiqrAppApiController.php

-
message: "#^Parameter \\#2 \\$notificationType of method App\\\\Controller\\\\TiqrAppApiController\\:\\:loginAction\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$notificationType of method Surfnet\\\\Tiqr\\\\Controller\\\\TiqrAppApiController\\:\\:loginAction\\(\\) expects string, mixed given\\.$#"
count: 1
path: ../../src/Controller/TiqrAppApiController.php

-
message: "#^Parameter \\#2 \\$secret of method App\\\\Tiqr\\\\TiqrUserRepositoryInterface\\:\\:createUser\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$secret of method Surfnet\\\\Tiqr\\\\Tiqr\\\\TiqrUserRepositoryInterface\\:\\:createUser\\(\\) expects string, mixed given\\.$#"
count: 1
path: ../../src/Controller/TiqrAppApiController.php

Expand All @@ -66,17 +66,17 @@ parameters:
path: ../../src/Controller/TiqrAppApiController.php

-
message: "#^Parameter \\#3 \\$notificationAddress of method App\\\\Controller\\\\TiqrAppApiController\\:\\:loginAction\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#3 \\$notificationAddress of method Surfnet\\\\Tiqr\\\\Controller\\\\TiqrAppApiController\\:\\:loginAction\\(\\) expects string, mixed given\\.$#"
count: 1
path: ../../src/Controller/TiqrAppApiController.php

-
message: "#^Parameter \\#3 \\$notificationType of method App\\\\Controller\\\\TiqrAppApiController\\:\\:registerAction\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#3 \\$notificationType of method Surfnet\\\\Tiqr\\\\Controller\\\\TiqrAppApiController\\:\\:registerAction\\(\\) expects string, mixed given\\.$#"
count: 1
path: ../../src/Controller/TiqrAppApiController.php

-
message: "#^Parameter \\#3 \\$response of method App\\\\Tiqr\\\\AuthenticationRateLimitServiceInterface\\:\\:authenticate\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#3 \\$response of method Surfnet\\\\Tiqr\\\\Tiqr\\\\AuthenticationRateLimitServiceInterface\\:\\:authenticate\\(\\) expects string, mixed given\\.$#"
count: 1
path: ../../src/Controller/TiqrAppApiController.php

Expand All @@ -86,27 +86,27 @@ parameters:
path: ../../src/Controller/TiqrAppApiController.php

-
message: "#^Parameter \\#4 \\$notificationAddress of method App\\\\Controller\\\\TiqrAppApiController\\:\\:registerAction\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#4 \\$notificationAddress of method Surfnet\\\\Tiqr\\\\Controller\\\\TiqrAppApiController\\:\\:registerAction\\(\\) expects string, mixed given\\.$#"
count: 1
path: ../../src/Controller/TiqrAppApiController.php

-
message: "#^Method App\\\\DependencyInjection\\\\Configuration\\:\\:createBlockingConfig\\(\\) has no return type specified\\.$#"
message: "#^Method Surfnet\\\\Tiqr\\\\DependencyInjection\\\\Configuration\\:\\:createBlockingConfig\\(\\) has no return type specified\\.$#"
count: 1
path: ../../src/DependencyInjection/Configuration.php

-
message: "#^Method App\\\\DependencyInjection\\\\Configuration\\:\\:createGeneralConfig\\(\\) has no return type specified\\.$#"
message: "#^Method Surfnet\\\\Tiqr\\\\DependencyInjection\\\\Configuration\\:\\:createGeneralConfig\\(\\) has no return type specified\\.$#"
count: 1
path: ../../src/DependencyInjection/Configuration.php

-
message: "#^Method App\\\\DependencyInjection\\\\Configuration\\:\\:createLibraryConfig\\(\\) has no return type specified\\.$#"
message: "#^Method Surfnet\\\\Tiqr\\\\DependencyInjection\\\\Configuration\\:\\:createLibraryConfig\\(\\) has no return type specified\\.$#"
count: 1
path: ../../src/DependencyInjection/Configuration.php

-
message: "#^Method App\\\\DependencyInjection\\\\Configuration\\:\\:createStorageConfig\\(\\) has no return type specified\\.$#"
message: "#^Method Surfnet\\\\Tiqr\\\\DependencyInjection\\\\Configuration\\:\\:createStorageConfig\\(\\) has no return type specified\\.$#"
count: 1
path: ../../src/DependencyInjection/Configuration.php

Expand Down Expand Up @@ -186,7 +186,7 @@ parameters:
path: ../../src/Features/Context/TiqrContext.php

-
message: "#^Parameter \\#1 \\$src of method App\\\\Features\\\\Context\\\\TiqrContext\\:\\:getFileContentsInsecure\\(\\) expects string, string\\|null given\\.$#"
message: "#^Parameter \\#1 \\$src of method Surfnet\\\\Tiqr\\\\Features\\\\Context\\\\TiqrContext\\:\\:getFileContentsInsecure\\(\\) expects string, string\\|null given\\.$#"
count: 2
path: ../../src/Features/Context/TiqrContext.php

Expand All @@ -206,7 +206,7 @@ parameters:
path: ../../src/Features/Context/TiqrContext.php

-
message: "#^Property App\\\\Features\\\\Context\\\\TiqrContext\\:\\:\\$metadata \\(stdClass\\) does not accept mixed\\.$#"
message: "#^Property Surfnet\\\\Tiqr\\\\Features\\\\Context\\\\TiqrContext\\:\\:\\$metadata \\(stdClass\\) does not accept mixed\\.$#"
count: 1
path: ../../src/Features/Context/TiqrContext.php

Expand All @@ -216,12 +216,12 @@ parameters:
path: ../../src/Features/Context/WebContext.php

-
message: "#^Parameter \\#1 \\$key of method App\\\\Features\\\\Context\\\\WebContext\\:\\:loadPrivateKey\\(\\) expects SAML2\\\\Configuration\\\\PrivateKey, mixed given\\.$#"
message: "#^Parameter \\#1 \\$key of method Surfnet\\\\Tiqr\\\\Features\\\\Context\\\\WebContext\\:\\:loadPrivateKey\\(\\) expects SAML2\\\\Configuration\\\\PrivateKey, mixed given\\.$#"
count: 1
path: ../../src/Features/Context/WebContext.php

-
message: "#^Property App\\\\Features\\\\Context\\\\WebContext\\:\\:\\$previousMinkSession \\(string\\) does not accept string\\|null\\.$#"
message: "#^Property Surfnet\\\\Tiqr\\\\Features\\\\Context\\\\WebContext\\:\\:\\$previousMinkSession \\(string\\) does not accept string\\|null\\.$#"
count: 1
path: ../../src/Features/Context/WebContext.php

Expand All @@ -241,12 +241,12 @@ parameters:
path: ../../src/Tiqr/Legacy/TiqrService.php

-
message: "#^Method App\\\\Tiqr\\\\Legacy\\\\TiqrService\\:\\:getAuthenticationSessionKey\\(\\) should return string but returns mixed\\.$#"
message: "#^Method Surfnet\\\\Tiqr\\\\Tiqr\\\\Legacy\\\\TiqrService\\:\\:getAuthenticationSessionKey\\(\\) should return string but returns mixed\\.$#"
count: 1
path: ../../src/Tiqr/Legacy/TiqrService.php

-
message: "#^Method App\\\\Tiqr\\\\Legacy\\\\TiqrService\\:\\:getUserId\\(\\) should return string but returns mixed\\.$#"
message: "#^Method Surfnet\\\\Tiqr\\\\Tiqr\\\\Legacy\\\\TiqrService\\:\\:getUserId\\(\\) should return string but returns mixed\\.$#"
count: 1
path: ../../src/Tiqr/Legacy/TiqrService.php

Expand Down Expand Up @@ -286,22 +286,22 @@ parameters:
path: ../../src/Tiqr/TiqrConfiguration.php

-
message: "#^Method App\\\\Tiqr\\\\TiqrConfiguration\\:\\:getMaxAttempts\\(\\) should return int but returns mixed\\.$#"
message: "#^Method Surfnet\\\\Tiqr\\\\Tiqr\\\\TiqrConfiguration\\:\\:getMaxAttempts\\(\\) should return int but returns mixed\\.$#"
count: 1
path: ../../src/Tiqr/TiqrConfiguration.php

-
message: "#^Method App\\\\Tiqr\\\\TiqrConfiguration\\:\\:getMaxTemporarilyLoginAttempts\\(\\) should return int but returns mixed\\.$#"
message: "#^Method Surfnet\\\\Tiqr\\\\Tiqr\\\\TiqrConfiguration\\:\\:getMaxTemporarilyLoginAttempts\\(\\) should return int but returns mixed\\.$#"
count: 1
path: ../../src/Tiqr/TiqrConfiguration.php

-
message: "#^Method App\\\\Tiqr\\\\TiqrConfiguration\\:\\:getTemporarilyBlockDuration\\(\\) should return int but returns mixed\\.$#"
message: "#^Method Surfnet\\\\Tiqr\\\\Tiqr\\\\TiqrConfiguration\\:\\:getTemporarilyBlockDuration\\(\\) should return int but returns mixed\\.$#"
count: 1
path: ../../src/Tiqr/TiqrConfiguration.php

-
message: "#^Method App\\\\Tiqr\\\\TiqrConfiguration\\:\\:getTiqrOptions\\(\\) should return array\\<string, array\\<string, mixed\\>\\> but returns array\\<string, mixed\\>\\.$#"
message: "#^Method Surfnet\\\\Tiqr\\\\Tiqr\\\\TiqrConfiguration\\:\\:getTiqrOptions\\(\\) should return array\\<string, array\\<string, mixed\\>\\> but returns array\\<string, mixed\\>\\.$#"
count: 1
path: ../../src/Tiqr/TiqrConfiguration.php

Expand Down Expand Up @@ -341,6 +341,6 @@ parameters:
path: ../../src/Tiqr/TiqrFactory.php

-
message: "#^Parameter \\#6 \\$accountName of class App\\\\Tiqr\\\\Legacy\\\\TiqrService constructor expects string, mixed given\\.$#"
message: "#^Parameter \\#6 \\$accountName of class Surfnet\\\\Tiqr\\\\Tiqr\\\\Legacy\\\\TiqrService constructor expects string, mixed given\\.$#"
count: 1
path: ../../src/Tiqr/TiqrFactory.php
9 changes: 2 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@
"prefer-stable": true,
"autoload": {
"psr-4": {
"App\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Dev\\": "dev",
"Tests\\": "tests/"
"Surfnet\\Tiqr\\": "src",
"Surfnet\\Tiqr\\Dev\\": "dev"
}
},
"require": {
Expand Down
2 changes: 1 addition & 1 deletion config/packages/twig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ twig:
debug: '%kernel.debug%'
strict_variables: '%kernel.debug%'
globals:
global_view_parameters: '@App\Service\GlobalViewParameters'
global_view_parameters: '@Surfnet\Tiqr\Service\GlobalViewParameters'
20 changes: 10 additions & 10 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:

# makes classes in src/ available to be used as services
# this creates a service per class whose id is the fully-qualified class name
App\:
Surfnet\Tiqr\:
resource: '../src/*'
exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}'

Expand All @@ -32,25 +32,25 @@ services:
Symfony\Component\DependencyInjection\Container:
alias: 'service_container'

App\Tiqr\Legacy\TiqrService:
factory: ['App\Tiqr\TiqrFactory', 'createService']
Surfnet\Tiqr\Tiqr\Legacy\TiqrService:
factory: ['Surfnet\Tiqr\Tiqr\TiqrFactory', 'createService']

App\Tiqr\Legacy\TiqrUserRepository:
factory: ['App\Tiqr\TiqrFactory', 'createUserRepository']
Surfnet\Tiqr\Tiqr\Legacy\TiqrUserRepository:
factory: ['Surfnet\Tiqr\Tiqr\TiqrFactory', 'createUserRepository']

App\Tiqr\TiqrUserRepositoryInterface:
alias: App\Tiqr\Legacy\TiqrUserRepository
Surfnet\Tiqr\Tiqr\TiqrUserRepositoryInterface:
alias: Surfnet\Tiqr\Tiqr\Legacy\TiqrUserRepository

surfnet_saml.saml2.bridge_container:
class: Surfnet\SamlBundle\SAML2\BridgeContainer
arguments:
- '@logger'

App\Service\UserAgentMatcher:
Surfnet\Tiqr\Service\UserAgentMatcher:
bind:
$pattern: '%mobile_app_user_agent_pattern%'

App\Controller\ExceptionController:
Surfnet\Tiqr\Controller\ExceptionController:
tags: ['controller.service_arguments']
arguments:
$errorPageHelper: '@App\Service\ErrorPageHelper'
$errorPageHelper: '@Surfnet\Tiqr\Service\ErrorPageHelper'
6 changes: 3 additions & 3 deletions config/services_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ services:

# makes classes in src/ available to be used as services
# this creates a service per class whose id is the fully-qualified class name
Dev\:
Surfnet\Tiqr\Dev\:
resource: '../dev/*'
exclude: '../dev/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}'

Dev\Controller\:
Surfnet\Tiqr\Dev\Controller\:
resource: '../dev/Controller'
tags: ['controller.service_arguments']
# add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones
GuzzleHttp\Client:
class: GuzzleHttp\Client
factory: ['Dev\HttpClientFactory', 'create']
factory: ['Surfnet\Tiqr\Dev\HttpClientFactory', 'create']
6 changes: 3 additions & 3 deletions config/services_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ imports:
- { resource: 'services_dev.yaml' }

services:
Dev\FileLogger:
Surfnet\Tiqr\Dev\FileLogger:
public: true
decorates: 'logger'
arguments:
- '@kernel'

overide_matcher:
class: App\Service\UserAgentMatcher
class: Surfnet\Tiqr\Service\UserAgentMatcher
public: true
decorates: App\Service\UserAgentMatcher
decorates: Surfnet\Tiqr\Service\UserAgentMatcher
arguments:
- '/^Behat UA$/'

Expand Down
2 changes: 1 addition & 1 deletion dev/Command/AuthenticationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

declare(strict_types = 1);

namespace Dev\Command;
namespace Surfnet\Tiqr\Dev\Command;

use GuzzleHttp\Client;
use OCRA;
Expand Down
2 changes: 1 addition & 1 deletion dev/Command/RegistrationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

declare(strict_types = 1);

namespace Dev\Command;
namespace Surfnet\Tiqr\Dev\Command;

use GuzzleHttp\Client;
use RuntimeException;
Expand Down
8 changes: 4 additions & 4 deletions dev/Controller/QrLinkController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@

declare(strict_types = 1);

namespace Dev\Controller;
namespace Surfnet\Tiqr\Dev\Controller;

use App\Tiqr\TiqrServiceInterface;
use InvalidArgumentException;
use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\Routing\Annotation\Route;
use Surfnet\Tiqr\Tiqr\TiqrServiceInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\Routing\Annotation\Route;

/**
* Exposes the qr codes as links.
Expand Down
10 changes: 4 additions & 6 deletions dev/Controller/SPController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,26 @@

declare(strict_types = 1);

namespace Dev\Controller;
namespace Surfnet\Tiqr\Dev\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response as SymfonyResponse;
use Symfony\Component\Routing\Annotation\Route;
use DOMDocument;
use RobRichards\XMLSecLibs\XMLSecurityKey;
use SAML2\Assertion;
use SAML2\Certificate\PrivateKeyLoader;
use SAML2\Configuration\PrivateKey;
use SAML2\DOMDocumentFactory;
use SAML2\Message;
use SAML2\Response;
use Surfnet\GsspBundle\Service\RegistrationService;
use Surfnet\SamlBundle\Entity\IdentityProvider;
use Surfnet\SamlBundle\Entity\ServiceProvider;
use Surfnet\SamlBundle\Http\Exception\AuthnFailedSamlResponseException;
use Surfnet\SamlBundle\Http\PostBinding;
use Surfnet\SamlBundle\SAML2\AuthnRequest;
use Surfnet\SamlBundle\SAML2\AuthnRequestFactory;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response as SymfonyResponse;
use Symfony\Component\Routing\Annotation\Route;

/**
* Demo SP.
Expand Down
Loading

0 comments on commit a8f3202

Please sign in to comment.