Another week, another release! The release train keeps choo-choo'ing. This week it's a rather small release. But it does bring a rather important feature. The ability to limit features on plans. Previously, a plan could only have limits. This meant there was some awkwardness when you wanted to limit a feature that doesn't have limits/countable things to a plan. Today, that awkwardness is over.
Plan Features
Adding the features array/list to the plan configuration and then use it like:
use Parthenon\Subscriptions\Plan\Plan;
/** @var \Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface $authorizationChecker */
if (!$authorizationChecker->isGranted(Plan::CHECK_FEATURE, 'feature_name')) {
throw new GeneralException("Not allowed to do this");
}
Csv Exporter
Another feature added is a flexible CSV writer that will write an array of associative arrays to a csv file. A simple and easy to use class that will help with the upcoming Athena feature of csv exports.
use Parthenon\Common\Export\CsvExporter;
$csvExporter = new CsvExporter();
$rows = [
['column_one' => 'value', 'column_two' => 'value_two'],
['column_three' => 'value_three', 'column_two' => 'value_four'],
];
$csvText = $exporter->getOutput($rows);
$csvText
would contain:
column_one,column_two,column_three
value,value_two,
,value_four,value_three
RepoHealth
While working heavily on QA for Parthenon, the limiting features of GitHub Actions when it comes to notifications and linking builds has been getting extremely annoying. Since I have Parthenon and able to build SaaS systems super quickly, I decided it was time to build my own solution. To this end, I've started on working on RepoHealth. A SaaS to help me maintain the health of my repositories on GitHub.
- Step one is to fix notifications, so I get notifications on 1st failure and when it's fixed.
- Step two is to trigger other builds upon a successful build.