Commit 58d04619 authored by Fabien Potencier's avatar Fabien Potencier

minor #986 Use PSR-4 for autoloading, works same as the PSR-0 configuration....

minor #986 Use PSR-4 for autoloading, works same as the PSR-0 configuration. Use au... (henrikbjorn)

This PR was submitted for the master branch but it was merged into the 1.3 branch instead (closes #986).

Discussion
----------

Use PSR-4 for autoloading, works same as the PSR-0 configuration. Use au...

...toload-dev for autoloading tests

Commits
-------

0df76379 Use PSR-4 for autoloading, works same as the PSR-0 configuration. Use autoload-dev for autoloading tests
parents 1403e6ed 0df76379
...@@ -52,7 +52,10 @@ ...@@ -52,7 +52,10 @@
"symfony/form": "~2.3" "symfony/form": "~2.3"
}, },
"autoload": { "autoload": {
"psr-0": { "Silex": "src/" } "psr-4": { "Silex\\": "src/Silex" }
},
"autoload-dev" : {
"psr-4": { "Silex\\Tests\\" : "tests/Silex/Tests" }
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
processIsolation="false" processIsolation="false"
stopOnFailure="false" stopOnFailure="false"
syntaxCheck="false" syntaxCheck="false"
bootstrap="tests/bootstrap.php" bootstrap="vendor/autoload.php"
> >
<testsuites> <testsuites>
<testsuite name="Silex Test Suite"> <testsuite name="Silex Test Suite">
......
<?php
$loader = require __DIR__.'/../vendor/autoload.php';
$loader->add('Silex\Tests', __DIR__);
if (!class_exists('Symfony\Component\Form\Form')) {
echo "You must install the dev dependencies using:\n";
echo " composer install --dev\n";
exit(1);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment