File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -306,7 +306,15 @@ function get_branch_bug_eol_date($branch): ?DateTime
306
306
307
307
$ date = get_branch_release_date ($ branch );
308
308
309
- return $ date ? $ date ->add (new DateInterval ('P2Y ' )) : null ;
309
+ $ date = $ date ?->add(new DateInterval ('P2Y ' ));
310
+
311
+ // Versions before 8.2 do not extend the release cycle to the end of the year
312
+ if (version_compare ($ branch , '8.2 ' , '< ' )) {
313
+ return $ date ;
314
+ }
315
+
316
+ // Extend the release cycle to the end of the year
317
+ return $ date ?->setDate($ date ->format ('Y ' ), 12 , 31 );
310
318
}
311
319
312
320
function get_branch_security_eol_date ($ branch ): ?DateTime
@@ -324,7 +332,16 @@ function get_branch_security_eol_date($branch): ?DateTime
324
332
}
325
333
326
334
$ date = get_branch_release_date ($ branch );
327
- return $ date ? $ date ->add (new DateInterval ('P3Y ' )) : null ;
335
+
336
+ // Versions before 8.1 have 3-year support since the initial release
337
+ if (version_compare ($ branch , '8.1 ' , '< ' )) {
338
+ return $ date ?->add(new DateInterval ('P3Y ' ));
339
+ }
340
+
341
+ $ date = $ date ?->add(new DateInterval ('P4Y ' ));
342
+
343
+ // Extend the release cycle to the end of the year
344
+ return $ date ?->setDate($ date ->format ('Y ' ), 12 , 31 );
328
345
}
329
346
330
347
function get_branch_release_date ($ branch ): ?DateTime
You can’t perform that action at this time.
0 commit comments