View Issue Details

IDProjectCategoryView StatusLast Update
0000083Adventure PHP FrameworkNeues Feature // New Featurepublic2015-10-12 12:20
Reporteruser15Assigned ToChristianAchatz 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status closedResolutionfixed 
Product Version2.0 
Target Version2.1Fixed in Version2.1 
Summary0000083: Allow priorisation of frontcontroller actions
DescriptionSometimes it might be handy to control the order of the front controller action stack elements, e.g.

- action A should always be called before/after action B (maybe introduce some kind of dependencies between actions)
- action A should always be called first/last (maybe throw exception if such an action is already present in stack)

This could be done by adding a numeric priority to the actions or by - much cooler - add a dependency (before/after/depends,...) to the corresponding action.
TagsNo tags attached.
Codereferenz: ([Datei]:[Zeile])
Namespacecore

Relationships

related to 0000175 closedChristianAchatz Allow declarative definition of front controller action dependencies 

Activities

ChristianAchatz

2013-11-13 23:11

administrator   ~0000069

@Jan: is there a reason, why we should postpone that feature to 2.2? Seems not a big deal and thus something that we even can add in 2.0 (earliest)...

jwlighting

2013-11-13 23:42

administrator   ~0000070

i mean we should have implemented the feature until 2.2. if it is implemented earlier, it'll be even better.
in my opinion we should focus on the missing features and docu for 2.0 right now and postpone this feature at least to version 2.1.
but 2.0 would be even ok for me if you think this is important enough.

ChristianAchatz

2013-11-28 22:10

administrator   ~0000112

Agree. Changes version to 2.1.

ChristianAchatz

2014-03-11 23:53

administrator   ~0000260

Analyzed the present implementation of the Frontcontroller. Easiest solution is - as mentioned - numeric priority assignment.

Using this approach allows

- sort actions on stack by priority
- sort actions by order of registration in case of equal priority

Providing the ability to add custom logic to AbstractFrontcontrollerAction::getPriority() dependencies of priorities might be adapted implementation-wise (e.g. adapt priority in subject to whether another action is on the stack or not).

Suggestion: let's start with "simple" prioritization and add another feature request later on, in case the new implementation does not suffice.

@astangl: agree?

user15

2014-03-12 08:22

  ~0000262

Sure. Let's keep it simple. A basic priority queue should be enough.

ChristianAchatz

2014-03-12 14:53

administrator   ~0000263

Fine. I'll clone this one as a marker with low prio for further releases in case we need further enhancement (e.g. dependent actions etc.).

ChristianAchatz

2014-03-12 14:56

administrator   ~0000264

* Implementation done
* Unit Tests available
* Documentation to be written

ChristianAchatz

2014-03-20 20:57

administrator   ~0000271

* Finished documentation.

Issue History

Date Modified Username Field Change
2013-11-12 15:12 user15 New Issue
2013-11-13 09:52 jwlighting Severity minor => feature
2013-11-13 09:52 jwlighting Product Version => 2.0
2013-11-13 09:52 jwlighting Target Version => 3.0
2013-11-13 23:11 ChristianAchatz Note Added: 0000069
2013-11-13 23:42 jwlighting Note Added: 0000070
2013-11-28 22:09 ChristianAchatz Target Version 3.0 => 2.1
2013-11-28 22:10 ChristianAchatz Note Added: 0000112
2014-03-11 22:56 ChristianAchatz Assigned To => ChristianAchatz
2014-03-11 22:56 ChristianAchatz Status new => assigned
2014-03-11 23:53 ChristianAchatz Note Added: 0000260
2014-03-12 08:22 user15 Note Added: 0000262
2014-03-12 14:53 ChristianAchatz Note Added: 0000263
2014-03-12 14:55 ChristianAchatz Issue cloned: 0000175
2014-03-12 14:55 ChristianAchatz Relationship added related to 0000175
2014-03-12 14:56 ChristianAchatz Note Added: 0000264
2014-03-20 20:57 ChristianAchatz Note Added: 0000271
2014-03-20 20:57 ChristianAchatz Status assigned => resolved
2014-03-20 20:57 ChristianAchatz Fixed in Version => 2.1
2014-03-20 20:57 ChristianAchatz Resolution open => fixed
2015-10-12 12:20 ChristianAchatz Status resolved => closed