345 Commits (f9d2feb9cb567a77b3c8b47ce0af114e07d82041)

Author SHA1 Message Date
Dane Powell 3e6300b5e8
code style fix. 5 years ago
Dane Powell 043b33ed38
Fixes #8065: Sort plugins deterministically before loading. 5 years ago
Den Girnyk 5b78ea529a
Fix: Keep replaced packages for autoload dumping with --no-dev 5 years ago
Markus Staab 766ceccd00 Print number of classes contained within the generated classmap
to give the developer a better feeling about number of dependent classes
6 years ago
Jordi Boggiano a74b63985e Avoid filtering dev-require packages when loading plugins/scripts, fixes #7516 6 years ago
Jordi Boggiano ff59bbdab0 CS fixer 6 years ago
Gabriel Caruso 7d9f8e2247
Improvements
Small improvements, such as remove unused imports, unecessaries casts, parentheses, etc.
6 years ago
Jordi Boggiano eedbd218f5 Make sure circular dependencies do not break the autoload dumper, refs #7316, refs #7348 6 years ago
Philipp Fritsche b0be87177d
Filter dev-dependencies from "dump-autoload --no-dev" , fixes #4343 6 years ago
Nicolas Grekas 0c912d6eee Fix generated static map... 6 years ago
Nicolas Grekas ce70e0e9dd Fix BC of generated static map 6 years ago
Jordi Boggiano 3be9591930 Simplify some ClassLoader code, minor memory improvement, fixes #6937 6 years ago
Vladimir Reznichenko c8615358cb SCA with PHP Inspections (EA Extended) 7 years ago
Jordi Boggiano 17b7387c37 Merge branch '1.4' 7 years ago
Jordi Boggiano 47bc2fa51a Fix exclude-from-classmap being ignored when generating on-the-fly class loader, fixes #6503 7 years ago
Saumini Navaratnam 27b8209990 Fix for issue #6492
Able to include specific finle in phar in "files" option in composer
7 years ago
Li Chuangbo 1f4882a3e6 Revert "Fixed an issue when a phar file is used in "files" option in composer.json"
This reverts commit 41e91f3064.

The commit 41e91f3 in current codebase generates absolute path in
autoload_static.php for phar file.

Also according to http://php.net/manual/en/phar.using.intro.php, the `phar://`
prefix is not needed.
7 years ago
Jordi Boggiano 122e422682 CS fixes 7 years ago
Jordi Boggiano 1dcb2b5758 Merge remote-tracking branch 'nicolas-grekas/apcu' 8 years ago
Jordi Boggiano e9d04f2b2d Merge branch '1.2' 8 years ago
Hans-Joachim Michl 817b2747c7 Fix #5672
This fixes the issue reported in #5672.
It just makes sure the ZendGuard encoded files can be autoloaded correctly.
8 years ago
Nicolas Grekas 6d4e60b991 Add --apcu-autoloader option to enable APCu caching of found/not-found classes 8 years ago
Konstantin.Myakshin dc70b40d34 Use implode instead of join 8 years ago
Kévin Dunglas 3e3fd3c6b1
Remove unused variable 8 years ago
Jordi Boggiano 902a5c32db Add bug ref 8 years ago
AnrDaemon c774d41a9c Fix realpath() failing on Windows 8 years ago
SpacePossum 2ae0800cd3 Remove useless concat. 8 years ago
Nicolas Grekas c6b26c4e96 Make static inlining more selective 8 years ago
Jordi Boggiano c289776d94 Force-collapse multiple slashes into one, fixes #5387 8 years ago
Jordi Boggiano d1a0502f92 Make sure we only replace complete paths to the base-dir/vendor-dir, not partial dir matches, fixes #5289 8 years ago
Jordi Boggiano 4f6693ad70 Fix regression in 0b44662087, fixes #5199 8 years ago
Jordi Boggiano 0b44662087 Disable static autoloader on HHVM, fixes #5192 8 years ago
Nicolas Grekas 40aca80bd9 Workaround https://bugs.php.net/68057 8 years ago
Nicolas Grekas fd2f51cea8 Speedup autoloading on PHP 5.6 & 7.0+ using static arrays 8 years ago
Jordi Boggiano cdea645eab Avoid outputing duplicate warnings for ambiguous class resolution, fixes #4953 8 years ago
Jordi Boggiano bda2c0f9b7 Re-enable include path even when classmap authoritative is present, refs #4556 8 years ago
Jordi Boggiano e05207dbad Merge remote-tracking branch 'bp1222/save-loads' 8 years ago
Jordi Boggiano 8072448cf3 Adjust deduplication of files autoloads, refs 9710b26d3f 9 years ago
Jordi Boggiano 966a982738 CS fixes 9 years ago
Jordi Boggiano 1fe690f810 Autoload generator cleanups 9 years ago
Jordi Boggiano 3748c11709 Simplify files autoload include function, and make sure files are included once per package even if exactly the same, refs #4186 9 years ago
Jordi Boggiano 9710b26d3f Merge remote-tracking branch 'jeskew/feature/require_files_but_once' 9 years ago
Jordi Boggiano c0b49d09f3 Merge remote-tracking branch 'cw-ozaki/no-script-dump-autoload'
Conflicts:
	src/Composer/Autoload/AutoloadGenerator.php
	src/Composer/Command/DumpAutoloadCommand.php
9 years ago
Jordi Boggiano 6f29df01d2 Fix updir regex matching, refs #4607 9 years ago
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
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
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
elazar 6c029a850c Resolves #4138: Removed *Test.php filtering from AutoloadGenerator->dump() 9 years ago
Jordi Boggiano 164dc2a097 Reuse prefix only if no prefix is defined 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
Jordi Boggiano b296e654eb Re-use existing autoloader suffix if available, fixes #3701 9 years ago
Jordi Boggiano 0b4a9235f4 CS fixes 9 years ago
msiebeneicher 3682a9f5a7 * Cleanup code comments 9 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
9 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
9 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 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 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 10 years ago
Olivier Laviale 40e484ed38 Fixed an issue that would lead to scattered autoloading files 10 years ago
Nicolas Grekas 00a6f8e38d dedicated scope isolation function for autoload_real 10 years ago
Jordi Boggiano ed02997a7b Fix mode and add docblock, refs #2644 10 years ago
Jordi Boggiano d26dda5c95 Merge remote-tracking branch 'olvlvl/improved_package_sorting_alone' 10 years ago
Nils Adermann aef0483cc9 Merge pull request #2667 from nicolas-grekas/master
scope isolation for user includes
10 years ago
Nicolas Grekas 6d7b9afc4b scope isolation for user includes 10 years ago
Jérôme Macias 01cd990995 Fix PSR-4 autoload classmap generator 10 years ago
Olivier Laviale 17278999ba Coding style compliance 10 years ago
Olivier Laviale 46776c8e23 Improved package sorting 10 years ago
René Kerner b0ec8ee096 * added exclude-from-classmap feature
* updated to latest master version
10 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
11 years ago
Jordi Boggiano 5a484cb3a9 Make sure target-dir plays well with classmap and files autoload, for root and deps, refs #1550 11 years ago
Jordi Boggiano ab1256e135 Merge remote-tracking branch 'cmodijk/master' 11 years ago
Cliff Odijk 5127fe8359 added type check to autoloader fixes #1504 11 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