1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-18 14:48:28 +01:00

19 Commits

Author SHA1 Message Date
Nils Adermann
fe36375a36 [ticket/11700] Fix extension loading with namespaces
class loader now expects all classes to be prefixed with a backslash
when resolving paths

PHPBB3-11700
2013-09-19 18:29:08 +02:00
Nils Adermann
c4b53490ad [ticket/11700] Correctly load extensions with nonprefixed namespaces
PHPBB3-11700
2013-09-17 16:15:44 +02:00
Nils Adermann
76dfe153fc [ticket/11700] Fix class loader tests for namespaces
PHPBB3-11700
2013-09-16 00:39:27 +02:00
Nils Adermann
b95fdacdd3 [ticket/11700] Move all recent code to namespaces
PHPBB3-11700
2013-09-16 00:25:27 +02:00
Nils Adermann
7030578bbe [ticket/11698] Moving all autoloadable files to phpbb/
PHPBB3-11698
2013-07-14 01:32:34 -04:00
Nathan Guse
df518ac131 [ticket/11335] (tests) Make php_ext 'php' not '.php'
PHPBB3-11335
2013-04-24 17:45:51 -05:00
Andreas Fischer
d3bbde69c4 [ticket/10973] Drop all require_once for mocks. Use autoloading.
PHPBB3-10973
2012-07-08 22:57:23 +02:00
Unknown
66c50f6b30 [ticket/9916] Updating license in non-distributed files
PHPBB3-9916
2012-01-02 19:10:36 +01:00
Nils Adermann
96209e0224 [feature/extension-manager] The class loader no longer knows about extensions
Instead the class loader is instantiated twice. Once with the phpbb_ prefix
and once with the phpbb_ext_ prefix.

PHPBB3-10323
2011-09-29 15:42:46 +02:00
Nils Adermann
14f1e581fa [feature/extension-manager] Extension Manager & Finder
Extensions RFC: http://area51.phpbb.com/phpBB/viewtopic.php?f=84&t=41499
Ticket: http://tracker.phpbb.com/browse/PHPBB3-10323

PHPBB3-10323
2011-09-29 15:42:33 +02:00
Erik Frèrejean
2e54212309 [ticket/10011] Tests can't be ran on PHP < 5.3
Apply the `__DIR__` fix to some remaining Ascraeus tests

PHPBB3-10011
2011-01-31 14:02:30 +01:00
Nils Adermann
1aef7eb20e [task/acm-refactor] Cleaning up left over mentions of ACM and fixing tests.
PHPBB3-9983
2011-01-09 23:49:44 +01:00
Igor Wiedler
9329b16ab1 [task/acm-refactor] Refactor the ACM classes to have a common interface.
They are now refered to as cache drivers rather than ACM classes. The
additional utility functions from the original cache class have been
moved to the cache_service. The class loader is now instantiated without
a cache instance and passed one as soon as it is constructed to allow
autoloading the cache classes.

PHPBB3-9983
2011-01-09 23:49:35 +01:00
Igor Wiedler
36e95f939d [ticket/9979] Support autoloading in unit tests
PHPBB-9979
2011-01-09 23:48:40 +01:00
Igor Wiedler
14a84cf89c Merge branch 'develop-olympus' into develop
This commit also ports all ascraeus tests to the new format.

Conflicts:
	tests/all_tests.php
	tests/network/all_tests.php
	tests/request/all_tests.php
	tests/request/request_var.php
	tests/template/templates/includephp.html
2011-01-07 01:39:59 +01:00
Igor Wiedler
af5b9a9640 [ticket/9556] Drop php closing tags, add trailing newline
Closing tags converted using Oleg's script.
remove-php-end-tags.py -a .

Trailing newlines added using the following where $ext is file extension.
find . -type f -name "*.$ext" -print | xargs printf "e %s\nw\n" | ed -s;

Extensions: php, css, html, js, xml.

PHPBB3-9556
2010-11-11 19:10:55 +01:00
Igor Wiedler
9edf0d64a2 [feature/auto-loading] Add test case for phpbb_dir2 =>
includes/dir2/dir2.php

PHPBB3-9682
2010-08-31 20:30:59 +02:00
Nils Adermann
f870434222 [feature/auto-loading] Only check subdir if there is another name part.
PHPBB3-9682
2010-08-19 22:06:19 +02:00
Nils Adermann
22c3041e12 [feature/auto-loading] Added a phpBB autoloader with caching support.
phpBB class name lookups follow these rules:
 - All classes are prefixed with phpbb_
 - All classes reside in includes/ or a subdirectory thereof
 - Directories must not contain underscores
 - The class name is separated into parts by underscores, the parts
   are checked from first to last, until one is found which is not
   a directory, all remaining parts make up the file name. If no parts
   are left, the last directory name is used.

Examples:
  directory structure:
    includes/
      class_name.php
      dir/
        class_name.php
        dir.php
        subdir/
          class_name.php

  lookups:
    phpbb_class_name            -> includes/class_name.php
    phpbb_dir_class_name        -> includes/dir/class_name.php
    phpbb_dir                   -> includes/dir/dir.php
    phpbb_dir_subdir_class_name -> includes/dir/subdir/class_name.php

Optionally the class can be supplied with a cache instance, either in the
constructor or via set_cache() at a later time. This allows for the lookups to
be cached, so the directories do not have to be traveresed on every request.
This makes it necessary for the cache and its dependency to continue to be
loaded the old way - without autoloading.

The code will not be changed to use autoloading, but it will rather only be
used for new classes where applicable.

PHPBB3-9682
2010-07-05 15:40:46 +02:00