Igor Wiedler
530991217b
Support classmap generation for classes without space after class name
...
Class names with multi-byte characters are not supported.
Closes #1360 .
12 years ago
Jordi Boggiano
75da832cd3
Fix parsing of large files that go over the PCRE limits
12 years ago
Victor Berchet
86bb1be61f
[ClassMapGeneratot] Filter out non php code
...
Otherwise files like https://github.com/propelorm/Propel/blob/master/generator/lib/behavior/i18n/templates/queryUseI18nQuery.php
would fail ("class" keyword would not be filtered out by php_strip_whitespace())
12 years ago
Jordi Boggiano
5a763cf010
Fix scanning of empty namespace{} blocks
12 years ago
Jordi Boggiano
487e66d0a9
Allow loading of multiple composer autoloaders concurrently, fixes #1248
12 years ago
Martin Hasoň
1ff1b8ac1f
Sorted generated classmap
12 years ago
Martin Hasoň
c63f0d9642
Preserved original position of package if required packages are before this
12 years ago
Martin Hasoň
b683aeb586
Fix expected values in tests for autoloader generator
12 years ago
Adrien Brault
fd58c24a9f
ComposerAutoloaderInitXXX::getLoader behaves like a ClassLoader singleton
...
Calling ComposerAutoloaderInit::getLoader twice when a package requires a .php file containing functions, lead to the functions to be declared twice, and cause an error.
In my case, using behat + symfony2extension + assetic, the error that occured:
PHP Fatal error: Cannot redeclare assetic_init() (previously declared in vendor/kriswallsmith/assetic/src/functions.php:20) in /vendor/kriswallsmith/assetic/src/functions.php on line 26
Fatal error: Cannot redeclare assetic_init() (previously declared in /vendor/kriswallsmith/assetic/src/functions.php:20) in /vendor/kriswallsmith/assetic/src/functions.php on line 26
12 years ago
Filip Procházka
9d8db4e148
AutoloadGenerator: respect dependencies, when requiring files
12 years ago
Jordi Boggiano
521bbe6556
CS fixes
12 years ago
Jordi Boggiano
2af2c27168
Add regression test for files autoload in root package, fixes #880
12 years ago
Jordi Boggiano
48c46ce3b6
Automatically generate classmaps for all PSR-0 packages to speed things up, fixes #541 , fixes #127
12 years ago
Jordi Boggiano
4f0ad98905
Always include the ClassLoader since autoload_real is included only once, refs #963
12 years ago
Jordi Boggiano
30fdf379aa
Minor consistency tweaks
12 years ago
Victor Berchet
d2dc73e361
[Autoload] Set $vendorDir et $baseDir in ComposerAutoloaderInitTargetDir::getLoader()
12 years ago
Victor Berchet
4c82c35dbc
[Autoload] Generate the autoloader_real file in the target directory
12 years ago
Victor Berchet
2c065416eb
[Autoload] generate an autoload_real.php file
12 years ago
Victor Berchet
963fedc9a5
[Autoload] remove closures because of a bug in APC
...
https://bugs.php.net/bug.php?id=52144
https://bugs.php.net/bug.php?id=61576
12 years ago
Taylor Otwell
8cf43868da
update tests for new expectations.
12 years ago
Jordi Boggiano
6fb5d26474
Revert "Add test and some fixes to allow absolute paths, refs #869"
...
This reverts commit a2a2f4af59
.
12 years ago
Jordi Boggiano
a2a2f4af59
Add test and some fixes to allow absolute paths, refs #869
12 years ago
Jordi Boggiano
adaa788955
Require file autoloads after the autoloader is registered
12 years ago
Grégoire Pineau
f4e9dd4fb8
Fixed PSR rules
12 years ago
Jordi Boggiano
1df9c62583
Cosmetic fixes to autoload generation
12 years ago
Benjamin Eberlei
5c5e962b5a
Add Files Autoloading key. This is a necessary feature to allow purely or partly functional libraries to be "autoloadable" by composer by calling require_once on every file in the "autoload"."files" list.
13 years ago
Jordi Boggiano
1bd4ccbd54
php-cs-fixer magic
13 years ago
Jordi Boggiano
aff7745231
Fix target-dir autoloader
13 years ago
Jordi Boggiano
15ab5868a3
Move composer metafiles back in a composer dir, except autoload.php
13 years ago
Jordi Boggiano
51711c2f73
Fix multi-prefix handling
13 years ago
Jordi Boggiano
66135538c1
Allow root packages packages with target-dir to be autoloaded, fixes #139
13 years ago
Jordi Boggiano
244a7fd37b
Add missing test fixture
13 years ago
Jordi Boggiano
2d9739bd05
Add support for files in classmap autoload config, fixes #463
13 years ago
Jordi Boggiano
30cfb69739
Add support for mapping a namespace prefix onto many dirs in the autoload config
13 years ago
Martin Hasoň
fde38dacec
Added test for generated classmap files
13 years ago
Martin Hasoň
81e8261692
Added tests for traits
13 years ago
Jordi Boggiano
edf93f1fcc
Fix test & behavior
13 years ago
Jordi Boggiano
f8a09eaa3f
Make classmaps relative instead of absolute for file portability
13 years ago
Benjamin Eberlei
671cd5ee08
Add tests for ClassMapGenerator
13 years ago
Jordi Boggiano
15d78e6ad1
Fix autoload generator with vendor-dir = working-dir
13 years ago
Beau Simensen
fd5124a632
Standards fixes per @stof (continued, my bad)
13 years ago
Beau Simensen
e8fcf281fa
Autoload Generator handles multiple PSR-0 paths
...
The Autoload Generator was not behaving exactly as expected.
This PR is an alternate version of #203 based on some of
@stof's input on that PR.
The main differences are:
* The main package is added first instead of last
* parseAutoloads returns a different structure:
array('psr-0' => array('Ns\\Foo' => array('installDir')))
* dump and createLoader updated to account for new structure
13 years ago
Jordi Boggiano
abb926a60c
Add tests for autoloader
13 years ago