/**
* Validates the given $policyConfiguration and throws an exception if its not valid
*
* @param array $policyConfiguration
* @param PackageInterface $package
* @return void
* @throws Exception
*/
protected function validatePolicyConfiguration(array $policyConfiguration, PackageInterface $package)
{
$errors = [];
if (isset($policyConfiguration['resources'])) {
$errors[] = 'deprecated "resources" options';
}
if (isset($policyConfiguration['acls'])) {
$errors[] = 'deprecated "acls" options';
}
if ($errors !== []) {
throw new Exception(sprintf('The policy configuration for package "%s" is not valid.%sIt contains following error(s):%s Make sure to run all code migrations.', $package->getPackageKey(), chr(10), chr(10) . ' * ' . implode(chr(10) . ' * ', $errors) . chr(10)), 1415717875);
}
}