503 Commits (eee8816bc3b2cc4b5d97ae7b526a8169246944ce)

Author SHA1 Message Date
Omer Karadagli 4046ae042d Up-level relative paths in exclude-from-classmap 9 years ago
Rob Bast 991d25115f fixes #4562 9 years ago
annesosensio 2e4157145b Made wildcard expansion consistent with bash 9 years ago
Jordi Boggiano 6c16510743 Add support for wildcards in exclude-from-classmap, refs #1607 9 years ago
Jordi Boggiano f1b0c073ad Tweaked exclude-from-classmap: windows support, normalize paths and make sure they are all package-relative and do not leak to other packages, refs #1607 9 years ago
Jordi Boggiano 084f6de24e Merge remote-tracking branch 'trivago/add_exclude'
Conflicts:
	doc/04-schema.md
	src/Composer/Autoload/AutoloadGenerator.php
9 years ago
David Walker e0a6419992 When classmap authoratative is enabled, there should be no reason to load 3 files, and process them when autoloader will return false 9 years ago
Jordi Boggiano 6582c337d0 Fix typo 9 years ago
Jordi Boggiano 1160b782c8 Deduplicate classmap creation and add support for loading classmaps on the fly for plugins & co 9 years ago
Rob Bast b523fc0b7b ran fixers 9 years ago
Jordi Boggiano ce08582671 Fix CS 9 years ago
Bryan Davis cc2b9cfca5 Add cli argument for classmap-authoritative
Add a `--classmap-authoritative (-a)` argument to `composer install`,
`composer update` and `composer dumpautoload`. This enables the same
authoritative classmap behavior as the existing `classmap-authoritative`
configuration setting. The option can be used for creating highly
optimized production autoloaders via `composer install --no-dev
--optimize-autoloader --classmap-authoritative` for projects where
multiple autoloaders are present and unnecessary `file_exists` calls
introduce performance issues.

