How, when and where to use import()
correctly
#3654
Unanswered
SimJoSt
asked this question in
Help needed
Replies: 1 comment 1 reply
-
The import() function is there to help to load yaml recipe in PHP recipe. BTW, you can import PHP recipes in yaml as well. I use it sometimes: main recipe in yaml, but some tasks are defined in php. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For more flexibility, we are switching some of our config files to PHP from YAML. It took us some time to get going, as we couldn't find an example PHP config in the docs. Using
dep init
, was the only way to get started :)Instead of using
import:
in YAMLrequire
is used in PHP.However, we also found the
import()
function in the API docs: https://deployer.org/docs/7.x/api#importWhen should and how can it be used? Replacing
require
withimport()
didn't seem to work and isn't part of thedep init
boilerplate.Beta Was this translation helpful? Give feedback.
All reactions