-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update skautis/skautis to 3.0.0-alpha.4 #33
Merged
Merged
Changes from 8 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
620ba5e
update skautis/skautis to 3.0.0-alpha.3
jan-stanek 7289599
tests fix
jan-stanek 9063c2e
tests fix
jan-stanek 56bdd2b
tests fix
jan-stanek 434ad17
tests fix
jan-stanek b3e7952
tracy fix
jan-stanek 1d80dd2
variables renamed
jan-stanek b12484d
use trace from Post/Fail events
jan-stanek 13b0c9e
php version, cleanup
jan-stanek d941ceb
change to force github actions rerun
jan-stanek 6e62395
revert of: change to force github actions rerun
jan-stanek 3d44496
phpstan fix
jan-stanek 9dd9efb
return event instead of empty object
jan-stanek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Skautis\Nette\Tracy; | ||
|
||
use Psr\EventDispatcher\EventDispatcherInterface; | ||
use Skaut\Skautis\Wsdl\Event\RequestFailEvent; | ||
use Skaut\Skautis\Wsdl\Event\RequestPostEvent; | ||
use Skaut\Skautis\Wsdl\Event\RequestPreEvent; | ||
use stdClass; | ||
|
||
|
||
/** | ||
* Trida pro logovani dotazu. | ||
*/ | ||
class EventDispatcher implements EventDispatcherInterface | ||
{ | ||
/** @var SkautisQuery[] */ | ||
private $queries = []; | ||
|
||
/** | ||
* @param RequestPreEvent|RequestPostEvent|RequestFailEvent $event | ||
*/ | ||
public function dispatch($event): void | ||
{ | ||
switch (true) { | ||
case $event instanceof RequestPreEvent: | ||
// no-op | ||
break; | ||
case $event instanceof RequestPostEvent: | ||
$this->queries[] = SkautisQuery::createFromPostEvent($event); | ||
break; | ||
case $event instanceof RequestFailEvent: | ||
$this->queries[] = SkautisQuery::createFromFailEvent($event); | ||
break; | ||
} | ||
} | ||
|
||
/** @return SkautisQuery[] */ | ||
public function getQueries(): array | ||
{ | ||
return $this->queries; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Skautis\Nette\Tracy; | ||
|
||
use Skaut\Skautis\Wsdl\Event\RequestFailEvent; | ||
use Skaut\Skautis\Wsdl\Event\RequestPostEvent; | ||
use Skaut\Skautis\Wsdl\Event\RequestPreEvent; | ||
|
||
|
||
/** | ||
* Objekt s informacemi o dotazu. | ||
*/ | ||
class SkautisQuery | ||
{ | ||
/** | ||
* Nazev funkce volane pomoci SOAP requestu. | ||
* @var string | ||
*/ | ||
public $fname; | ||
|
||
/** | ||
* Parametry SOAP requestu na server. | ||
* @var array<int, mixed> | ||
*/ | ||
public $args; | ||
|
||
/** | ||
* Zasobnik volanych funkci. | ||
* @var array<int, array<string, mixed>> | ||
*/ | ||
public $trace; | ||
|
||
/** | ||
* Doba trvani pozadvku. | ||
* @var float | ||
*/ | ||
public $time; | ||
|
||
/** | ||
* SOAP response. | ||
* @var mixed | ||
*/ | ||
public $result; | ||
|
||
private function __construct($fname, $args, $trace, $time, $result) | ||
{ | ||
$this->fname = $fname; | ||
$this->args = $args; | ||
$this->trace = $trace; | ||
$this->time = $time; | ||
$this->result = $result; | ||
} | ||
|
||
public static function createFromPostEvent(RequestPostEvent $event): SkautisQuery { | ||
return new SkautisQuery($event->getFname(), $event->getArgs(), $event->getTrace(), $event->getDuration(), $event->getResult()); | ||
} | ||
|
||
public static function createFromFailEvent(RequestFailEvent $event): SkautisQuery { | ||
return new SkautisQuery($event->getFname(), $event->getArgs(), $event->getTrace(), $event->getDuration(), null); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tady mě IDE nutí zvednou PHP na 7.2, zvednul jsem i v composeru, skautis/skautis chce stejně >= 7.3