Nicolas Grekas
0c912d6eee
Fix generated static map...
7 years ago
Nicolas Grekas
ce70e0e9dd
Fix BC of generated static map
7 years ago
Jordi Boggiano
3be9591930
Simplify some ClassLoader code, minor memory improvement, fixes #6937
7 years ago
Pedro de Carvalho
f569833f5a
move $length variable outsite foreach ( #6828 )
...
the `foreach` over the `prefixDirsPsr4[$search]` won't affect `$length`.
It's used for the offset of `$logicalPathPsr4`.
7 years ago
Vladimir Reznichenko
c8615358cb
SCA with PHP Inspections (EA Extended)
7 years ago
Jordi Boggiano
23ab57c311
Merge branch '1.4'
7 years ago
Jordi Boggiano
bf940fb21b
Fix exclude-from-classmap when a package is installed as a symlink, fixes #6397
7 years ago
Jordi Boggiano
17b7387c37
Merge branch '1.4'
7 years ago
Jordi Boggiano
81f65b7a2a
Fix exclude-from-classmap being ignored when cwd has the wrong case on case insensitive filesystems
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
David WATTIER
e6d648f465
Improve performance on psr4 autoload file finding
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
Fabien Potencier
2853e82400
removed obsolete code
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
Nicolas Grekas
dd67b01ac5
Add ClassLoader::$missingClasses to not trigger a COW
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
05fab170a7
Merge branch '1.0'
8 years ago
Jordi Boggiano
f0d67923a5
Fix classmap generator over anonymous classes extending/implementing something, fixes #5239
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
b9ce06f46b
Minor tweaks, refs #5162
8 years ago
Niels Keurentjes
eb77c0b7f5
phpDoc cleanup, removed unused imports, variables and parameters.
8 years ago
Jordi Boggiano
5822b58c1f
Avoid using realpath when generating classmap, speeds up generation and keeps paths local to project in case of symlinks/path repo
8 years ago
Niels Keurentjes
b059cbe37c
Removed unused variables and includes, fixed functions being called with more arguments than declared.
8 years ago
Jordi Boggiano
cdea645eab
Avoid outputing duplicate warnings for ambiguous class resolution, fixes #4953
8 years ago
Niels Keurentjes
0b55a0ca91
Can't use error_clear_last as it was introduced in PHP7.
9 years ago
Niels Keurentjes
6a53b1df42
Further reorganized messy checking code.
9 years ago
Niels Keurentjes
bb08f76ad9
Use error_get_last to verify why php_strip_whitespace would return an empty string.
9 years ago
Niels Keurentjes
86fc85fe56
Add a comment explaining the use of @ instead of Silencer in this specific situation.
9 years ago
Niels Keurentjes
c2d9960898
Ensure exception is thrown when classmaps are requested for corrupted or binary files. Refs #4885
9 years ago
Niels Keurentjes
18cd4f966b
Added silencer utility to more gracefully handle error suppression without hiding errors or worse. Fixes #4203 , #4683
9 years ago
Jordi Boggiano
bda2c0f9b7
Re-enable include path even when classmap authoritative is present, refs #4556
9 years ago
Jordi Boggiano
e05207dbad
Merge remote-tracking branch 'bp1222/save-loads'
9 years ago
Markus Staab
5752559ae8
fixed typo
9 years ago
Jordi Boggiano
43f7b762e5
Revert "[ClassLoader] performance improvement: use str_replace instead of strtr"
9 years ago
Tobias Schultze
a76ce9b25a
[ClassLoader] no need to call str_replace on Windows
9 years ago
Tobias Schultze
314741c1ec
[ClassLoader] use str_replace instead of strtr
9 years ago
Jordi Boggiano
c5e5bc6fc6
Merge pull request #4589 from dunglas/patch-1
...
Update the autoloader PHPDoc: PSR-4 instead of PSR-0
9 years ago
Kévin Dunglas
6c5c53c362
Update the PHPDoc: The autoloader supports PSR-0, PSR-4 and classmap.
9 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
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