1.7 KiB
Upgrade from 4.x to 5.x
-
Servers to Hosts
- Refactor
server($name, $hostname)
tohost($hostname)
- Refactor
localServer($name)
tolocalhost()
- Rename
serverList($file)
toinventory($file)
- Refactor
-
Configuration options
- Rename
{{server.name}}
to{{hostname}}
- Rename
-
DotArray syntax
In v5 access to nested arrays in config via dot notation was removed. If you was using it, consider to move to plain config options.
Refactor this:
set('a', ['b' => 1]); // ... get('a.b');
To:
set('a_b', 1); // ... get('a_b');
Upgrade from 3.x to 4.x
-
Namespace for functions
Add to beginning of deploy.php next line:
use function Deployer\{server, task, run, set, get, add, before, after};
If you are using PHP version less than 5.6, you can use this:
namespace Deployer;
-
env()
toset()
/get()
Rename all calls
env($name, $value)
toset($name, $value)
.Rename all rvalue
env($name)
toget($name)
.Rename all
server(...)->env(...)
toserver(...)->set(...)
. -
Moved NonFatalException
Rename
Deployer\Task\NonFatalException
toDeployer\Exception\NonFatalException
. -
Prior release cleanup
Due to changes in release management, the new cleanup task will ignore any prior releases deployed with 3.x. These will need to be manually removed after migrating to and successfully releasing via 4.x.
Upgrade from 2.x to 3.x
-
->path('...')
Replace your server paths configuration:
server(...) ->path(...);
to:
server(...) ->env('deploy_path', '...');