Skip to content

Commit

Permalink
Merge pull request #213 from ember-nexus/github-issue/168
Browse files Browse the repository at this point in the history
GitHub issue/168
  • Loading branch information
Syndesi authored Dec 11, 2023
2 parents fdcab12 + 2bd9bf4 commit 34b5c55
Show file tree
Hide file tree
Showing 31 changed files with 133 additions and 273 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ ELASTIC_AUTH=ember-nexus-elasticsearch:9200
REDIS_AUTH=tcp://ember-nexus-redis?password=redis-password
RABBITMQ_AUTH=amqp://user:password@ember-nexus-rabbitmq:5672

REFERENCE_DATASET_VERSION=0.0.17
REFERENCE_DATASET_VERSION=0.0.20
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
/.php-cs-fixer.cache
###< friendsofphp/php-cs-fixer ###

###> phpunit/phpunit ###
/phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###

###> symfony/phpunit-bridge ###
.phpunit.result.cache
/phpunit.xml
Expand Down
2 changes: 0 additions & 2 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ rules:
present: false

line-length: false
# allow-non-breakable-words: true
# allow-non-breakable-inline-mappings: false

comments-indentation: false
truthy: false
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
### Changed
- Remove commented and unused code, configuration etc., closes #168.
### Fixed
- Deleting tokens now deletes the correct token from Redis, fixes #186.
- Add missing feature tests, related to #168.

## 0.0.38 - 2023-12-08
### Added
Expand Down
1 change: 0 additions & 1 deletion TODO.md

This file was deleted.

2 changes: 0 additions & 2 deletions config/internal-parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@ parameters:
_dev_version: 'dev'
version: '%env(default:_dev_version:VERSION)%'
anonymousUserUUID: '%env(ANONYMOUS_USER_UUID)%'
problemInstanceLinks:
404-not-found: null
15 changes: 8 additions & 7 deletions docs/api-endpoints/element/get-index/200-response-body.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,28 @@
"type": "Sphere",
"id": "56fda20c-b238-4034-b555-1df47c47e17a",
"data": {
"created": "2023-10-28T21:03:25+00:00",
"updated": "2023-10-28T21:03:25+00:00",
"created": "2023-12-11T05:43:57+00:00",
"updated": "2023-12-11T05:43:57+00:00",
"name": "Tag"
}
},
{
"type": "Sphere",
"id": "7b80b203-2b82-40f5-accd-c7089fe6114e",
"data": {
"created": "2023-10-28T21:03:25+00:00",
"updated": "2023-10-28T21:03:25+00:00",
"created": "2023-12-11T05:43:57+00:00",
"updated": "2023-12-11T05:43:57+00:00",
"name": "Comment"
}
},
{
"type": "Token",
"id": "e3b81351-fe0c-4f8f-ad22-78b6157edde8",
"data": {
"created": "2023-10-28T21:03:25+00:00",
"updated": "2023-10-28T21:03:25+00:00",
"note": "Token contains token only due to testing purposes."
"created": "2023-12-11T05:43:57+00:00",
"updated": "2023-12-11T05:43:57+00:00",
"note": "Token contains token only due to testing purposes.",
"state": "ACTIVE"
}
}
],
Expand Down
7 changes: 4 additions & 3 deletions docs/api-endpoints/user/get-token/200-response-body.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"type": "Token",
"id": "2f8e245a-ff14-4f3c-b2c9-b8f7a61e55d6",
"data": {
"created": "2023-10-06T21:16:27+00:00",
"updated": "2023-10-06T21:16:27+00:00",
"created": "2023-12-10T14:34:21+00:00",
"updated": "2023-12-10T14:34:21+00:00",
"note": "Token contains token only due to testing purposes.",
"scenario": "endpoint.user.getToken"
"scenario": "endpoint.user.getToken",
"state": "ACTIVE"
}
}
3 changes: 0 additions & 3 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@ parameters:
paths:
- src
checkGenericClassInNonGenericObjectType: false
ignoreErrors:
# - '#Method [a-zA-Z0-9\\_:()]+ should return static\([a-zA-Z0-9\\_]+\) but returns [a-zA-Z0-9\\_]+\.#'
# - '#Method [a-zA-Z0-9\\_]+::current\(\) should return [a-zA-Z0-9\\_]+ but returns object\.#'
includes:
- vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon
7 changes: 0 additions & 7 deletions phpunit.feature.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,4 @@
<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
</listeners>

