deployer icon indicating copy to clipboard operation
deployer copied to clipboard

Provide a possibility to skip validateConfig

Open h1nds1ght opened this issue 3 years ago • 1 comments

This commit https://github.com/deployphp/deployer/commit/76f07b4e05b898db852686ef8cac93d8b1a7f692#diff-8558493b7152a73eb3ba31b63463fcb735f23d4af82de6e982c39df5a040ff21R112 introduced a new function validateConfig. If you use code which uses similiar config names it emits a warning

warning Did you mean "site" or "sites"?

    6: set('site', 'default');
    7: set('sites', function () {
    11:   get('sites');

task releases

Actually I don't like this feature since I want to write my code the way I want. Nevertheless it would be at least nice to have an option to opt out of this behaviour.

Example deploy.php:

<?php
namespace Deployer;

require  'recipe/common.php';

set('site', 'default');
set('sites', function () {
  return ['foo', 'bar'];
});
get('releases', function() {
  get('sites');
});
host('localhost');

h1nds1ght avatar Jun 18 '22 08:06 h1nds1ght

Yes! I think this feature can be removed.

antonmedv avatar Jun 18 '22 12:06 antonmedv

Done.

antonmedv avatar Sep 10 '22 07:09 antonmedv