mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/11700] Fix extension loading with namespaces
class loader now expects all classes to be prefixed with a backslash when resolving paths PHPBB3-11700
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace foo\bar\acp;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -16,12 +18,12 @@ if (!defined('IN_PHPBB'))
|
||||
exit;
|
||||
}
|
||||
|
||||
class phpbb_ext_foo_bar_acp_main_info
|
||||
class main_info
|
||||
{
|
||||
function module()
|
||||
{
|
||||
return array(
|
||||
'filename' => 'phpbb_ext_foo_bar_acp_main_module',
|
||||
'filename' => 'foo\bar\acp\main_module',
|
||||
'title' => 'ACP_FOOBAR_TITLE',
|
||||
'version' => '1.0.0',
|
||||
'modes' => array(
|
||||
|
@@ -8,6 +8,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace foo\bar\acp;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -16,7 +18,7 @@ if (!defined('IN_PHPBB'))
|
||||
exit;
|
||||
}
|
||||
|
||||
class phpbb_ext_foo_bar_acp_main_module
|
||||
class main_module
|
||||
{
|
||||
var $u_action;
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
foo_bar.controller:
|
||||
class: phpbb_ext_foo_bar_controller
|
||||
class: foo\bar\controller\controller
|
||||
arguments:
|
||||
- @controller.helper
|
||||
- @template
|
||||
|
@@ -1,7 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace foo\bar\controller;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class phpbb_ext_foo_bar_controller
|
||||
class controller
|
||||
{
|
||||
protected $template;
|
||||
|
||||
|
@@ -8,6 +8,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace foo\bar\event;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -22,7 +24,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
||||
class phpbb_ext_foo_bar_event_permission implements EventSubscriberInterface
|
||||
class permission implements EventSubscriberInterface
|
||||
{
|
||||
static public function getSubscribedEvents()
|
||||
{
|
||||
|
@@ -8,6 +8,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace foo\bar\event;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -22,7 +24,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
||||
class phpbb_ext_foo_bar_event_user_setup implements EventSubscriberInterface
|
||||
class user_setup implements EventSubscriberInterface
|
||||
{
|
||||
static public function getSubscribedEvents()
|
||||
{
|
||||
|
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
class phpbb_ext_foo_bar_ext extends \phpbb\extension\base
|
||||
namespace foo\bar;
|
||||
|
||||
class ext extends \phpbb\extension\base
|
||||
{
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user