<!-- Run `composer require symfony/panther` before enabling this extension -->
<!--
<extensions>
<extension class="Symfony\Component\Panther\ServerExtension" />
</extensions>
-->
</phpunit>
7 changes: 0 additions & 7 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,4 @@
<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
</listeners>

<!-- Run `composer require symfony/panther` before enabling this extension -->
<!--
<extensions>
<extension class="Symfony\Component\Panther\ServerExtension" />
</extensions>
-->
</phpunit>
1 change: 0 additions & 1 deletion src/Command/UserCreateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ protected function configure(): void
$this->emberNexusConfiguration->getRegisterUniqueIdentifier()
)
);
// TODO: Make plaintext password insert optional, direct insert from console would be better
$this->addArgument('password', InputArgument::REQUIRED, 'Password of the user');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public function __construct(
*/
public function onKernelException(ExceptionEvent $event): void
{
// $this->logger->error($event->getThrowable());
$originalException = $extendedException = $event->getThrowable();
if (!($originalException instanceof ProblemJsonException)) {
$extendedException = $this->server500InternalServerErrorExceptionFactory->createFromTemplate('Other internal exception.');
Expand Down
1 change: 0 additions & 1 deletion src/EventSystem/Exception/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ services:
- name: kernel.event_listener
event: 'kernel.exception'
method: 'onKernelException'
# todo: check if lower priority is ok
priority: 2048
24 changes: 0 additions & 24 deletions src/EventSystem/Kernel/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,6 @@ services:
autowire: true
autoconfigure: true

# App\EventListener\EndCheckUserSuppliedPropertiesEventListener:
# tags:
# - name: kernel.event_listener
# event: 'App\Event\CheckUserSuppliedPropertiesEvent'
# method: 'onCheckUserSuppliedPropertiesEvent'
#
# App\EventListener\IdCheckUserSuppliedPropertiesEventListener:
# tags:
# - name: kernel.event_listener
# event: 'App\Event\CheckUserSuppliedPropertiesEvent'
# method: 'onCheckUserSuppliedPropertiesEvent'
#
# App\EventListener\StartCheckUserSuppliedPropertiesEventListener:
# tags:
# - name: kernel.event_listener
# event: 'App\Event\CheckUserSuppliedPropertiesEvent'
# method: 'onCheckUserSuppliedPropertiesEvent'
#
# App\EventListener\TypeCheckUserSuppliedPropertiesEventListener:
# tags:
# - name: kernel.event_listener
# event: 'App\Event\CheckUserSuppliedPropertiesEvent'
# method: 'onCheckUserSuppliedPropertiesEvent'

App\EventSystem\Kernel\EventListener\RabbitMqConnectionListener:
tags:
- name: kernel.event_listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public function onNormalizedValueToRawValueEvent(NormalizedValueToRawValueEvent
$normalizedValue = $event->getNormalizedValue();
if (
is_array($normalizedValue)
// is_object($normalizedValue) ||
|| is_numeric($normalizedValue)
|| is_bool($normalizedValue)
|| is_string($normalizedValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public function onRawValueToNormalizedValueEvent(RawValueToNormalizedValueEvent
$rawValue = $event->getRawValue();
if (
is_array($rawValue)
// is_object($rawValue) ||
|| is_numeric($rawValue)
|| is_bool($rawValue)
|| is_string($rawValue)
Expand Down
152 changes: 0 additions & 152 deletions src/EventSystem/Request/EventListener/RouterListener.php.dis

This file was deleted.

5 changes: 0 additions & 5 deletions src/EventSystem/Request/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ services:
event: 'kernel.request'
method: 'onKernelRequest'

# App\EventSystem\Request\EventListener\RouterListener:
# arguments:
# $matcher: '@router.default'


App\EventSystem\Request\EventListener\LogRequestListener:
arguments:
$matcher: '@router.default'
Expand Down
7 changes: 0 additions & 7 deletions src/Style/EmberNexusStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ public function __construct(
'ember-nexus-orange',
new OutputFormatterStyle('#FA9640', '#D82739')
);
// $output->getFormatter()->setStyle(
// 'info',
// new OutputFormatterStyle('#D82739')
// );
parent::__construct($input, $output);
}

Expand Down Expand Up @@ -80,9 +76,6 @@ public function title(string $message): void
public function finalMessage(array|string $message): void
{
if ($this->isInSection) {
/*
* todo replace exception with new exception factory - requires ember nexus style factory itself
*/
throw new Exception('Function success() should only be called at end of command, not within sections.');
}
if (is_string($message)) {
Expand Down
Loading

0 comments on commit 34b5c55

Please sign in to comment.