Closes #4361
9 years ago
voroks 154092ba1a Added removing file 'include_path.php' (if it is empty). 9 years ago
voroks 457bc20c34 Explicit comparison was removed. 9 years ago
voroks cca42ff0be Fixed indents: we should use spaces instead tabulation. 9 years ago
voroks 4fa1cb2e9c Removing file autoload_files.php was added (#4254) 9 years ago
Rob Bast 593af4b1bf add license file during autoload dumping
closes #4288
9 years ago
Nicolas Grekas fbae6b1589 Revert "Merge pull request #3975 from marc-mabe/hotfix/3974"
This reverts commit bdb6ecb29e, reversing
changes made to 8a12e50a16.
9 years ago
Jonathan Eskew 42b025776a Move file identifier calculation to compile time 9 years ago
Jordi Boggiano b17ccbfa0d Avoid invalid warnings when scanning the same file twice, fixes #4195, fixes #4197 9 years ago
Jonathan Eskew 24c4322672 Use 5.3 compatible array syntax 9 years ago
Jonathan Eskew 868a872df2 Push the hash to $GLOBALS 9 years ago
Jonathan Eskew 61ed7a9547 Explicitly check if a file has already been required before requiring it 9 years ago
Jordi Boggiano 943107cfe7 Load most specific namespaces always, and dependents before dependencies when building classmaps
This also adds notifications of duplicate classes
9 years ago
Jordi Boggiano e73448ae1e Add possessive quantifiers to avoid backtracking and fix segfault on large files, fixes #4153 9 years ago
elazar 6c029a850c Resolves #4138: Removed *Test.php filtering from AutoloadGenerator->dump() 9 years ago
Possum 29ca21f30e PHP version checks tweaking 9 years ago
Jordi Boggiano 164dc2a097 Reuse prefix only if no prefix is defined 9 years ago
Marc Bennewitz 9455c49053 fixes #3974: Autoloader have to distinguish between files and directories 9 years ago
Jordi Boggiano dbfd47eeca CS fixes 9 years ago
msiebeneicher 7522a33079 Merge branch 'master' of https://github.com/composer/composer into add_exclude
# By Jordi Boggiano (30) and others
# Via Jordi Boggiano (37) and Morgan Campbell (1)
* 'master' of https://github.com/composer/composer: (83 commits)
  Update 01-basic-usage.md
  Revert 331425bcb3 as well, fixes #3612
  Revert "Disable overwrites when no-ansi is present, fixes #3612"
  Update deps
  Use justinrainbow/json-schema 1.4
  Improved wording
  Fix docs basic-auth => http-basic
  Add test for Generics class
  Single variable for traits and enums
  Use HHVM_VERSION instead of HPHP_VERSION
  Add support for using classmap to autoload Hack enums
  Re-use existing autoloader suffix if available, fixes #3701
  Report Travis CI build success early
  Test on HHVM nightly releases. Allow to fail.
  Make parseJson safer
  Use get home from Config instead of factory
  Fix env override regression, fixes #3820
  [create-project] Used no progress value for dependencies
  Add docBlock and fix CS
  Fix output of first line of progress when output is not decorated, refs #3818
  ...
9 years ago
Fred Emmott bdf51ab16d Single variable for traits and enums 9 years ago
Fred Emmott cb1ea889d6 Use HHVM_VERSION instead of HPHP_VERSION 9 years ago
Fred Emmott 33ea86573e Add support for using classmap to autoload Hack enums
fixes composer/composer#3823

Ran tests with both PHP5.5.9-1ubuntu4.5 and HHVM 3.6. Test fails on HHVM only
if I back out the ClassMapGenerator.php change.
9 years ago
Jordi Boggiano b296e654eb Re-use existing autoloader suffix if available, fixes #3701 9 years ago
Rob Bast cb336a5416 Implement writeError throughout Composer 9 years ago
Jordi Boggiano 0b4a9235f4 CS fixes 9 years ago
msiebeneicher 3682a9f5a7 * Cleanup code comments 10 years ago
msiebeneicher dad6b05ca7 Merge branches 'add_exclude' and 'master' of https://github.com/trivago/composer into add_exclude
* Resolve conflicts and update unit test
10 years ago
msiebeneicher f28785a49d Merge branches 'add_exclude' and 'master' of https://github.com/trivago/composer into add_exclude
* 'add_exclude' of https://github.com/trivago/composer:

# By Jordi Boggiano (239) and others
# Via Jordi Boggiano (184) and others
* 'master' of https://github.com/trivago/composer: (638 commits)
  Simplified syntax
  github deprecation changes
  fix bug in GitDriver::supports for remote repo
  strict check, testcase(s)
  Fix regex matching and add more tests for addSubNode, refs #3721, fixes #3716
  solve edge case for `composer remove vendor/pkg`
  chmod 644 src/Composer/Command/RemoveCommand.php
  Avoid failing on composer show of lazy providers
  Show more info when a download fails
  Add notion of autoloader skipping autoload-dev rules
  Satis grammar fix.
  remove unused statements
  removed needless output param
  + limit git ls-remote to heads + escape repo url
  add check for remote Repository in GitDriver::supports
  suppress the prefix
  Improve notice about /usr/local/bin
  Reuse current file permissions
  Add the P character to the regex pattern
  Added deprecated warning for the dev option
  ...

Conflicts:
	src/Composer/Autoload/AutoloadGenerator.php
	src/Composer/Autoload/ClassMapGenerator.php
10 years ago
Bryan Davis 8ceb5714a4 Fix spelling of "Authoritative"
- classMapAuthoratative -> classMapAuthoritative
- getClassMapAuthoratative -> isClassMapAuthoritative
- Don't use elseif since if block returns
10 years ago
Bryan Davis ad1f8e6c5a Add classmap-authoritative config setting
Add a "classmap-authoritative" configuration setting that can be used to
disable searching the various prefix and fallback directories for
classes that have not been registered with the
Composer\Autoload\ClassLoader class map. This setting can be used to
optimize performance by avoiding a potentially large number of
`file_exists` calls when Composer is being used in a program with
additional autoloader facilities. Use of the setting implies
"optimize-autoloader" to ensure that the most complete class map
possible is generated.

Closes #3603
10 years ago
Jordi Boggiano fc3c7838b2 CS fixes 10 years ago
Michael Gusev a531594a4a Issue #3422
https://github.com/composer/composer/issues/3422
10 years ago
Jordi Boggiano 94926218e8 CS fixes 10 years ago
Jordi Boggiano 4ce9252255 Avoid passing args to CLI handlers when none are needed, fixes #3332 10 years ago
Artur Eshenbrener 56482cff0a Changed short array syntzx to long 10 years ago
Artur Eshenbrener ad1d0be420 Accessing to option 'optimize-autoloder' inside 'post-autoload-dump' script event. 10 years ago
cw-ozaki d649cfc6a1 Add --no-scripts argument for dump-autoload command 10 years ago
Jordi Boggiano 0ce0cf42e8 Merge remote-tracking branch 'francoispluchino/fix-phpdoc'
Conflicts:
	src/Composer/EventDispatcher/EventDispatcher.php
10 years ago
Jordi Boggiano 4dfa3c469e Fix class map generator handling of missing files 10 years ago
Jordi Boggiano a227523c4f Fix php_strip_whitespace bugginess, fixes #3030 10 years ago
Jordi Boggiano 799876dd55 Allow dashes in class names for HHVM support, fixes #2967 10 years ago
François Pluchino 8b5c00bff0 Fix phpdoc 10 years ago
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
Fabien Potencier 12421dd6b7 fixed class map generator when using a heredoc with spaces 10 years ago
Jordi Boggiano 14f35e812c Merge pull request #2912 from ckwalsh/master
Support generating class map for XHP classes
10 years ago
Jordi Boggiano 49d4054e51 Handle files with no php at all, fixes #2910 10 years ago
Cullen Walsh 57d9e9852d Support generating class map for XHP classes 10 years ago
Denis Sokolov 836534067b Avoid ambiguity warning for example directories as well
In particular, PEAR repositories use a classmap and example directories trigger
multiple false positive warnings.
10 years ago
Jordi Boggiano 0902305196 Fix classmap generator warnings and tests 10 years ago
Jordi Boggiano 8974a1ac92 Ignore ambiguous classes in tests/fixtures dirs, fixes #2858 10 years ago
Daniel Karp e3be04c443 Don't show Ambiguous class resolution warning if class when not ambiguous
if a class or interface is defined twice in the same class, this should not produce a warning
10 years ago
Jordi Boggiano 781c97fa9b Refactor to avoid global static state 10 years ago
Jordi Boggiano c3ab09750d Merge remote-tracking branch 'johnikx/ambiguous-reference-warning' 10 years ago
Jan Brecka b94838169d show warning only instead of throwing exception 10 years ago
Jordi Boggiano fc9e1d0cff CS fixes, refs #2823 10 years ago
Jan Brecka a41370b021 fix plural in exception message 10 years ago
Jan Brecka ea7717c8e5 improve exception message 10 years ago
Jan Brecka 13b57112a9 Throw RuntimeException when ambiguous reference was found. 10 years ago
Fred Emmott 7d3274224a Only look for .hh files at runtime if using HHVM
The ClassMap generator will look regardless, but that's not a runtime
cost, so seems desirable (in case composer install/update needs to be
called with php5 for some resaon)
10 years ago
Fred Emmott 734e5e2f2b Add autoload support for .hh files (HHVM)
HHVM is adding support for an alternative extension for files using
HHVM-specific features. Support them in the Class Map and PSR4
autoloaders.

Trivial example: https://github.com/fredemmott/hh_extension_toolset
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 10 years ago
Olivier Laviale 40e484ed38 Fixed an issue that would lead to scattered autoloading files 11 years ago
Dave Hulbert 81aa3a850c Fix some PHP doc blocks 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
Andreas Hennings b08179e399 PSR-4 ClassLoader: Bug fix: PEAR-like path needs ".php" appended. 11 years ago
Andreas Hennings 5dd3c12d3d Further improve comments. 11 years ago
Andreas Hennings 2e80d148f8 PSR-4 loader: Fix comments: PSR-0 related methods should have comments refering to PSR-0 and prefixes. PSR-4 related methods should have comments refering to PSR-4 and namespaces. 11 years ago
Andreas Hennings c49a651d81 PSR-4 class loader: Add getters for PSR-4 prefixes. Rename PSR-0 related attributes by appending *Psr0. Add more comments. 11 years ago
Andreas Hennings 8142126b16 Add PSR-4 class loader. (tests needed) 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
Jordi Boggiano e3a10b31ab Abort quickly if the only match is class= in a file 11 years ago
Jordi Boggiano 3346609c5d Skip best adapter since it can create issues on some platforms, fixes #2168 11 years ago
Jordi Boggiano 7b81d51a38 Merge remote-tracking branch 'digitalkaoz/classmap_generator_finder' 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
Robert Schönthal 860483e97e reverted simplification cause of php < 5.3.6 11 years ago
Robert Schönthal f75dda759d simplified extension check in classmap generation 11 years ago
Robert Schönthal 963f189fb2 bumped finder version, reverted warning suppression 11 years ago
Robert Schönthal 1a4a104df0 use best finder adapter 11 years ago
Robert Schönthal 4af410e1b9 using finder for classmap generator 11 years ago
Jordi Boggiano 8d0b7f278e CS fixes 11 years ago
Pavel Savinov 831bd844bd Almost PHPDoc problems fixed 11 years ago
David Simon 2acb02cda9 Fixed bug parsing multiline strings with 'escaped' newlines 11 years ago
Jordi Boggiano 2e25a9298d Document a hack 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 976fe48a72 Optimize grabbing of first char 11 years ago
Jordi Boggiano 94175ce432 Make performance of the class loader more constant across classes 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
Jordi Boggiano e1eb35455f Merge pull request #1743 from sandermarechal/abs-path
Fix shortest absolute paths from cwd to classmap path
11 years ago
Sander Marechal 132f2a9d5d Cache getcwd() result 11 years ago
Sander Marechal c10e25a945 Use cross-platform absolute path check 11 years ago
Jordi Boggiano bb95a0a788 Fix docblocks 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
Jordi Boggiano 5165008be7 Merge remote-tracking branch 'pierredup/master' 12 years ago
Jordi Boggiano e33aebc75d Fix cs 12 years ago
Jordi Boggiano 1bd01a8b0b Merge remote-tracking branch 'joeholdcroft/autoload-namespace-prepend' 12 years ago
Joe Holdcroft 7d5e4f76fb Bug fix & changing loop + array_unshift to array_merge 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 514a3cde77 CS fixes 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 51eca2cdfc Fix matching of classes in trailing non-php text, fixes #1409 12 years ago
Jordi Boggiano aefe3a0b11 Add support for .inc files in classmap, fixes #1396 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 cd4d569540 Use old-style named subpattern syntax to avoid problems with antiquated PCRE 12 years ago
Jordi Boggiano 5a01ada383 Restrict unicode chars allowed to what php core allows, refs #1361 12 years ago
Jordi Boggiano 2d7c3c9d27 Tweak #1361 to re-enable support for unicode classnames 12 years ago
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
Joe Holdcroft 538cdc914b Making prepend work with fallbacks & coding standards 12 years ago
Joe Holdcroft 6510ee5c4c Refactoring ClassLoader::add() to return early 12 years ago
Joe Holdcroft e74223470a - Adding prefix option to ClassLoader::add()
- Adding set method to ClassLoader for overwriting
12 years ago
Jordi Boggiano de3188ca7d Remove target dir for classmap autoloads of the root package, fixes #1308 12 years ago
Jordi Boggiano 75da832cd3 Fix parsing of large files that go over the PCRE limits 12 years ago
Jordi Boggiano bd72e3765b Restore early return to happen as early as possible 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
Victor Berchet ab48114531 [ClassMapGenerator] Improve error message when the path does not exist
i.e. the composer.json has a typo
12 years ago
Victor Berchet ff5c428d60 [ClassMapGenerator] Refine the findClasses method
The code could not throw
12 years ago
Jordi Boggiano 5a763cf010 Fix scanning of empty namespace{} blocks 12 years ago
Jordi Boggiano 2368185774 Merge branch 'classmap-optim' 12 years ago
Jordi Boggiano 487e66d0a9 Allow loading of multiple composer autoloaders concurrently, fixes #1248 12 years ago
Jordi Boggiano 4c3e7802a4 Fix traits on 5.3 and handling of empty namespace blocks 12 years ago
Jordi Boggiano 8e9678a5ba Optimize classmap generation by avoiding the use of token_get_all()
First of all this seems way faster than iterating over all tokens, but
especially it reduces memory usage drastically for very large files
12 years ago
Jordi Boggiano 348ec26c91 Always return false or a class name, fixes #1231 12 years ago
Jordi Boggiano e79e7dcd8d Merge remote-tracking branch 'hason/classgenerator' 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
hinikato 1989479634 Fixed class normalization for class map case. 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 289d23b5cc Optimization for autoload misses, refs #964 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
Jordi Boggiano defe5766a4 Revert "Merge remote-tracking branch 'till/bugfix-broken-classmap'"
This reverts commit d837b8a657, reversing
changes made to 520d915860.
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 d837b8a657 Merge remote-tracking branch 'till/bugfix-broken-classmap' 12 years ago
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.
12 years ago
till 2823c78856 Allow absolute paths in composer.json and don't prepend them with a funny $baseDir variable. 12 years ago
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
12 years ago
Jordi Boggiano adaa788955 Require file autoloads after the autoloader is registered 12 years ago
Jordi Boggiano b876dcbafb Use the config object to define the vendor dir and not the installation manager 12 years ago
Jordi Boggiano 66e9dcddf4 CS fixes 12 years ago
Jordi Boggiano 383c3f0153 Avoid tokenizing files for nothing 12 years ago
Jordi Boggiano 4bbb168d44 Remove BC code 12 years ago
Jordi Boggiano 67cf46546d Merge pull request #791 from liuggio/patch-1
just added a \ before RuntimeException
12 years ago
Giulio De Donato 5c08b5b215 fixed #790 12 years ago
Giulio De Donato 3a53b06f00 just added a \ before RuntimeException (sorry I didn't run the test) 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. 12 years ago
Jordi Boggiano c440b4594a More PSR-2 goodness 12 years ago
Jordi Boggiano 1bd4ccbd54 php-cs-fixer magic 12 years ago
Jordi Boggiano 5c0c101327 Wrap token_get_all for better debuggability 12 years ago
Adán Lobato 61eb0119f1 Fixed some mistakes at PHPDoc 12 years ago
Jordi Boggiano 1a255420b0 Ignore aliases in autoload generator 12 years ago
Jordi Boggiano 11edea8aee Add deprecation warning to old .composer files 12 years ago
Jordi Boggiano aff7745231 Fix target-dir autoloader 12 years ago
Jordi Boggiano 15ab5868a3 Move composer metafiles back in a composer dir, except autoload.php 12 years ago
Nils Adermann e74e218bdb Merge pull request #602 from Seldaek/target_dir_autoload
Target dir autoloading for root packages, fixes #139
12 years ago
Jordi Boggiano ab0ced493c Make sure BC dir exists 12 years ago
Jordi Boggiano 51711c2f73 Fix multi-prefix handling 12 years ago
Jordi Boggiano 66135538c1 Allow root packages packages with target-dir to be autoloaded, fixes #139 12 years ago
Jordi Boggiano 22fe296ad0 Move .composer files out into the vendor dir, fixes #497 12 years ago
Jordi Boggiano b999d18365 Improve include_paths generation, fixes #596 12 years ago
Jordi Boggiano 83b52b5b7f Avoid blowing up on misconfigured autoload entries 12 years ago
Jordi Boggiano 8f24a04a1d Make sure vendor dir exists before dumping autoloader 12 years ago