hinikato
1989479634
Fixed class normalization for class map case.
2012-10-16 13:59:33 +03:00
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
2012-09-14 11:21:34 +02:00
Filip Procházka
80e9999d1c
typo
2012-09-06 17:26:42 +02:00
Filip Procházka
9d8db4e148
AutoloadGenerator: respect dependencies, when requiring files
2012-09-06 15:07:07 +02:00
Christophe Coevoet
66b83a39d2
Removed a PHP notice when dumping the autoloader
...
This occured when the root package has a target-dir but does not have
configure a PSR-0 autoloader.
Fixes #1028
2012-08-24 23:25:14 +02:00
Jordi Boggiano
521bbe6556
CS fixes
2012-08-18 16:22:15 +02:00
Jordi Boggiano
ef637c8f1a
CS fixes
2012-08-18 16:18:41 +02:00
Jordi Boggiano
dbd44d6bcf
Handle empty namespaces
2012-08-15 13:10:56 +02:00
Jordi Boggiano
44d7d4a38e
Make PSR0 scanning optional
2012-08-14 20:28:49 +02:00
Jordi Boggiano
ee14950972
Add whitelist to the classmap generator to allow skipping of Test files
2012-08-14 19:55:31 +02:00
Jordi Boggiano
48c46ce3b6
Automatically generate classmaps for all PSR-0 packages to speed things up, fixes #541 , fixes #127
2012-08-14 19:55:30 +02:00
Jordi Boggiano
289d23b5cc
Optimization for autoload misses, refs #964
2012-08-14 19:50:19 +02:00
Jordi Boggiano
4f0ad98905
Always include the ClassLoader since autoload_real is included only once, refs #963
2012-08-14 19:13:39 +02:00
Jordi Boggiano
30fdf379aa
Minor consistency tweaks
2012-08-14 19:05:34 +02:00
Victor Berchet
d2dc73e361
[Autoload] Set $vendorDir et $baseDir in ComposerAutoloaderInitTargetDir::getLoader()
2012-08-06 11:33:17 +02:00
Victor Berchet
4c82c35dbc
[Autoload] Generate the autoloader_real file in the target directory
2012-08-06 10:56:57 +02:00
Victor Berchet
2c065416eb
[Autoload] generate an autoload_real.php file
2012-08-01 10:12:46 +02:00
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
2012-07-31 20:17:39 +02:00
Taylor Otwell
a834efe7c9
Fix directory handling when auto-loading files.
2012-07-27 09:03:25 -05:00
Nils Adermann
4e9e66a957
Make sure custom vendor paths don't break file autoloading
2012-07-23 23:53:44 +02:00
Johannes M. Schmitt
9f150b1c1e
fixes a bug when root package has a 'files' autoload entry
2012-07-23 22:02:08 +02:00
Jordi Boggiano
defe5766a4
Revert "Merge remote-tracking branch 'till/bugfix-broken-classmap'"
...
This reverts commit d837b8a657
, reversing
changes made to 520d915860
.
2012-07-18 18:41:07 +02:00
Jordi Boggiano
6fb5d26474
Revert "Add test and some fixes to allow absolute paths, refs #869"
...
This reverts commit a2a2f4af59
.
2012-07-18 18:40:17 +02:00
Jordi Boggiano
a2a2f4af59
Add test and some fixes to allow absolute paths, refs #869
2012-07-18 18:31:22 +02:00
Jordi Boggiano
d837b8a657
Merge remote-tracking branch 'till/bugfix-broken-classmap'
2012-07-18 18:20:14 +02:00
Sylvain Filteau
51404659ef
Change the order of the include paths
...
Composer installed libraries should have precedence over other libraries in the
system (like PEAR installed libraries).
Made composer prepend it's include_path configuration instead of appending it.
2012-07-06 14:17:27 -04:00
till
2823c78856
Allow absolute paths in composer.json and don't prepend them with a funny $baseDir variable.
2012-07-03 17:50:41 +02:00
Nils Adermann
d84273ee34
Merge pull request #833 from Seldaek/installmgr_cleanup
...
Use the config object to define the vendor dir and not the installation manager
2012-07-01 10:04:09 -07:00
Jordi Boggiano
adaa788955
Require file autoloads after the autoloader is registered
2012-06-25 11:39:51 +02:00
Jordi Boggiano
b876dcbafb
Use the config object to define the vendor dir and not the installation manager
2012-06-24 21:58:51 +02:00
Jordi Boggiano
66e9dcddf4
CS fixes
2012-06-23 11:58:18 +02:00
Jordi Boggiano
383c3f0153
Avoid tokenizing files for nothing
2012-06-22 18:59:15 +02:00
Jordi Boggiano
4bbb168d44
Remove BC code
2012-06-19 23:06:40 +02:00
Jordi Boggiano
67cf46546d
Merge pull request #791 from liuggio/patch-1
...
just added a \ before RuntimeException
2012-06-12 09:20:33 -07:00
Giulio De Donato
5c08b5b215
fixed #790
2012-06-12 17:57:11 +02:00
Giulio De Donato
3a53b06f00
just added a \ before RuntimeException (sorry I didn't run the test)
2012-06-12 18:08:22 +03:00
Jordi Boggiano
1df9c62583
Cosmetic fixes to autoload generation
2012-06-11 14:15:08 +02:00
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.
2012-06-02 18:18:33 +02:00
Jordi Boggiano
c440b4594a
More PSR-2 goodness
2012-05-22 17:13:15 +02:00
Jordi Boggiano
1bd4ccbd54
php-cs-fixer magic
2012-05-22 12:07:08 +02:00
Jordi Boggiano
5c0c101327
Wrap token_get_all for better debuggability
2012-05-21 12:51:21 +02:00
Adán Lobato
61eb0119f1
Fixed some mistakes at PHPDoc
2012-05-15 16:18:18 +02:00
Jordi Boggiano
1a255420b0
Ignore aliases in autoload generator
2012-05-14 14:02:02 +02:00
Jordi Boggiano
11edea8aee
Add deprecation warning to old .composer files
2012-05-13 11:35:50 +02:00
Jordi Boggiano
aff7745231
Fix target-dir autoloader
2012-04-23 10:56:46 +02:00
Jordi Boggiano
15ab5868a3
Move composer metafiles back in a composer dir, except autoload.php
2012-04-22 22:18:19 +02:00
Nils Adermann
e74e218bdb
Merge pull request #602 from Seldaek/target_dir_autoload
...
Target dir autoloading for root packages, fixes #139
2012-04-19 14:04:16 -07:00
Jordi Boggiano
ab0ced493c
Make sure BC dir exists
2012-04-19 22:26:09 +02:00
Jordi Boggiano
51711c2f73
Fix multi-prefix handling
2012-04-19 22:08:24 +02:00
Jordi Boggiano
66135538c1
Allow root packages packages with target-dir to be autoloaded, fixes #139
2012-04-19 22:06:38 +02:00
Jordi Boggiano
22fe296ad0
Move .composer files out into the vendor dir, fixes #497
2012-04-19 21:55:35 +02:00
Jordi Boggiano
b999d18365
Improve include_paths generation, fixes #596
2012-04-19 10:51:57 +02:00
Jordi Boggiano
83b52b5b7f
Avoid blowing up on misconfigured autoload entries
2012-04-17 14:01:24 +02:00
Jordi Boggiano
8f24a04a1d
Make sure vendor dir exists before dumping autoloader
2012-04-15 17:48:30 +02:00
Jordi Boggiano
3c07b4338a
Rename include-paths to include-path, add deprecated warnings, only generate file if it is needed
2012-04-08 17:42:57 +02:00
Christoph Hochstrasser
68c12c3516
Do set_include_path only if any package define include paths.
2012-04-04 09:48:49 +02:00
Christoph Hochstrasser
f369104bb1
Packages can define include paths.
2012-04-04 09:46:31 +02:00
Jordi Boggiano
2d9739bd05
Add support for files in classmap autoload config, fixes #463
2012-04-01 20:23:47 +02:00
Jordi Boggiano
30cfb69739
Add support for mapping a namespace prefix onto many dirs in the autoload config
2012-03-28 17:09:33 +02:00
Jordi Boggiano
5f30206c69
Merge remote-tracking branch 'hason/classloader'
2012-03-24 18:06:49 +01:00
Baptiste "Talus" Clavie
15b70e2096
[ClassLoader] Removing trailing whitespaces
2012-03-22 11:45:44 +01:00
Baptiste "Talus" Clavie
6957743aee
[ClassLoader] Corrected indentation
2012-03-22 11:19:01 +01:00
Baptiste "Talus" Clavie
6782287091
[ClassLoader] Got an if-condition out of a unnecessary loop
2012-03-22 11:12:30 +01:00
Martin Hasoň
1f8c9eeb6c
Added parameter $inDirectory to method Filesystem::findShortestPath
2012-03-22 10:11:48 +01:00
Martin Hasoň
afc04c9e53
Fixed creating shortest paths in AutoloadGenerator
2012-03-21 14:29:24 +01:00
Jordi Boggiano
744f4b7c9a
Backport trait support in ClassMapGenerator from symfony
2012-03-10 02:00:29 +01:00
Jordi Boggiano
f8a09eaa3f
Make classmaps relative instead of absolute for file portability
2012-03-10 01:59:59 +01:00
Benjamin Eberlei
671cd5ee08
Add tests for ClassMapGenerator
2012-03-05 14:10:01 +01:00
Benjamin Eberlei
1af3604303
Add support for class-map generation.
2012-03-05 13:26:46 +01:00
Andrew Cobby
2451336284
Fixed syntax error in example code in header comment
2012-03-04 16:38:11 +11:00
Jordi Boggiano
5d414436ba
Avoid phpunit process-isolation errors with the autoload closure
2012-02-29 17:24:17 +01:00
Jordi Boggiano
5da021ffa7
Moved Filesystem to base Util namespace
2012-02-09 18:45:28 +01:00
Jordi Boggiano
ec352b1e84
Add support for adding more than one fallback dir
2012-02-09 18:18:43 +01:00
Jordi Boggiano
0e7c0d918f
Add useIncludePath support to ClassLoader
2012-02-09 15:42:47 +01:00
Jordi Boggiano
5daaba9e62
Extract some code in a AutoloadGenerator::buildPackageMap method
2012-02-07 11:12:03 +01:00
Jordi Boggiano
8c535b1961
Allow the Composer ClassLoader to be unregistered easily
2012-02-07 11:11:39 +01:00
Jordi Boggiano
15d78e6ad1
Fix autoload generator with vendor-dir = working-dir
2012-02-02 16:38:48 +01:00
Martin Hasoň
d27989c808
Fixed obscure code
2012-02-02 15:36:38 +01:00
Jordi Boggiano
e90a8dc4c9
Fix feedback from 7222c1
2012-01-23 10:28:15 +01:00
Jordi Boggiano
7222c111ed
Make sure multiple autoload files can be used together, fixes #207
2012-01-22 22:40:04 +01:00
Beau Simensen
2d721f5792
Standards fixes per @stof
2012-01-12 21:40:53 -06:00
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
2012-01-12 21:14:30 -06:00
Jordi Boggiano
2c367e7f39
Allow multiple fallback dirs
2011-12-21 16:56:18 +01:00
Pierre Minnieur
3b1843827a
removed the `return false` as we only need a positive return information
2011-12-21 13:30:25 +01:00
Pierre Minnieur
4242a05a0e
added Boolean return values for loadClass() method
2011-12-21 11:50:24 +01:00
Jordi Boggiano
d22b80d13b
Allow "" as autoload prefix for fallback dir
2011-12-18 21:09:40 +01:00
Jordi Boggiano
304ce3b375
Fix relative target dirs
2011-12-04 22:13:11 +01:00
Jordi Boggiano
bc88d86983
Make use of Filesystem class in AutoloadGenerator
2011-12-04 18:35:44 +01:00
Jordi Boggiano
cb44ba8325
Fix autoload handling of main project
2011-11-21 11:33:30 +01:00
Jordi Boggiano
f5b7e968b2
Minor adjustments to merged PR
2011-11-20 22:03:11 +01:00
Ant Cunningham
e0400773f7
Adding support for configurable vendor path in composer.json.
2011-11-18 13:31:50 -05:00
Henrik Bjørnskov
8180117584
AutoloadGenerator.php miscalculates the path
...
Add tenary check to make sure relative specified paths arent seen as
absolute.
Fixises #94
2011-11-07 09:29:37 +01:00
Jordi Boggiano
1a7bf8a7f8
Bugfixes
2011-11-06 01:09:48 +01:00
Jordi Boggiano
b7f6cf69ab
Add tests and fixes some issues
2011-11-05 23:54:05 +01:00
Jordi Boggiano
c8859240d2
Add InstallerInstaller, refactored AutoloadGenerator, fixes #59
2011-11-05 23:54:01 +01:00
Jordi Boggiano
5e3c55f171
Add support for multiple packages defining the same namespace prefix
2011-11-03 21:10:39 +01:00
Jordi Boggiano
bd712db727
Reverse-orders namespaces by specificity
2011-11-03 21:05:01 +01:00
Jordi Boggiano
1ca3e5e5e2
Generate a map separated from the autoloader, fixes #74
...
Also the loader is now returned by the autoload.php
2011-10-30 20:29:06 +01:00
Fabien Potencier
03b06ebbca
Fix path for autoloaded libs as the .composer/ dir is now under the vendor/ one.
2011-10-30 09:51:16 +01:00
Fabien Potencier
9e7ebd9280
Fix autoload.php generator
2011-10-29 07:24:30 +02:00
Jordi Boggiano
89caa9b117
Rewrite autoloader to use only PSR-0, remove splitting of PEAR path
2011-10-27 22:09:01 +02:00
Jordi Boggiano
c03a739548
Use psr-0 instead of psr0
2011-10-24 12:03:11 +02:00
Jordi Boggiano
be47991b36
Build a standalone autoload file
2011-10-23 21:23:37 +02:00
Jordi Boggiano
8a571c05db
Fix issues in new autoloader code
2011-10-23 19:40:22 +02:00
Igor Wiedler
808a2c9448
[composer] wrap UniversalClassLoader require in if class_exists
2011-10-23 19:40:16 +02:00
Igor Wiedler
aa7c4b8ef7
[autoload] refactor getFullPackage into populateAutoloadInformation
2011-10-23 19:40:14 +02:00
Igor Wiedler
9d238330b3
[autoload] refactor autoload generation code into a AutoloadGenerator
2011-10-23 19:40:12 +02:00