Jordi Boggiano
ac497feaba
CS fixes
10 years ago
jakoch
a0e5ead9b0
removed unused variables $baseDir and $vendorDir from "autoloader_real.php" generated by AutoloadGenerator. adjusted tests accordingly.
10 years ago
Jordi Boggiano
05d9912f97
Ignore classes in ClassMapGenerator
10 years ago
Jordi Boggiano
781c97fa9b
Refactor to avoid global static state
10 years ago
Jan Brecka
b94838169d
show warning only instead of throwing exception
10 years ago
Jordi Boggiano
5fb005631a
Tweaking dispatchScript method to be in line with the rest, and add devMode to *_AUTOLOAD_DUMP events
10 years ago
Jordi Boggiano
023ff131aa
Merge remote-tracking branch 'bamarni/autoload-dev'
10 years ago
Jordi Boggiano
cea7c07cf2
Fix CS
10 years ago
Bilal Amarni
db91454a13
added an autoload-dev section
11 years ago
Olivier Laviale
40e484ed38
Fixed an issue that would lead to scattered autoloading files
11 years ago
Nicolas Grekas
00a6f8e38d
dedicated scope isolation function for autoload_real
11 years ago
Jordi Boggiano
ed02997a7b
Fix mode and add docblock, refs #2644
11 years ago
Jordi Boggiano
d26dda5c95
Merge remote-tracking branch 'olvlvl/improved_package_sorting_alone'
11 years ago
Nils Adermann
aef0483cc9
Merge pull request #2667 from nicolas-grekas/master
...
scope isolation for user includes
11 years ago
Nicolas Grekas
6d7b9afc4b
scope isolation for user includes
11 years ago
Jérôme Macias
01cd990995
Fix PSR-4 autoload classmap generator
11 years ago
Olivier Laviale
17278999ba
Coding style compliance
11 years ago
Olivier Laviale
46776c8e23
Improved package sorting
11 years ago
René Kerner
b0ec8ee096
* added exclude-from-classmap feature
...
* updated to latest master version
11 years ago
Jordi Boggiano
3c5000ad7f
CS tweaks and cleanups, allow "" to set fallback dirs, refs #2459
11 years ago
Jordi Boggiano
b23742e30c
Merge remote-tracking branch 'donquixote/feature/psr4-complete'
11 years ago
Stan Lemon
5fd3223aec
Updates per @stof
11 years ago
Stan Lemon
d6c46f2091
Allow the autoloader suffix to be configured from a project's composer.json
11 years ago
Andreas Hennings
c0aad84d8b
Validation to make the combination of target-dir with psr-4 illegal.
11 years ago
Andreas Hennings
39c09d5192
Add psr-4 stuff in a few more places.
11 years ago
Andreas Hennings
bbf6278905
AutoloadGenerator to support PSR-4. Tests included.
11 years ago
Jordi Boggiano
50fbfe4d63
Filesystem/autoload fixes for windows, refs #2304 , #2342 , #2365
11 years ago
Jordi Boggiano
7682bc0d60
Merge remote-tracking branch 'Devolicious/feature/no-prepend'
11 years ago
Ruud Denivel
c7bb3ad746
refactor prepend autoloader from cli option to config var (prepend-autoloader) in composer.json
11 years ago
Jordi Boggiano
11a0d16ccc
CS fixes
11 years ago
Ruud Denivel
65c10daaf8
disable prepend option on install
11 years ago
Martin Hasoň
3c0a620ad5
Fixed path analysis
11 years ago
Nils Adermann
242c58c789
Merge pull request #2179 from naderman/plugins
...
Plugins
11 years ago
Jordi Boggiano
9b70b89b8f
Merge pull request #2210 from Firehed/master
...
Change 'generated' notice to @phpdoc-style annotation
11 years ago
Nils Adermann
786ea2929b
Merge remote-tracking branch 'github-composer/master' into plugins
...
* github-composer/master:
Make sure directories we are downloading to are empty
Fix parsing of trunk in SvnDriver, fixes composer/satis#88
Fix file layout in unit tests
Fix parse error thrown in PHP5.5+
11 years ago
Nils Adermann
3960edd64e
Turn EventDispatcher into generic solution handling plugins as well
11 years ago
Alan Hollis
ede2b37ae2
Fix parse error thrown in PHP5.5+
...
When running composer update the file generated by AutoloadGenerator was
not able to be parsed by php due to a require statement inside the foreach
loop.
The fix is to make the statement work the same as the
autoload_namespaces.php require is done.
Issue occured using the following php versions
PHP 5.5.1-2+debphp.org~precise+2
PHP 5.5.3-1+debphp.org~precise+2
11 years ago
Firehed
046d55e886
Change 'generated' notice to @phpdoc-style annotation
...
While it isn't an official part of the syntax, it integrates better with other
tools that ignore diffs on generated code.
11 years ago
Benji Schwartz-Gilbert
f5048059d8
Fixes the autoload_namespaces generator for packages in the root of the vendor directory
11 years ago
Andreas Hennings
ce8a9aae5b
Slightly nicer heredoc in AutoloadGenerator::getIncludePathsFile()
11 years ago
Andreas Hennings
5369904dd3
autoload_files.php should return an array of files, instead of directly including them.
11 years ago
Andreas Hennings
8e9bdfb4da
Factor the filesCode generation into a separate method.
11 years ago
Andreas Hennings
f98a8f472e
Generate an autoload_files.php next to autoload_namespaces.php and autoload_classes.php
11 years ago
Jordi Boggiano
8d0b7f278e
CS fixes
11 years ago
Taylor Otwell
60cd875cc2
Added "pre-autoload-dump" event.
...
This event is fired before the autoload file is generated, for either
an install or update command.
11 years ago
Jordi Boggiano
5ba147663d
Use ClassLoader::set to initialize the class loader paths
11 years ago
Jordi Boggiano
dc71ba557b
Consistently use arrays as paths for a given namespace prefix
11 years ago
John Boehr
caad88c047
Update AutoloadGenerator.php
...
This should fix an issue with this commit:
87a42c2f01
This commit is causing a parse error in autoload_namespaces.php:
return array(
'zsql' => 'phar://' . '$vendorDir . '/jbboehr/zsql/build/zsql.phar',
A similar problem happens when using autoload.files as well.
11 years ago
Jordi Boggiano
5264d0637b
Fix regression added in 33af9eea95
, fixes #1841
11 years ago
Jordi Boggiano
566313834a
Add workaround for php bug 64634 in copy
11 years ago
Jordi Boggiano
33af9eea95
Always dump packages, even if only an alias is added, fixes #1809
11 years ago
Jordi Boggiano
3ce71466f1
Treat empty paths in autoloader as ".", fixes #1727
11 years ago
Martin Hasoň
07d2f17afe
[Autoload] Make all paths relative for file portability
11 years ago
Martin Hasoň
48444a028c
Added support for vendor dir excluded from working dir
11 years ago
Sander Marechal
132f2a9d5d
Cache getcwd() result
11 years ago
Sander Marechal
c10e25a945
Use cross-platform absolute path check
11 years ago
Sander Marechal
d7697574ff
Fix shortest absolute paths from cwd to classmap path
11 years ago
Jordi Boggiano
3cc5698e7b
Allow PHP 5.2 autoloaders to consume namespace, classmap and include path files, fixes #1730
11 years ago
Jordi Boggiano
d929a0813a
Prepend the ClassLoader autoloader to avoid calling other previously registered autoloaders, fixes #1699
11 years ago
Jordi Boggiano
87a42c2f01
Fix CS
11 years ago
Jordi Boggiano
95a6be2396
Merge remote-tracking branch 'mnishihan/master'
11 years ago
Jordi Boggiano
8d55b9cced
Merge remote-tracking branch 'ronnylt/script-event-post-dump-autoload'
...
Conflicts:
tests/Composer/Test/Autoload/AutoloadGeneratorTest.php
12 years ago
Jordi Boggiano
5a484cb3a9
Make sure target-dir plays well with classmap and files autoload, for root and deps, refs #1550
12 years ago
Jordi Boggiano
ab1256e135
Merge remote-tracking branch 'cmodijk/master'
12 years ago
Cliff Odijk
5127fe8359
added type check to autoloader fixes #1504
12 years ago
M N Islam Shihan
41e91f3064
Fixed an issue when a phar file is used in "files" option in composer.json
12 years ago
Pierre du Plessis
84b34b70e0
Add config option to set if the PHP include path should automatically be used when generating the autoloader
12 years ago
Ronny López
f627c3c603
Make Event devMode argument optional (false by default).
12 years ago
Ronny López
e5cbf83185
Added post-autoload-dump script event.
12 years ago
Jordi Boggiano
c80cb76b9b
Always prepend autoloaders to avoid tools (i.e. phpunit) taking precedence over the project autoloader
12 years ago
Jordi Boggiano
1beccf9f0f
Fix access of the static loader property
12 years ago
Martin Hasoň
45d7eb5b53
Fixed generating packageMap in AutoloaderGenerater (fixes generating include_paths.php file)
12 years ago
Martin Hasoň
03e355f063
Fixed topological sorting of packages in AutoloadGenerator
12 years ago
Jordi Boggiano
c5f3a6febd
Fix optimized autoloader generation for PSR-0 configs that include non-existent dirs, fixes #1286
12 years ago
Jordi Boggiano
de3188ca7d
Remove target dir for classmap autoloads of the root package, fixes #1308
12 years ago
Jordi Boggiano
487e66d0a9
Allow loading of multiple composer autoloaders concurrently, fixes #1248
12 years ago
Martin Hasoň
9582a8abfa
Added tests for consistency of data in AutoloadGenerator::sortPackageMap
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ň
e75abcbb41
Fixed order of packages in the classmap autoloader
12 years ago
Martin Hasoň
b7f96d5dc3
Fixed 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
80e9999d1c
typo
12 years ago
Filip Procházka
9d8db4e148
AutoloadGenerator: respect dependencies, when requiring files
12 years ago
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
12 years ago
Jordi Boggiano
521bbe6556
CS fixes
12 years ago
Jordi Boggiano
ef637c8f1a
CS fixes
12 years ago
Jordi Boggiano
dbd44d6bcf
Handle empty namespaces
12 years ago
Jordi Boggiano
44d7d4a38e
Make PSR0 scanning optional
12 years ago
Jordi Boggiano
ee14950972
Add whitelist to the classmap generator to allow skipping of Test files
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
a834efe7c9
Fix directory handling when auto-loading files.
12 years ago
Nils Adermann
4e9e66a957
Make sure custom vendor paths don't break file autoloading
12 years ago
Johannes M. Schmitt
9f150b1c1e
fixes a bug when root package has a 'files' autoload entry
12 years ago