Skip to content

Remove outdated Symfony 3 logic #74

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

Merged
merged 1 commit into from
Dec 11, 2020
Merged
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
30 changes: 1 addition & 29 deletions src/Codeception/Module/Symfony.php
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ protected function debugResponse($url)
$roles = $security->getRoles();

if ($roles instanceof Data) {
$roles = $this->extractRawRoles($roles);
$roles = $roles->getValue();
}

$this->debugSection(
Expand All @@ -723,22 +723,6 @@ protected function debugResponse($url)
}
}

/**
* @param Data $data
* @return array
*/
private function extractRawRoles(Data $data): array
{
if ($this->dataRevealsValue($data)) {
$roles = $data->getValue();
} else {
$raw = $data->getRawData();
$roles = isset($raw[1]) ? $raw[1] : [];
}

return $roles;
}

/**
* Returns a list of recognized domain names.
*
Expand Down Expand Up @@ -785,18 +769,6 @@ public function rebootClientKernel()
}
}

/**
* Public API from Data changed from Symfony 3.2 to 3.3.
*
* @param Data $data
*
* @return bool
*/
private function dataRevealsValue(Data $data): bool
{
return method_exists($data, 'getValue');
}

/**
* Returns list of the possible kernel classes based on the module configuration
*
Expand Down