Skip to content

Commit 3dd2283

Browse files
authored
Remove outdated Symfony 3 logic (#74)
1 parent 70ae730 commit 3dd2283

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed

src/Codeception/Module/Symfony.php

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ protected function debugResponse($url)
698698
$roles = $security->getRoles();
699699

700700
if ($roles instanceof Data) {
701-
$roles = $this->extractRawRoles($roles);
701+
$roles = $roles->getValue();
702702
}
703703

704704
$this->debugSection(
@@ -723,22 +723,6 @@ protected function debugResponse($url)
723723
}
724724
}
725725

726-
/**
727-
* @param Data $data
728-
* @return array
729-
*/
730-
private function extractRawRoles(Data $data): array
731-
{
732-
if ($this->dataRevealsValue($data)) {
733-
$roles = $data->getValue();
734-
} else {
735-
$raw = $data->getRawData();
736-
$roles = isset($raw[1]) ? $raw[1] : [];
737-
}
738-
739-
return $roles;
740-
}
741-
742726
/**
743727
* Returns a list of recognized domain names.
744728
*
@@ -785,18 +769,6 @@ public function rebootClientKernel()
785769
}
786770
}
787771

788-
/**
789-
* Public API from Data changed from Symfony 3.2 to 3.3.
790-
*
791-
* @param Data $data
792-
*
793-
* @return bool
794-
*/
795-
private function dataRevealsValue(Data $data): bool
796-
{
797-
return method_exists($data, 'getValue');
798-
}
799-
800772
/**
801773
* Returns list of the possible kernel classes based on the module configuration
802774
*

0 commit comments

Comments
 (0)