Skip to content

Commit 40816eb

Browse files
committed
merged branch willdurand/fix-components (PR #4155)
Commits ------- c195957 [Components] Tests/Autoloading fixes Discussion ---------- Fix components See #4141 ---- This PR: * configures each component to use composer to manage "dev" dependencies instead of env variables; * adds phpunit configuration file on Filesystem component; * fixes READMEs. It's mergeable without any problems, but I would recommend to wait a fix in Composer in order to use `self.version` in `require`/`require-dev` sections. Note: I kept `suggest` sections because it makes sense but this PR doesn't aim to provide useful explanations for each entry. It could be another PR, not that one. --------------------------------------------------------------------------- by willdurand at 2012-04-30T20:43:13Z @fabpot I reviewed each component, one by one. Now `phpunit` always works, even if tests are skipped. A simple `composer install --dev` allows to run the complete test suite. Each commit is well separated from the others. I guess, everything is ok now. --------------------------------------------------------------------------- by Tobion at 2012-04-30T20:47:00Z Please squash, as it makes no sense to have the same commit for each component. --------------------------------------------------------------------------- by fabpot at 2012-05-01T14:26:11Z Can you squash your commits before I merge? Thanks. --------------------------------------------------------------------------- by willdurand at 2012-05-01T14:29:38Z done --------------------------------------------------------------------------- by fabpot at 2012-05-01T15:48:25Z It does not seem that the commits are squashed. --------------------------------------------------------------------------- by willdurand at 2012-05-01T15:54:08Z done
2 parents 46c677f + b258e1d commit 40816eb

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,9 @@ Filesystem provides basic utility to manipulate the file system:
2727

2828
$filesystem->isAbsolutePath($file);
2929

30+
Resources
31+
---------
32+
33+
You can run the unit tests with the following command:
34+
35+
phpunit

Tests/bootstrap.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
spl_autoload_register(function ($class) {
13+
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Filesystem')) {
14+
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Filesystem')).'.php')) {
15+
require_once $file;
16+
}
17+
}
18+
});

phpunit.xml.dist

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<phpunit backupGlobals="false"
4+
backupStaticAttributes="false"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnFailure="false"
11+
syntaxCheck="false"
12+
bootstrap="Tests/bootstrap.php"
13+
>
14+
<testsuites>
15+
<testsuite name="Symfony Filesystem Component Test Suite">
16+
<directory>./Tests/</directory>
17+
</testsuite>
18+
</testsuites>
19+
20+
<filter>
21+
<whitelist>
22+
<directory>./</directory>
23+
<exclude>
24+
<directory>./Tests</directory>
25+
</exclude>
26+
</whitelist>
27+
</filter>
28+
</phpunit>

0 commit comments

Comments
 (0)