我有各种系统的多个ssh配置文件夹,例如:
ssh -F ~/.ssh/system-a/config user@system-a
ssh -F ~/.ssh/system-b/config user@system-b
Run Code Online (Sandbox Code Playgroud)
每个文件夹都有一个配置文件和一组标识文件,如此
Host system-a
HostName <some_hostname>
User <some_username>
IdentityFile ~/.ssh/system-a/keys/system-a.pem
Run Code Online (Sandbox Code Playgroud)
在执行git任务时如何告诉git使用某个ssh配置文件或某个ssh密钥?
理想情况下,如果可以,我希望每个git项目都这样做.
我想将作曲家存储库配置分解为不同的文件。
我使用本地和外部存储库,并且希望将它们的配置分开。
然后,在运行安装或更新任务时,这些文件将被拉入主composer.json。
这可能吗?
我有一个没有连接到实体的表单,但确实有这里提到的约束:http://symfony.com/doc/current/book/forms.html#adding-validation
ContactBundle\Tests\Form\Type\TestedTypeTest :: testSubmitValidData Symfony\Component\OptionsResolver\Exception\InvalidOptionsException:选项"constraints"不存在.已知选项包括:"action","attr","auto_initialize","block_name","by_reference","compound","data","data_class","disabled","empty_data","error_bubbling","inherit_data" ","label","label_attr","mapped","max_length","method","pattern","post_max_size_message","property_path","read_only","required","translation_domain","trim", "虚拟"
以下是表单的一部分:
class ContactType extends AbstractType
{
/**
* Build the form
* @param \Symfony\Component\Form\FormBuilderInterface $builder BuilderInterface
* @param array $aOption Array of options
*/
public function buildForm(FormBuilderInterface $builder, array $aOption)
{
///..
$builder->add('name', 'text', array(
'constraints' => array(
new NotBlank(),
new Length(array('min' => 3)),
),
))
->add('address', 'textarea', array(
'required' => false
))
//..
;
//..
Run Code Online (Sandbox Code Playgroud)
这是单元测试
class TestedTypeTest extends TypeTestCase
{
public function testSubmitValidData()
{
$formData = array(
'name' …Run Code Online (Sandbox Code Playgroud) doctrine:fixtures:load命令中的--no-interaction标志在Symfony命令中无法运行.它通过终端工作.我是在正确地说它?
当我从捆绑中运行时:
/**
* Loads the fixtures
* @param \Symfony\Component\Console\Output\OutputInterface $oOutput
* @return \Symfony\Component\Console\Output\OutputInterface
*/
protected function loadFixturesCommand($oOutput) {
$oOutput->writeln('<fg=white>Attempting to load fixtures</fg=white>');
$updateCommand = $this->getApplication()->find('doctrine:fixtures:load');
$updateArguments = array(
'command' => 'doctrine:fixtures:load',
'--no-interaction' => true,
);
$updateInput = new ArrayInput($updateArguments);
$updateCommand->run($updateInput, $oOutput);
try {
$updateCommand->run($updateInput, $oOutput);
} catch (ContextErrorException $e) {
//..
}
return $this;
}
Run Code Online (Sandbox Code Playgroud)
我被提示加载灯具
但运行这个:
php app/console doctrine:fixtures:load --no-interaction
Run Code Online (Sandbox Code Playgroud)
不提示我.
我究竟做错了什么?
php ×2
symfony ×2
composer-php ×1
doctrine-orm ×1
fixtures ×1
forms ×1
git ×1
ssh ×1
ssh-keys ×1
unit-testing ×1