Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ This component is part of "Step-up Authentication as-a Service". See [Stepup-Dep

## Requirements

* PHP 5.6+ or PHP7
* PHP 8.2
* [Composer](https://getcomposer.org/)
* A web server (Apache, Nginx)
* MariaDB 10
* MariaDB 10.6
* A working [Gateway](https://github.com/OpenConext/Stepup-Gateway)

## Installation

Clone the repository or download the archive to a directory. Install the dependencies by running `composer install` and fill out the database credentials et cetera.

Make sure to run database migrations using `bin/console middleware:migrations:migrate`.
Make sure to run database migrations using `bin/console doctrine:migrations:migrate`.

When using 'Stepup-Deploy' the 'deploy' entity manager should be used in order to use the correct credentials e.g. `bin/console middleware:migrations:migrate --em=deploy`
When using 'Stepup-Deploy' the 'deploy' entity manager should be used in order to use the correct credentials e.g. `bin/console doctrine:migrations:migrate --em=deploy`

## Management API

Expand All @@ -31,6 +31,9 @@ Some of the configuration of the components is static (i.e. stored in parametere

## Development Notes

### Technical debt
* https://github.com/broadway/event-store-dbal is blocks upgrade to `doctrine/dbal:^4.0`

### Adding new events

Whenever adding a new event, be sure to update `bin/config/events.yml`.
Expand Down
48 changes: 0 additions & 48 deletions ci/qa/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2850,12 +2850,6 @@ parameters:
count: 1
path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/DateTimeType.php

-
message: '#^Parameter \#2 \$datetime of static method DateTime\:\:createFromFormat\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 1
path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/DateTimeType.php

-
message: '#^Parameter \#1 \$documentNumber of class Surfnet\\Stepup\\Identity\\Value\\DocumentNumber constructor expects string, mixed given\.$#'
identifier: argument.type
Expand Down Expand Up @@ -2928,12 +2922,6 @@ parameters:
count: 1
path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/NameIdType.php

-
message: '#^Cannot cast T of mixed to int\.$#'
identifier: cast.int
count: 1
path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/NumberOfTokensPerIdentityType.php

-
message: '#^Parameter \#1 \$raLocationName of class Surfnet\\Stepup\\Configuration\\Value\\RaLocationName constructor expects string, mixed given\.$#'
identifier: argument.type
Expand Down Expand Up @@ -4566,30 +4554,6 @@ parameters:
count: 1
path: ../../src/Surfnet/StepupMiddleware/ManagementBundle/Validator/ServiceProviderConfigurationValidator.php

-
message: '#^Parameter \#1 \$value of static method Assert\\Assertion\:\:nullOrDate\(\) expects string\|null, mixed given\.$#'
identifier: argument.type
count: 1
path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/EmailVerifiedSecondFactorRemindersCommand.php

-
message: '#^Parameter \#2 \$datetime of static method DateTime\:\:createFromFormat\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 1
path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/EmailVerifiedSecondFactorRemindersCommand.php

-
message: '#^Parameter \#2 \.\.\.\$values of function sprintf expects bool\|float\|int\|string\|null, mixed given\.$#'
identifier: argument.type
count: 1
path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/EmailVerifiedSecondFactorRemindersCommand.php

-
message: '#^Property Surfnet\\StepupMiddleware\\CommandHandlingBundle\\Identity\\Command\\SendVerifiedSecondFactorRemindersCommand\:\:\$dryRun \(bool\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/EmailVerifiedSecondFactorRemindersCommand.php

-
message: '#^Cannot access property \$id on Surfnet\\StepupMiddleware\\ApiBundle\\Identity\\Entity\\Identity\|null\.$#'
identifier: property.nonObject
Expand All @@ -4614,18 +4578,6 @@ parameters:
count: 1
path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/MigrateSecondFactorCommand.php

-
message: '#^Cannot cast mixed to int\.$#'
identifier: cast.int
count: 1
path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/ReplayEventsCommand.php

-
message: '#^Parameter \#2 \.\.\.\$values of function sprintf expects bool\|float\|int\|string\|null, mixed given\.$#'
identifier: argument.type
count: 1
path: ../../src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/ReplayEventsCommand.php

-
message: '#^Parameter \#1 \$projector of method Surfnet\\StepupMiddleware\\MiddlewareBundle\\Service\\TransactionAwareEventDispatcher\:\:registerProjector\(\) expects Broadway\\EventHandling\\EventListener, mixed given\.$#'
identifier: argument.type
Expand Down
2 changes: 1 addition & 1 deletion component_info
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PHP_VERSION=82
SYMFONY_VERSION=6
SYMFONY_VERSION=7
ENCORE=no
ASSETIC=no
NODE_VERSION=20
Expand Down
12 changes: 10 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,24 @@
"src/Surfnet/StepupMiddleware/ApiBundle/Tests/Request/commands.php"
]
},
"minimum-stability": "stable",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/johanib/event-store-dbal"
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^8.2",
"ext-gmp": "*",
"ext-json": "*",
"ext-openssl": "*",
"ext-pdo": "*",
"broadway/broadway": "^2.5",
"broadway/event-store-dbal": "^0.6",
"broadway/event-store-dbal": "dev-feature/dbal4#35c9fa7d938cccb874f53042b5a1aca9f67dba96",
"doctrine/annotations": "^2.0",
"doctrine/dbal": "^4",
"doctrine/doctrine-bundle": "^2.13.2",
"doctrine/doctrine-migrations-bundle": "^3.4.1",
"doctrine/orm": "^3.3.2",
Expand Down
72 changes: 35 additions & 37 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions config/packages/doctrine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ doctrine:
auto_mapping: false
entity_managers:
middleware:
report_fields_where_declared: true
connection: middleware
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
mappings:
Expand All @@ -144,7 +143,6 @@ doctrine:
schema_ignore_classes:
- Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\RaCandidate
gateway:
report_fields_where_declared: true
connection: gateway
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
mappings:
Expand All @@ -153,7 +151,6 @@ doctrine:
type: attribute
is_bundle: true
deploy:
report_fields_where_declared: true
connection: deploy

when@dev:
Expand Down
4 changes: 2 additions & 2 deletions src/Surfnet/Migrations/Version20141031133057.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Version20141031133057 extends AbstractMigration
public function up(Schema $schema): void
{
$this->abortIf(
$this->connection->getDatabasePlatform()->getName() != 'mysql',
!($this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQLPlatform || $this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MariaDBPlatform),
'Migration can only be executed safely on \'mysql\'.',
);

Expand All @@ -52,7 +52,7 @@ public function up(Schema $schema): void
public function down(Schema $schema): void
{
$this->abortIf(
$this->connection->getDatabasePlatform()->getName() != 'mysql',
!($this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQLPlatform || $this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MariaDBPlatform),
'Migration can only be executed safely on \'mysql\'.',
);

Expand Down
4 changes: 2 additions & 2 deletions src/Surfnet/Migrations/Version20141031144721.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf(
$this->connection->getDatabasePlatform()->getName() != 'mysql',
!($this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQLPlatform || $this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MariaDBPlatform),
'Migration can only be executed safely on \'mysql\'.',
);

Expand All @@ -43,7 +43,7 @@ public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf(
$this->connection->getDatabasePlatform()->getName() != 'mysql',
!($this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQLPlatform || $this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MariaDBPlatform),
'Migration can only be executed safely on \'mysql\'.',
);

Expand Down
4 changes: 2 additions & 2 deletions src/Surfnet/Migrations/Version20141031163549.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf(
$this->connection->getDatabasePlatform()->getName() != 'mysql',
!($this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQLPlatform || $this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MariaDBPlatform),
'Migration can only be executed safely on \'mysql\'.',
);

Expand All @@ -43,7 +43,7 @@ public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf(
$this->connection->getDatabasePlatform()->getName() != 'mysql',
!($this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQLPlatform || $this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MariaDBPlatform),
'Migration can only be executed safely on \'mysql\'.',
);

Expand Down
Loading