Skip to content
This repository has been archived by the owner on Dec 26, 2021. It is now read-only.

Commit

Permalink
merge branch 4.0 to master
Browse files Browse the repository at this point in the history
  • Loading branch information
llaville committed Dec 4, 2015
2 parents e2ec9e8 + e8da05e commit dd03528
Show file tree
Hide file tree
Showing 44 changed files with 1,066 additions and 607 deletions.
162 changes: 9 additions & 153 deletions README.asciidoc
Expand Up @@ -9,171 +9,27 @@ that bundles all dependencies in a single file.

Follow development on the http://php5.laurent-laville.org/reflect/blog/[official Blog].

Have a look on https://github.com/llaville/php-reflect/tree/2.6[branch 2.6] for previous stable API 2.0
Have a look on https://github.com/llaville/php-reflect/tree/3.1[branch 3.1] for previous stable API 3.1

== Install

You can either :

* download the phar version http://bartlett.laurent-laville.org/get/phpreflect-3.1.2.phar[3.1.2]
* install via https://packagist.org/packages/bartlett/php-reflect/[packagist] the current source dev-master or the stable version 3.1.2
* download the phar version http://bartlett.laurent-laville.org/get/phpreflect-4.0.0.phar[4.0.0]
* install via https://packagist.org/packages/bartlett/php-reflect/[packagist] the current source dev-master or the stable version 4.0.0

== Documentation

The documentation for PHP Reflect 3.1 is available
in http://php5.laurent-laville.org/reflect/manual/3.1/en/[English]
The documentation for PHP Reflect 4.0 is available
in http://php5.laurent-laville.org/reflect/manual/4.0/en/[English]
to read it online or download to read it later (multiple formats).

AsciiDoc source code are available on `docs` folder of the repository.

== Contribute
== Authors

Contributions to source code and its documentation are always welcome.
* Laurent Laville

As developper, I'm always happy when I have the more informations as possible to check and find out issues.
This is the reason why I've created a https://github.com/llaville/phpunit-LoggerTestListener[PHPUnit TestSuite Listener for compatible PSR-3 Loggers].
== License

And recently, for the php-compatinfo project, I've wrote a new PHPUnit ResultPrinter class, that is based on PSR-3 logger concept.
You can learn more on this http://php5.laurent-laville.org/compatinfo/blog/201505-PHPUnit-ResultPrinter.html[post]
in the CompatInfo's blog.

If you want to use it, then :

- install all the components via Composer

[source,bash]
----
$ php composer.phar require --dev bartlett/php-reflect
----

- create a `phpunit.xml` file with at least following contents :

[source,xml]
----
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
backupGlobals="true"
backupStaticAttributes="false"
bootstrap="tests/bootstrap.dev.php"
colors="true"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnRisky="false"
stopOnSkipped="false"
verbose="true"
printerClass="Bartlett\Tests\Reflect\ResultPrinter"
>
<filter>
<whitelist>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
<testsuites>
<testsuite name="Reflect Test Suite">
<directory suffix="Test.php">tests/</directory>
</testsuite>
</testsuites>
</phpunit>
----

- configure the PSR-3 logger in `tests\MonologConsoleLogger.php`, if you want to change some behaviors.

NOTE: Default will log all PHPUnit events in local file `phpunit-phpreflect-php<PHP_VERSION_ID>.log`
and log events corresponding to PHPUnit mode (`--verbose`, `--debug`) to the console.

NOTE: If you've a Growl client installed and running, you will be notified at end of tests run.

