V
V
Vladimir Mogilev2018-12-10 11:14:59
symfony
Vladimir Mogilev, 2018-12-10 11:14:59

How to write kernel in kernel to intercept kernel?

Dear time of day to whoever reads this.
A non-trivial problem appeared out of nowhere.
There is a script that works every other time, why I don’t know, I’m tired of looking. Here also there was an idea to write an interceptor kernel.
The conditions are:

  1. there is a script connection point after the main entry point and initialization of some vital constants.
  2. After connecting the script, the kernel is created (this is already my work)
  3. The core starts to work according to the symfony principle (we initially have a OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO old project, and therefore here we give ourselves all the goodies, events, templating, etc., and most importantly, routing and dependencies)
  4. if our kernel has found the route, then we form the response object and everything is fine.
  5. BUT if we do not have a route, then perhaps it is in the old algorithm and here I have a problem, how to transfer processing to the old script?
  6. at the same time, it is necessary to save all the existing goodies (and most importantly , the package of dependencies , sometimes you need to quickly add pieces based on a new script)

I have already broken my brain on how this can be implemented. Moreover, if it is still possible to somehow shove the old processing into the new core (as an object of response), then it would be absolutely wonderful.
I understand that this is more like a fantasy, but still I would very much like to go this way, and not write new crutches.
Does anyone have any ideas on how to implement? or at least tell me where to dig

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
index0h, 2018-12-10
@AkinaySau

What you want is the path of pain. By mixing a jar of jam and a jar of shit, you get two jars of shit. There is a simpler option:
1. Separate the routes of the new and old nginx. This means that you still have two entry points.
2. Make it a rule: DO NOT use the old in the new, it is allowed to use the new in the old.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question