diff --git a/.travis.yml b/.travis.yml
index b09dd55..bce2800 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,6 +2,8 @@ language: php
php:
- '7.2'
+before_script:
+ - composer self-update --rollback
script:
- composer install
- vendor/bin/phpunit
\ No newline at end of file
diff --git a/README.md b/README.md
index 2b16b0c..30bed57 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# CODE QUALITY PLUGIN
-[](https://travis-ci.com/thewalkingcoder/code-quality-plugin)
+[](https://travis-ci.com/thewalkingcoder/code-quality-plugin)
Plugin composer permettant la mise en place d'outils pour une analyse qualité et respect des standards sur un projet symfony.
@@ -8,20 +8,12 @@ Plugin composer permettant la mise en place d'outils pour une analyse qualité
- git >=2.17
- symfony (website-skeleton) >=4.4 ou symfony >=4.4 (skeleton) avec le pack symfony/test-pack
-- composer 2.x
+- composer 1.x
# Installation
```
-composer require twc/code-quality-plugin --dev
-
-```
-
-If you use composer v1.x try
-
-```
-
composer require twc/code-quality-plugin:^1.0 --dev
```
diff --git a/src/CodeQualityPlugin.php b/src/CodeQualityPlugin.php
index 1ef5404..681bbb7 100644
--- a/src/CodeQualityPlugin.php
+++ b/src/CodeQualityPlugin.php
@@ -56,4 +56,14 @@ public function postInstall()
$this->io->write($process->getOutput());
$this->io->write('twc/code-quality-plugin: ...installation terminée');
}
+
+ public function deactivate(Composer $composer, IOInterface $io)
+ {
+ // TODO: Implement deactivate() method.
+ }
+
+ public function uninstall(Composer $composer, IOInterface $io)
+ {
+ // TODO: Implement uninstall() method.
+ }
}
diff --git a/src/Command/AllInstall.php b/src/Command/AllInstall.php
index 37836de..1c74f83 100644
--- a/src/Command/AllInstall.php
+++ b/src/Command/AllInstall.php
@@ -38,6 +38,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
$process->run();
$this->clearModels();
+
+ return 0;
}
private function clearModels()
diff --git a/src/Command/CommitForce.php b/src/Command/CommitForce.php
index f26decf..96d1d09 100644
--- a/src/Command/CommitForce.php
+++ b/src/Command/CommitForce.php
@@ -37,6 +37,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->restore(['pre-commit.tempo', 'commit-msg.tempo']);
$output->write($process->getOutput());
+ return 0;
}
private function getHooksDir()
diff --git a/src/Command/HooksInstall.php b/src/Command/HooksInstall.php
index ada1dc3..9659790 100644
--- a/src/Command/HooksInstall.php
+++ b/src/Command/HooksInstall.php
@@ -47,7 +47,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
$this->output->writeln('[skip] Git n\'est pas initialisé sur votre projet');
- return false;
+ return 0;
}
$hooks = $this->getHooks();
@@ -55,6 +55,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
foreach ($hooks as $hook) {
$this->copy($hook);
}
+
+ return 0;
}
private function getHooks()
diff --git a/src/Command/MakefileInstall.php b/src/Command/MakefileInstall.php
index cb4765e..3a6841c 100644
--- a/src/Command/MakefileInstall.php
+++ b/src/Command/MakefileInstall.php
@@ -44,7 +44,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$fileSystem->copy(__DIR__ . '/../../make/Makefile', $this->makefile);
$output->writeln('twc/code-quality-plugin: Create Makefile');
- return false;
+ return 0;
}
$content = file_get_contents($this->makefile);
@@ -53,10 +53,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
if (in_array($model, $lines)) {
$output->writeln('twc/code-quality-plugin: [skip] Makefile is up to date');
- return false;
+ return 0;
}
file_put_contents($this->makefile, "\n\n$model", FILE_APPEND);
$output->writeln('twc/code-quality-plugin: Makefile updated');
+
+ return 0;
}
}
diff --git a/src/Command/QualityInstall.php b/src/Command/QualityInstall.php
index 14acb47..d062329 100644
--- a/src/Command/QualityInstall.php
+++ b/src/Command/QualityInstall.php
@@ -50,11 +50,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
if (\is_dir($this->dirQuality) && ($mode !== 'force')) {
$output->writeln($message);
- return false;
+ return 0;
}
$composerSystem->copy(__DIR__ . '/../../quality', $this->dirQuality);
$fileSystem->chmod($this->dirQuality . '/commit-rules.sh', 0777);
$output->writeln('twc/code-quality-plugin: Dossier de configuration créé');
+ return 0;
}
}