From 97b1d70a37f77e54315197c7ad582890cf144b9f Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 29 Nov 2013 10:50:38 +0100 Subject: [PATCH 1/3] [ticket/11699] Exclude build/new_version and build/old_versions from lint. PHPBB3-11699 --- tests/lint_test.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/lint_test.php b/tests/lint_test.php index 905067072d..5b5d8975e8 100644 --- a/tests/lint_test.php +++ b/tests/lint_test.php @@ -23,6 +23,8 @@ class phpbb_lint_test extends phpbb_test_case } self::$exclude = array( + dirname(__FILE__) . '/../build/new_version', + dirname(__FILE__) . '/../build/old_versions', // PHP Fatal error: Cannot declare class Container because the name is already in use in /var/www/projects/phpbb3/tests/../phpBB/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php on line 20 // https://gist.github.com/e003913ffd493da63cbc dirname(__FILE__) . '/../phpBB/vendor', From 0834a749e72e6239ed22113e25dd4778a44bb976 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 29 Nov 2013 14:00:55 +0100 Subject: [PATCH 2/3] [ticket/11699] Properly exclude the .git directory. Namely missing dot prefix. PHPBB3-11699 --- tests/lint_test.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/lint_test.php b/tests/lint_test.php index 5b5d8975e8..6951ee5ef7 100644 --- a/tests/lint_test.php +++ b/tests/lint_test.php @@ -23,6 +23,7 @@ class phpbb_lint_test extends phpbb_test_case } self::$exclude = array( + dirname(__FILE__) . '/../.git', dirname(__FILE__) . '/../build/new_version', dirname(__FILE__) . '/../build/old_versions', // PHP Fatal error: Cannot declare class Container because the name is already in use in /var/www/projects/phpbb3/tests/../phpBB/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php on line 20 @@ -47,7 +48,7 @@ class phpbb_lint_test extends phpbb_test_case $dh = opendir($root); while (($filename = readdir($dh)) !== false) { - if ($filename == '.' || $filename == '..' || $filename == 'git') + if ($filename == '.' || $filename == '..') { continue; } From 981df153d2fbeba5f9aa6a677e11f1df15b3ea15 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 29 Nov 2013 14:02:50 +0100 Subject: [PATCH 3/3] [ticket/11699] Also exclude the phpBB/cache directory. PHPBB3-11699 --- tests/lint_test.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/lint_test.php b/tests/lint_test.php index 6951ee5ef7..eba117839b 100644 --- a/tests/lint_test.php +++ b/tests/lint_test.php @@ -26,6 +26,7 @@ class phpbb_lint_test extends phpbb_test_case dirname(__FILE__) . '/../.git', dirname(__FILE__) . '/../build/new_version', dirname(__FILE__) . '/../build/old_versions', + dirname(__FILE__) . '/../phpBB/cache', // PHP Fatal error: Cannot declare class Container because the name is already in use in /var/www/projects/phpbb3/tests/../phpBB/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php on line 20 // https://gist.github.com/e003913ffd493da63cbc dirname(__FILE__) . '/../phpBB/vendor',