1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
5
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
6
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
7
|
|
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
8
|
|
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
9
|
|
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
10
|
|
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
11
|
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
12
|
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
13
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
14
|
|
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
15
|
|
|
* |
16
|
|
|
* This software consists of voluntary contributions made by many individuals |
17
|
|
|
* and is licensed under the LGPL. For more information please see |
18
|
|
|
* <http://phing.info>. |
19
|
|
|
*/ |
20
|
|
|
|
21
|
|
|
namespace Phing\Task\Ext; |
22
|
|
|
|
23
|
|
|
use Phing\Exception\BuildException; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* Task to create a javadoc-like documentation based on current database and |
27
|
|
|
* changelog. |
28
|
|
|
* |
29
|
|
|
* @author Stephan Hochdoerfer <[email protected]> |
30
|
|
|
* @since 2.4.10 |
31
|
|
|
* @package phing.tasks.ext.liquibase |
32
|
|
|
*/ |
33
|
|
|
class LiquibaseDbDocTask extends AbstractLiquibaseTask |
34
|
|
|
{ |
35
|
|
|
protected $outputDir; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* Sets the output directory where the documentation gets generated to. |
39
|
|
|
* |
40
|
|
|
* @param string the output directory |
|
|
|
|
41
|
|
|
*/ |
42
|
|
|
public function setOutputDir($outputDir) |
43
|
|
|
{ |
44
|
|
|
$this->outputDir = $outputDir; |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* @see AbstractTask::checkParams() |
49
|
|
|
*/ |
50
|
|
|
protected function checkParams() |
51
|
|
|
{ |
52
|
|
|
parent::checkParams(); |
53
|
|
|
|
54
|
|
|
if ((null === $this->outputDir) or !is_dir($this->outputDir)) { |
55
|
|
|
if (!mkdir($this->outputDir, 0777, true)) { |
56
|
|
|
throw new BuildException( |
57
|
|
|
sprintf( |
58
|
|
|
'The directory "%s" does not exist and could not be created!', |
59
|
|
|
$this->outputDir |
60
|
|
|
) |
61
|
|
|
); |
62
|
|
|
} |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
if (!is_writable($this->outputDir)) { |
66
|
|
|
throw new BuildException( |
67
|
|
|
sprintf( |
68
|
|
|
'The directory "%s" is not writable!', |
69
|
|
|
$this->outputDir |
70
|
|
|
) |
71
|
|
|
); |
72
|
|
|
} |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @see Task::main() |
77
|
|
|
*/ |
78
|
|
|
public function main() |
79
|
|
|
{ |
80
|
|
|
$this->checkParams(); |
81
|
|
|
$this->execute('dbdoc', escapeshellarg($this->outputDir)); |
82
|
|
|
} |
83
|
|
|
} |
84
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths