Skip to content

Commit

Permalink
Merge pull request pdepend#340 from surikman/symfony-4
Browse files Browse the repository at this point in the history
Add Symfony 4 support
  • Loading branch information
Emir Beganović authored Dec 1, 2017
2 parents bb77500 + aca0458 commit 5ed1e88
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 26 deletions.
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,19 @@ matrix:
- php: 5.4
env: DEPENDENCIES=low
- php: 5.5
env: SYMFONY_VERSION=^2.0
- php: 5.6
env: SYMFONY_VERSION=^2.0
- php: 5.6
env: SYMFONY_VERSION=^3.0
- php: 7.0
env: SYMFONY_VERSION=^3.0
- php: 7.1
env: SYMFONY_VERSION=^4.0
- php: 7.2
env: SYMFONY_VERSION=^4.0
- php: nightly
env: SYMFONY_VERSION=^4.0
allow_failures:
- php: nightly
fast_finish: true
Expand All @@ -25,6 +33,9 @@ env:

before_script:
- composer self-update
- if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/dependency-injection:${SYMFONY_VERSION}" --no-update; fi;
- if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/filesystem:${SYMFONY_VERSION}" --no-update; fi;
- if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/config:${SYMFONY_VERSION}" --no-update; fi;
- if [ $DEPENDENCIES = low ] ; then composer update --prefer-dist --prefer-lowest --prefer-stable ; fi
- if [ ! $DEPENDENCIES ] ; then composer update --prefer-dist ; fi
- composer install
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"license": "BSD-3-Clause",
"require": {
"php": ">=5.3.7",
"symfony/dependency-injection": "^2.3.0|^3",
"symfony/filesystem": "^2.3.0|^3",
"symfony/config": "^2.3.0|^3"
"symfony/dependency-injection": "^2.3.0|^3|^4",
"symfony/filesystem": "^2.3.0|^3|^4",
"symfony/config": "^2.3.0|^3|^4"
},
"require-dev": {
"phpunit/phpunit": "^4.8|^5.7",
Expand Down
44 changes: 22 additions & 22 deletions src/main/resources/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<services>
<service id="pdepend.textui.runner" class="PDepend\TextUI\Runner">
<service id="pdepend.textui.runner" class="PDepend\TextUI\Runner" public="true">
<argument type="service" id="pdepend.report_generator_factory" />
<argument type="service" id="pdepend.engine" />
</service>
Expand All @@ -14,30 +14,30 @@
<argument type="service" id="pdepend.configuration" />
</service>

<service id="pdepend.engine" class="PDepend\Engine">
<service id="pdepend.engine" class="PDepend\Engine" public="true">
<argument type="service" id="pdepend.configuration" />
<argument type="service" id="pdepend.util.cache_factory" />
<argument type="service" id="pdepend.analyzer_factory" />
</service>

<service id="pdepend.analyzer_factory" class="PDepend\Metrics\AnalyzerFactory">
<service id="pdepend.analyzer_factory" class="PDepend\Metrics\AnalyzerFactory" public="true">
<argument type="service" id="service_container" />
</service>

<service id="pdepend.configuration" class="PDepend\Util\Configuration">
<service id="pdepend.configuration" class="PDepend\Util\Configuration" public="true">
</service>

<service id="pdepend.textui.result_printer" class="PDepend\TextUI\ResultPrinter" />

<service id="pdepend.report.summary.xml" class="PDepend\Report\Summary\Xml">
<service id="pdepend.report.summary.xml" class="PDepend\Report\Summary\Xml" public="true">
<tag name="pdepend.logger" option="--summary-xml" message="Generates a xml log with all metrics." />
</service>

<service id="pdepend.report.dependencies.xml" class="PDepend\Report\Dependencies\Xml">
<tag name="pdepend.logger" option="--dependency-xml" message="Generates a xml log with all dependencies." />
</service>

<service id="pdepend.report.jdepend.xml" class="PDepend\Report\Jdepend\Xml">
<service id="pdepend.report.jdepend.xml" class="PDepend\Report\Jdepend\Xml" public="true">
<tag name="pdepend.logger" option="--jdepend-xml" message="Generates the package dependency log." />
</service>

Expand All @@ -49,74 +49,74 @@
<tag name="pdepend.logger" option="--overview-pyramid" message="Generates a chart with an Overview Pyramid for the analyzed project." />
</service>

<service id="pdepend.report_generator_factory" class="PDepend\Report\ReportGeneratorFactory">
<service id="pdepend.report_generator_factory" class="PDepend\Report\ReportGeneratorFactory" public="true">
<argument type="service" id="service_container" />
</service>

<service id="pdepend.analyzer.class_level" class="PDepend\Metrics\Analyzer\ClassLevelAnalyzer">
<service id="pdepend.analyzer.class_level" class="PDepend\Metrics\Analyzer\ClassLevelAnalyzer" public="true">
<tag name="pdepend.analyzer" />

<call method="addAnalyzer">
<argument type="service" id="pdepend.analyzer.cyclomatic_complexity" />
</call>
</service>

<service id="pdepend.analyzer.code_rank" class="PDepend\Metrics\Analyzer\CodeRankAnalyzer">
<service id="pdepend.analyzer.code_rank" class="PDepend\Metrics\Analyzer\CodeRankAnalyzer" public="true">
<tag name="pdepend.analyzer" option="--coderank-mode" message="Used CodeRank strategies. Comma separated list of 'inheritance'(default), 'property' and 'method'." value="*[,...]" />
</service>

<service id="pdepend.analyzer.cohesion" class="PDepend\Metrics\Analyzer\CohesionAnalyzer">
<service id="pdepend.analyzer.cohesion" class="PDepend\Metrics\Analyzer\CohesionAnalyzer" public="true">
<tag name="pdepend.analyzer" />
</service>

<service id="pdepend.analyzer.coupling" class="PDepend\Metrics\Analyzer\CouplingAnalyzer">
<service id="pdepend.analyzer.coupling" class="PDepend\Metrics\Analyzer\CouplingAnalyzer" public="true">
<tag name="pdepend.analyzer" />
</service>

<service id="pdepend.analyzer.crap_index" class="PDepend\Metrics\Analyzer\CrapIndexAnalyzer">
<service id="pdepend.analyzer.crap_index" class="PDepend\Metrics\Analyzer\CrapIndexAnalyzer" public="true">
<tag name="pdepend.analyzer" option="--coverage-report" message="Clover style CodeCoverage report, as produced by PHPUnit's --coverage-clover option." />
<call method="addAnalyzer">
<argument type="service" id="pdepend.analyzer.cyclomatic_complexity" />
</call>
</service>

<service id="pdepend.analyzer.cyclomatic_complexity" class="PDepend\Metrics\Analyzer\CyclomaticComplexityAnalyzer">
<service id="pdepend.analyzer.cyclomatic_complexity" class="PDepend\Metrics\Analyzer\CyclomaticComplexityAnalyzer" public="true">
<tag name="pdepend.analyzer" />
</service>

<service id="pdepend.analyzer.dependency" class="PDepend\Metrics\Analyzer\DependencyAnalyzer">
<service id="pdepend.analyzer.dependency" class="PDepend\Metrics\Analyzer\DependencyAnalyzer" public="true">
<tag name="pdepend.analyzer" />
</service>

<service id="pdepend.analyzer.class_dependency" class="PDepend\Metrics\Analyzer\ClassDependencyAnalyzer">
<service id="pdepend.analyzer.class_dependency" class="PDepend\Metrics\Analyzer\ClassDependencyAnalyzer" public="true">
<tag name="pdepend.analyzer" />
</service>

<service id="pdepend.analyzer.hierarchy" class="PDepend\Metrics\Analyzer\HierarchyAnalyzer">
<service id="pdepend.analyzer.hierarchy" class="PDepend\Metrics\Analyzer\HierarchyAnalyzer" public="true">
<tag name="pdepend.analyzer" />
</service>

<service id="pdepend.analyzer.inheritance" class="PDepend\Metrics\Analyzer\InheritanceAnalyzer">
<service id="pdepend.analyzer.inheritance" class="PDepend\Metrics\Analyzer\InheritanceAnalyzer" public="true">
<tag name="pdepend.analyzer" />
</service>

<service id="pdepend.analyzer.npath_complexity" class="PDepend\Metrics\Analyzer\NPathComplexityAnalyzer">
<service id="pdepend.analyzer.npath_complexity" class="PDepend\Metrics\Analyzer\NPathComplexityAnalyzer" public="true">
<tag name="pdepend.analyzer" />
</service>

<service id="pdepend.analyzer.node_count" class="PDepend\Metrics\Analyzer\NodeCountAnalyzer">
<service id="pdepend.analyzer.node_count" class="PDepend\Metrics\Analyzer\NodeCountAnalyzer" public="true">
<tag name="pdepend.analyzer" />
</service>

<service id="pdepend.analyzer.node_loc" class="PDepend\Metrics\Analyzer\NodeLocAnalyzer">
<service id="pdepend.analyzer.node_loc" class="PDepend\Metrics\Analyzer\NodeLocAnalyzer" public="true">
<tag name="pdepend.analyzer" />
</service>

<service id="pdepend.analyzer.halstead" class="PDepend\Metrics\Analyzer\HalsteadAnalyzer">
<service id="pdepend.analyzer.halstead" class="PDepend\Metrics\Analyzer\HalsteadAnalyzer" public="true">
<tag name="pdepend.analyzer" />
</service>

<service id="pdepend.analyzer.maintainability" class="PDepend\Metrics\Analyzer\MaintainabilityIndexAnalyzer">
<service id="pdepend.analyzer.maintainability" class="PDepend\Metrics\Analyzer\MaintainabilityIndexAnalyzer" public="true">
<tag name="pdepend.analyzer" />
</service>
</services>
Expand Down
2 changes: 1 addition & 1 deletion src/test/php/PDepend/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<services>
<service id="pdepend.test.dummy_logger" class="PDepend\Report\Dummy\Logger">
<service id="pdepend.test.dummy_logger" class="PDepend\Report\Dummy\Logger" public="true">
<tag name="pdepend.logger" option="--dummy-logger" message="Dummy logger for tests" />
</service>
</services>
Expand Down

0 comments on commit 5ed1e88

Please sign in to comment.