?
avatar shoulders
shoulders
1 Dec 2020

Is your feature request related to a problem? Please describe.

There is only one global preflight() and postflight() in an extension script.php file that you can use.

This is restrictive and you have to use your own identifiers to specify what actions occur for which versions, this can get quite complex when you do lots of changes between each version as they all have to go in these 2 functions

I have my own software where I have implemented version specific preflight() and postflight() functions and is very useful. It is not done in the same below, but i am trying to fit it into the Joomla paradigm.

Describe the solution you'd like

Version specific preflight() and postflight() functions and they would be in the format such as:

  • preflight3-1-2-stable()
  • postflight3-1-2-stable()
  • preFlight3-1-2-rc-1()
  • postFlight3-1-2-rc-1()
  • preFlight3-1-2-alpha-1()
  • postFlight3-1-2-alpha-1()
  • etc..

The above function names take into account stability and stability subversion

The functions could be call with something like function_exists ( $function_name ) so they are only present if required.

The global preflight() and postflight() will still run as normal.

Additional context

avatar shoulders shoulders - open - 1 Dec 2020
avatar joomla-cms-bot joomla-cms-bot - change - 1 Dec 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 1 Dec 2020
avatar Fedik
Fedik - comment - 1 Dec 2020

For such things exists version_compare() https://www.php.net/manual/en/function.version-compare.php
that you can run in your preflight() and postflight()

Versioned preflight() and postflight() just adds complication in the core with a zero real profit

avatar bembelimen bembelimen - change - 7 Dec 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-12-07 09:15:36
Closed_By bembelimen
avatar bembelimen
bembelimen - comment - 7 Dec 2020

As @Fedik said....

avatar bembelimen bembelimen - close - 7 Dec 2020

Add a Comment

Login with GitHub to post a comment