Deprecating the "extra" neos loading order in composer.json?


(Bastian Heist) #1

I just stumbled upon this feature in the docs:
http://flowframework.readthedocs.io/en/stable/TheDefinitiveGuide/PartIII/PackageManagement.html#loading-order
“The loading order of packages follows the dependency chain as defined in the composer manifests involved, solely taking the “require” part into consideration. Additionally you can configure packages that should be loaded before by adding an array of composer package names to “extra.neos.loading-order.after” as in this example:

"extra": {
    "neos": {
        "loading-order": {
            "after": [
                 "some/package"
            ]
        }
    }
}

If I’m not misunderstanding this, putting a package in this “after” section is exactly the same as just require-ing it. This poses the question whether we should deprecate and remove this feature as it’s basically redundant. Id like to understand if anyone is actually using this, and if so, why you’re using this instead of just putting the package in “require”. Is that just so I can define packages that should be loaded before, but not actually require them to be installed? Why would I want that?
Cheers,
Bastian


(Christian Müller) #2

Fine for me! :slight_smile:


(Bastian Waidelich) #3

yes please


(Daniel Lienert) #4

Never used it, so :+1:t3:


(Sebastian Kurfuerst) #5

fancy… :smiley: didn’t know that even existed!


(Benjamin Klix) #6

didn’t use it till now, but i can think of one situation someone wants this feature:
If you have an optional dependency that should be loaded before this package if it is in dependencies but ignored if it isn’t.

Don’t know if this case really exists, but this would be the only way i can think of why this “extra” exists.


(Christian Müller) #7

I think that actually was the case it was made for. Something like a choice of different implementations of something but which need to be loaded before a package.