aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/common.php2
-rw-r--r--phpBB/includes/functions.php2
-rw-r--r--phpBB/phpbb/filesystem.php6
-rw-r--r--phpBB/phpbb/symfony_request.php20
-rw-r--r--phpBB/phpbb/template/asset.php4
-rw-r--r--tests/controller/helper_url_test.php4
-rw-r--r--tests/dbal/migrator_test.php2
-rw-r--r--tests/extension/manager_test.php2
-rw-r--r--tests/extension/metadata_manager_test.php4
-rw-r--r--tests/filesystem/clean_path_test.php2
-rw-r--r--tests/filesystem/web_root_path_test.php4
-rw-r--r--tests/mock/extension_manager.php2
-rw-r--r--tests/template/template_events_test.php2
-rw-r--r--tests/template/template_test_case.php4
-rw-r--r--tests/template/template_test_case_with_tree.php4
-rw-r--r--tests/test_framework/phpbb_functional_test_case.php2
16 files changed, 34 insertions, 32 deletions
diff --git a/phpBB/common.php b/phpBB/common.php
index fedf459888..c16751d1ae 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -48,7 +48,7 @@ if (!defined('PHPBB_INSTALLED'))
// Eliminate . and .. from the path
require($phpbb_root_path . 'phpbb/filesystem.' . $phpEx);
$phpbb_filesystem = new phpbb\filesystem(
- new phpbb\symfony\request(
+ new phpbb\symfony_request(
new phpbb\request\request()
),
$phpbb_root_path,
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 53ee8c2512..7bdd4d252e 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1072,7 +1072,7 @@ function phpbb_clean_path($path)
}
$phpbb_filesystem = new phpbb\filesystem(
- new phpbb\symfony\request(
+ new phpbb\symfony_request(
new phpbb\request\request()
),
$phpbb_root_path,
diff --git a/phpBB/phpbb/filesystem.php b/phpBB/phpbb/filesystem.php
index ae656ad6e6..662b6b866e 100644
--- a/phpBB/phpbb/filesystem.php
+++ b/phpBB/phpbb/filesystem.php
@@ -23,7 +23,7 @@ if (!defined('IN_PHPBB'))
*/
class filesystem
{
- /** @var phpbb_symfony_request */
+ /** @var \phpbb\symfony_request */
protected $symfony_request;
/** @var string */
@@ -41,11 +41,11 @@ class filesystem
/**
* Constructor
*
- * @param phpbb_symfony_request $symfony_request
+ * @param \phpbb\symfony_request $symfony_request
* @param string $phpbb_root_path Relative path to phpBB root
* @param string $php_ext PHP extension (php)
*/
- public function __construct(phpbb_symfony_request $symfony_request, $phpbb_root_path, $php_ext, $adm_relative_path = null)
+ public function __construct(\phpbb\symfony_request $symfony_request, $phpbb_root_path, $php_ext, $adm_relative_path = null)
{
$this->symfony_request = $symfony_request;
$this->phpbb_root_path = $phpbb_root_path;
diff --git a/phpBB/phpbb/symfony_request.php b/phpBB/phpbb/symfony_request.php
index 29ab8c000e..92784c213b 100644
--- a/phpBB/phpbb/symfony_request.php
+++ b/phpBB/phpbb/symfony_request.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb;
+
use Symfony\Component\HttpFoundation\Request;
/**
@@ -17,26 +19,26 @@ if (!defined('IN_PHPBB'))
exit;
}
-class phpbb_symfony_request extends Request
+class symfony_request extends Request
{
/**
* Constructor
*
- * @param phpbb_request_interface $phpbb_request
+ * @param phpbb\request\request_interface $phpbb_request
*/
- public function __construct(phpbb_request_interface $phpbb_request)
+ public function __construct(\phpbb\request\request_interface $phpbb_request)
{
// This function is meant to sanitize the global input arrays
$sanitizer = function(&$value, $key) {
- $type_cast_helper = new phpbb_request_type_cast_helper();
+ $type_cast_helper = new \phpbb\request\type_cast_helper();
$type_cast_helper->set_var($value, $value, gettype($value), true);
};
- $get_parameters = $phpbb_request->get_super_global(phpbb_request_interface::GET);
- $post_parameters = $phpbb_request->get_super_global(phpbb_request_interface::POST);
- $server_parameters = $phpbb_request->get_super_global(phpbb_request_interface::SERVER);
- $files_parameters = $phpbb_request->get_super_global(phpbb_request_interface::FILES);
- $cookie_parameters = $phpbb_request->get_super_global(phpbb_request_interface::COOKIE);
+ $get_parameters = $phpbb_request->get_super_global(\phpbb\request\request_interface::GET);
+ $post_parameters = $phpbb_request->get_super_global(\phpbb\request\request_interface::POST);
+ $server_parameters = $phpbb_request->get_super_global(\phpbb\request\request_interface::SERVER);
+ $files_parameters = $phpbb_request->get_super_global(\phpbb\request\request_interface::FILES);
+ $cookie_parameters = $phpbb_request->get_super_global(\phpbb\request\request_interface::COOKIE);
array_walk_recursive($get_parameters, $sanitizer);
array_walk_recursive($post_parameters, $sanitizer);
diff --git a/phpBB/phpbb/template/asset.php b/phpBB/phpbb/template/asset.php
index fa0661ec82..0e0b6b4782 100644
--- a/phpBB/phpbb/template/asset.php
+++ b/phpBB/phpbb/template/asset.php
@@ -21,7 +21,7 @@ class asset
{
protected $components = array();
- /** @var phpbb_filesystem **/
+ /** @var \phpbb\filesystem **/
protected $phpbb_filesystem;
/**
@@ -29,7 +29,7 @@ class asset
*
* @param string $url URL
*/
- public function __construct($url, phpbb_filesystem $phpbb_filesystem)
+ public function __construct($url, \phpbb\filesystem $phpbb_filesystem)
{
$this->phpbb_filesystem = $phpbb_filesystem;
diff --git a/tests/controller/helper_url_test.php b/tests/controller/helper_url_test.php
index 6e53db9ba2..4ea177074f 100644
--- a/tests/controller/helper_url_test.php
+++ b/tests/controller/helper_url_test.php
@@ -50,7 +50,7 @@ class phpbb_controller_helper_url_test extends phpbb_test_case
$phpbb_dispatcher = new phpbb_mock_event_dispatcher;
$this->user = $this->getMock('\phpbb\user');
$phpbb_filesystem = new \phpbb\filesystem(
- new \phpbb\symfony\request(
+ new \phpbb\symfony_request(
new phpbb_mock_request()
),
$phpbb_root_path,
@@ -102,7 +102,7 @@ class phpbb_controller_helper_url_test extends phpbb_test_case
$phpbb_dispatcher = new phpbb_mock_event_dispatcher;
$this->user = $this->getMock('\phpbb\user');
$phpbb_filesystem = new \phpbb\filesystem(
- new \phpbb\symfony\request(
+ new \phpbb\symfony_request(
new phpbb_mock_request()
),
$phpbb_root_path,
diff --git a/tests/dbal/migrator_test.php b/tests/dbal/migrator_test.php
index 6481e09ead..ef5d167fc2 100644
--- a/tests/dbal/migrator_test.php
+++ b/tests/dbal/migrator_test.php
@@ -60,7 +60,7 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
$this->db,
$this->config,
new phpbb\filesystem(
- new phpbb\symfony\request(
+ new phpbb\symfony_request(
new phpbb_mock_request()
),
dirname(__FILE__) . '/../../phpBB/',
diff --git a/tests/extension/manager_test.php b/tests/extension/manager_test.php
index d694d298fa..c4a32f53ab 100644
--- a/tests/extension/manager_test.php
+++ b/tests/extension/manager_test.php
@@ -115,7 +115,7 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
$db,
$config,
new \phpbb\filesystem(
- new \phpbb\symfony\request(
+ new \phpbb\symfony_request(
new phpbb_mock_request()
),
$phpbb_root_path,
diff --git a/tests/extension/metadata_manager_test.php b/tests/extension/metadata_manager_test.php
index b68bf8e36a..2b27a1bae2 100644
--- a/tests/extension/metadata_manager_test.php
+++ b/tests/extension/metadata_manager_test.php
@@ -42,7 +42,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
$this->template = new \phpbb\template\twig\twig(
new \phpbb\filesystem(
- new \phpbb\symfony\request(
+ new \phpbb\symfony_request(
new phpbb_mock_request()
),
$this->phpbb_root_path,
@@ -71,7 +71,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
$this->db,
$this->config,
new \phpbb\filesystem(
- new \phpbb\symfony\request(
+ new \phpbb\symfony_request(
new phpbb_mock_request()
),
$this->phpbb_root_path,
diff --git a/tests/filesystem/clean_path_test.php b/tests/filesystem/clean_path_test.php
index 7fefcf2f90..5b9857ef2c 100644
--- a/tests/filesystem/clean_path_test.php
+++ b/tests/filesystem/clean_path_test.php
@@ -15,7 +15,7 @@ class phpbb_filesystem_clean_path_test extends phpbb_test_case
{
parent::setUp();
$this->filesystem = new \phpbb\filesystem(
- new \phpbb\symfony\request(
+ new \phpbb\symfony_request(
new phpbb_mock_request()
),
dirname(__FILE__) . './../../phpBB/',
diff --git a/tests/filesystem/web_root_path_test.php b/tests/filesystem/web_root_path_test.php
index ae59d4f709..ddc9e28bb2 100644
--- a/tests/filesystem/web_root_path_test.php
+++ b/tests/filesystem/web_root_path_test.php
@@ -18,8 +18,8 @@ class phpbb_filesystem_web_root_path_test extends phpbb_test_case
$this->set_phpbb_root_path();
- $this->filesystem = new phpbb_filesystem(
- new phpbb_symfony_request(
+ $this->filesystem = new \phpbb\filesystem(
+ new \phpbb\symfony_request(
new phpbb_mock_request()
),
$this->phpbb_root_path,
diff --git a/tests/mock/extension_manager.php b/tests/mock/extension_manager.php
index 82065fc37d..0c6b8447f1 100644
--- a/tests/mock/extension_manager.php
+++ b/tests/mock/extension_manager.php
@@ -15,7 +15,7 @@ class phpbb_mock_extension_manager extends \phpbb\extension\manager
$this->php_ext = 'php';
$this->extensions = $extensions;
$this->filesystem = new \phpbb\filesystem(
- new \phpbb\symfony\request(
+ new \phpbb\symfony_request(
new phpbb_mock_request()
),
$this->phpbb_root_path,
diff --git a/tests/template/template_events_test.php b/tests/template/template_events_test.php
index 41ece4972b..4155d5fd83 100644
--- a/tests/template/template_events_test.php
+++ b/tests/template/template_events_test.php
@@ -117,7 +117,7 @@ Zeta test event in all',
dirname(__FILE__) . "/datasets/$dataset/"
);
$phpbb_filesystem = new \phpbb\filesystem(
- new \phpbb\symfony\request(
+ new \phpbb\symfony_request(
new phpbb_mock_request()
),
$phpbb_root_path,
diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php
index c9b38ee40d..e9cbdec1d9 100644
--- a/tests/template/template_test_case.php
+++ b/tests/template/template_test_case.php
@@ -63,8 +63,8 @@ class phpbb_template_template_test_case extends phpbb_test_case
$config = new \phpbb\config\config(array_merge($defaults, $new_config));
$this->user = new \phpbb\user;
- $phpbb_filesystem = new phpbb_filesystem(
- new phpbb_symfony_request(
+ $phpbb_filesystem = new \phpbb\filesystem(
+ new \phpbb\symfony_request(
new phpbb_mock_request()
),
$phpbb_root_path,
diff --git a/tests/template/template_test_case_with_tree.php b/tests/template/template_test_case_with_tree.php
index 7f7cffdb82..232331d37c 100644
--- a/tests/template/template_test_case_with_tree.php
+++ b/tests/template/template_test_case_with_tree.php
@@ -18,8 +18,8 @@ class phpbb_template_template_test_case_with_tree extends phpbb_template_templat
$defaults = $this->config_defaults();
$config = new \phpbb\config\config(array_merge($defaults, $new_config));
- $this->phpbb_filesystem = new phpbb_filesystem(
- new phpbb_symfony_request(
+ $this->phpbb_filesystem = new \phpbb\filesystem(
+ new \phpbb\symfony_request(
new phpbb_mock_request()
),
$phpbb_root_path,
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index f8ec125481..f87b3538a1 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -204,7 +204,7 @@ class phpbb_functional_test_case extends phpbb_test_case
$db,
$config,
new phpbb\filesystem(
- new phpbb\symfony\request(
+ new phpbb\symfony_request(
new phpbb_mock_request()
),
$phpbb_root_path,