.Output look like
----
PHPUnit 4.6.6 by Sebastian Bergmann and contributors.
Configuration read from C:\home\github\php-reflect\phpunit.xml
Reflect Test Suite:
Test suite started with 122 tests
Bartlett\Tests\Reflect\Analyser\AnalyserManagerTest:
Test suite started with 8 tests
Bartlett\Tests\Reflect\Analyser\AnalyserManagerTest:
Test suite ended. Results OK. Tests: 8, Assertions: 8
Bartlett\Tests\Reflect\EnvironmentTest:
Test suite started with 8 tests
Bartlett\Tests\Reflect\EnvironmentTest:
Test suite ended. Results OK. Tests: 8, Assertions: 11
Bartlett\Tests\Reflect\Model\ClassModelTest:
Test suite started with 31 tests
Test 'testIterateableClassByInheritance' is incomplete. Not yet fully implemented (FIXME)
Test 'testSubclassOfInterface' is incomplete. Not yet fully implemented (FIXME)
Test 'testSubclassOfClass' is incomplete. Not yet fully implemented (FIXME)
Bartlett\Tests\Reflect\Model\ClassModelTest:
Test suite ended. Results OK. Tests: 28, Assertions: 28, Incomplete: 3
Bartlett\Tests\Reflect\Model\ConstantModelTest:
Test suite started with 11 tests
Bartlett\Tests\Reflect\Model\ConstantModelTest:
Test suite ended. Results OK. Tests: 11, Assertions: 11
Bartlett\Tests\Reflect\Model\FunctionModelTest:
Test suite started with 15 tests
Bartlett\Tests\Reflect\Model\FunctionModelTest:
Test suite ended. Results OK. Tests: 15, Assertions: 15
Bartlett\Tests\Reflect\Model\IssueTest:
Test suite started with 1 tests
Bartlett\Tests\Reflect\Model\IssueTest:
Test suite ended. Results OK. Tests: 1, Assertions: 2
Bartlett\Tests\Reflect\Model\MethodModelTest:
Test suite started with 19 tests
Bartlett\Tests\Reflect\Model\MethodModelTest:
Test suite ended. Results OK. Tests: 19, Assertions: 19
Bartlett\Tests\Reflect\Model\ParameterModelTest:
Test suite started with 18 tests
Bartlett\Tests\Reflect\Model\ParameterModelTest:
Test suite ended. Results OK. Tests: 18, Assertions: 18
Bartlett\Tests\Reflect\Model\PropertyModelTest:
Test suite started with 11 tests
Bartlett\Tests\Reflect\Model\PropertyModelTest:
Test suite ended. Results OK. Tests: 11, Assertions: 11
Reflect Test Suite:
Test suite ended. Results OK. Tests: 119, Assertions: 123, Incomplete: 3
Time: 2.94 seconds, Memory: 14.75Mb
Results OK. Tests: 122, Assertions: 123, Incomplete: 3
----
This handler is licensed under the BSD-3-clauses License - see the `LICENSE` file for details
2 changes: 1 addition & 1 deletion bin/phpreflect
Expand Up @@ -40,5 +40,5 @@ use Bartlett\Reflect\Console\Application;

Environment::setScanDir();

$application = new Application($appName, '3.1');
$application = new Application($appName, '4.0');
$application->run();
4 changes: 2 additions & 2 deletions build/build.xml
Expand Up @@ -21,8 +21,8 @@
Project properties
======================================================================
-->
<property name="build.short-version" value="3.1" />
<property name="build.version" value="${build.short-version}.2" />
<property name="build.short-version" value="4.0" />
<property name="build.version" value="${build.short-version}.0" />

<!--
======================================================================
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.2",
"php": ">=5.4.0",
"ext-tokenizer": "*",
"ext-pcre": "*",
"ext-phar": "*",
Expand All @@ -25,7 +25,7 @@
"ext-date": "*",
"ext-reflection": "*",
"sebastian/version": "~1.0",
"nikic/php-parser": "^1.2.2",
"nikic/php-parser": "~1.4",
"doctrine/collections": "~1.2",
"symfony/event-dispatcher": "~2.5",
"symfony/finder": "~2.5",
Expand Down Expand Up @@ -66,12 +66,12 @@
"bin/phpreflect"
],
"autoload": {
"psr-0": {
"Bartlett\\": "src/"
"psr-4": {
"Bartlett\\": "src/Bartlett"
}
},
"autoload-dev": {
"psr-0": {
"psr-4": {
"Bartlett\\Tests\\Reflect\\": "tests/"
}
}
Expand Down

0 comments on commit dd03528

Please sign in to comment.