private function ConfigDataCollector::determineSymfonyState in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php \Symfony\Component\HttpKernel\DataCollector\ConfigDataCollector::determineSymfonyState()
Tries to retrieve information about the current Symfony version.
Return value
string One of: dev, stable, eom, eol
1 call to ConfigDataCollector::determineSymfonyState()
- ConfigDataCollector::collect in vendor/
symfony/ http-kernel/ DataCollector/ ConfigDataCollector.php - Collects data for the given Request and Response.
File
- vendor/
symfony/ http-kernel/ DataCollector/ ConfigDataCollector.php, line 273
Class
- ConfigDataCollector
- ConfigDataCollector.
Namespace
Symfony\Component\HttpKernel\DataCollectorCode
private function determineSymfonyState() {
$now = new \DateTime();
$eom = \DateTime::createFromFormat('m/Y', Kernel::END_OF_MAINTENANCE)
->modify('last day of this month');
$eol = \DateTime::createFromFormat('m/Y', Kernel::END_OF_LIFE)
->modify('last day of this month');
if ($now > $eol) {
$versionState = 'eol';
}
elseif ($now > $eom) {
$versionState = 'eom';
}
elseif ('' !== Kernel::EXTRA_VERSION) {
$versionState = 'dev';
}
else {
$versionState = 'stable';
}
return $versionState;
}