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
Jordi Boggiano
78ae0a97f7
Terminate quoted strings
6 years ago
Jordi Boggiano
3b9d6769bf
Fix class names in comments being parsed in short_open_tags files, fixes #7289
6 years ago
Jordi Boggiano
066351c5b9
Remove use of deprecated getMock method
7 years ago
Petr /Peggy/ Sládek
8d06832077
Update ClassMapGenerator to work better with symlinks, fixes #7252 , closes #7251
7 years ago
Gabriel Caruso
885da4c8ef
Refactoring tests
7 years ago
Gabriel Caruso
afc9a7643e
Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase
7 years ago
Gabriel Caruso
a4b220273e
Refactoring Tests ( #6849 )
7 years ago
Vladimir Reznichenko
c8615358cb
SCA with PHP Inspections (EA Extended)
7 years ago
Jordi Boggiano
122e422682
CS fixes
8 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
Jordi Boggiano
c540dace8c
Merge pull request #5765 from fabpot/remove-obsolete-code
...
removed obsolete code
8 years ago
Fabien Potencier
2853e82400
removed obsolete code
8 years ago
Rob Bast
4213fbc8c6
does not apply for hhvm
8 years ago
Rob Bast
181b172e77
test cases for #5701
8 years ago
Jordi Boggiano
68861c48ed
Merge branch '1.2'
8 years ago
SpacePossum
2ae0800cd3
Remove useless concat.
8 years ago
Jordi Boggiano
f0f932fca4
Fix classmap test on windows
8 years ago
Vyacheslav Pavlov
108560b9c4
Clean up temp files after a test.
8 years ago
Vyacheslav Pavlov
03995d6caa
Added test for 'dump' method of ClassMapGenerator class
8 years ago
Jordi Boggiano
05fab170a7
Merge branch '1.0'
9 years ago
Jordi Boggiano
f0d67923a5
Fix classmap generator over anonymous classes extending/implementing something, fixes #5239
9 years ago
Jordi Boggiano
4f6693ad70
Fix regression in 0b44662087
, fixes #5199
9 years ago
Jordi Boggiano
0b44662087
Disable static autoloader on HHVM, fixes #5192
9 years ago
Jordi Boggiano
1dc65a40d3
Fix tests, refs #5174
9 years ago
Nicolas Grekas
fd2f51cea8
Speedup autoloading on PHP 5.6 & 7.0+ using static arrays
9 years ago
Niels Keurentjes
0b55a0ca91
Can't use error_clear_last as it was introduced in PHP7.
9 years ago
Rob Bast
adf3b956d0
try to use unique test directories
...
any tests that use the filesystem should have their own unique directory, as we run our test suite in parallel and
cleanup of tests (removing directories) should not interfere with currently running tests
9 years ago
Alexander Loutsenko
fa5de786ff
clean garbage dirs in tmp after composer tests #4694
9 years ago
Jordi Boggiano
8072448cf3
Adjust deduplication of files autoloads, refs 9710b26d3f
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
Omer Karadagli
4046ae042d
Up-level relative paths in exclude-from-classmap
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
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
85de450fe9
Removed some extra assertions.
9 years ago
voroks
4fa1cb2e9c
Removing file autoload_files.php was added ( #4254 )
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
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
b2173d28fc
Fix 5.3.3 build
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
Jordi Boggiano
27aac31970
Fix tests for autocrlf=true checkouts, fixes #4049
9 years ago
Possum
29ca21f30e
PHP version checks tweaking
10 years ago
Marc Bennewitz
9455c49053
fixes #3974 : Autoloader have to distinguish between files and directories
10 years ago
Andrew Berry
5b7c5cf41e
Fix missing semicolons.
10 years ago
Andrew Berry
59e14ff098
Fix test classes with invalid PHP.
10 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
...
10 years ago
Fred Emmott
23d5e30fbc
Add test for Generics class
...
Already worked, just adding a test.
10 years ago
Fred Emmott
cb1ea889d6
Use HHVM_VERSION instead of HPHP_VERSION
10 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.
10 years ago
Rob Bast
cb336a5416
Implement writeError throughout Composer
10 years ago
Jordi Boggiano
0b4a9235f4
CS fixes
10 years ago
msiebeneicher
98de300878
* Small improvement of the testExcludeFromClassmap unit test
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
0f2558dab3
Use assertContains in ClassMapAuthoritative checks
...
Use assertContains instead of assertRegExp when checking for
ClassMapAuthoritative settings.
10 years ago
Bryan Davis
92455759fc
Fix AutoloadGeneratorTest for PHP 5.3.x
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
Michael Gusev
a531594a4a
Issue #3422
...
https://github.com/composer/composer/issues/3422
10 years ago
Jordi Boggiano
94926218e8
CS fixes
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.
11 years ago
Fabien Potencier
12421dd6b7
fixed class map generator when using a heredoc with spaces
11 years ago
Jordi Boggiano
49d4054e51
Handle files with no php at all, fixes #2910
11 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.
11 years ago
Denis Sokolov
65b9cca7b5
Fix ClassMapGenerator unambiguousReference test coverage
...
Without this fix the test only covers having files in "test", the "fixture"
portion it is not covered at all, because all fixtures in phpunit tests
are already in "test" directory
11 years ago
Jordi Boggiano
0902305196
Fix classmap generator warnings and tests
11 years ago
Jordi Boggiano
8974a1ac92
Ignore ambiguous classes in tests/fixtures dirs, fixes #2858
11 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
11 years ago
Jordi Boggiano
7daf876d70
Fix test because the order of filesystem iteration is non deterministic
11 years ago
Jordi Boggiano
781c97fa9b
Refactor to avoid global static state
11 years ago
Jan Brecka
b94838169d
show warning only instead of throwing exception
11 years ago
Jan Brecka
de09c5e371
remove duplicity
11 years ago
Jan Brecka
5763685e69
use statement
11 years ago
Jan Brecka
ea7717c8e5
improve exception message
11 years ago
Jan Brecka
13b57112a9
Throw RuntimeException when ambiguous reference was found.
11 years ago
Jordi Boggiano
790a25c348
Adjust dump command, add another test, update docs, refs #1344
11 years ago
Jordi Boggiano
023ff131aa
Merge remote-tracking branch 'bamarni/autoload-dev'
11 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
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
Jordi Boggiano
75cd91657a
Merge remote-tracking branch 'jeromemacias/fix_psr4_classmap_generator'
11 years ago
Andreas Hennings
fcf8e7f515
Random docblock improvements in AutoloadGeneratorTest.
11 years ago
Andreas Hennings
6a9fd1dd60
rename \$package to \$mainPackage in AutoloadGeneratorTest::testOverrideVendorsAutoloading() for clarity.
11 years ago
Andreas Hennings
bb26152de2
docblock comments on properties in AutoloadGeneratorTest
11 years ago
Andreas Hennings
cab6943df0
AutoloadGeneratorTest::testOverrideVendorsAutoloading() - break autoload definitions to multiple lines.
11 years ago
Andreas Hennings
084c11ef51
AutoloadGeneratorTest::testMainPackageAutoloadingWithTargetDir() - Remove PSR-4 from the package in target-dir test, since it is incompatible with target-dir.
11 years ago
Jérôme Macias
01cd990995
Fix PSR-4 autoload classmap generator
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
Andreas Hennings
0a4b18ce86
More interesting generator tests for PSR-4.
11 years ago
Andreas Hennings
bda2bcac13
Fix indentation of assignment in AutoloadGeneratorTest
11 years ago
Andreas Hennings
8966376f40
Verify generation of autoload_psr4.php even if empty.
11 years ago
Andreas Hennings
bbf6278905
AutoloadGenerator to support PSR-4. Tests included.
11 years ago
Andreas Hennings
2c98813431
Add unit tests for ClassLoader, covering PSR-0 and PSR-4.
11 years ago
Jordi Boggiano
11a0d16ccc
CS fixes
11 years ago
Martin Hasoň
3c0a620ad5
Fixed path analysis
11 years ago
Jordi Boggiano
38917c2047
Add parallel build to travis script
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
Alan Hollis
1892f57e47
Fix file layout in unit tests
...
Changes made in previious commit made the output of the file change,
which in turn broke the unit tests. This commit updates the fixtures to
match the new output.
11 years ago
Nils Adermann
3960edd64e
Turn EventDispatcher into generic solution handling plugins as well
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
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
David Simon
2665c60b2f
Test for bug parsing multiline strings with 'escaped' newlines
12 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.
12 years ago
Jordi Boggiano
5ba147663d
Use ClassLoader::set to initialize the class loader paths
12 years ago
Jordi Boggiano
dc71ba557b
Consistently use arrays as paths for a given namespace prefix
12 years ago
Jordi Boggiano
5264d0637b
Fix regression added in 33af9eea95
, fixes #1841
12 years ago
Jordi Boggiano
3ce71466f1
Treat empty paths in autoloader as ".", fixes #1727
12 years ago
Martin Hasoň
07d2f17afe
[Autoload] Make all paths relative for file portability
12 years ago
Martin Hasoň
3499610631
Fixed tests for autoloader generator
12 years ago
Martin Hasoň
48444a028c
Added support for vendor dir excluded from working dir
12 years ago
Jordi Boggiano
3cc5698e7b
Allow PHP 5.2 autoloaders to consume namespace, classmap and include path files, fixes #1730
12 years ago
Jordi Boggiano
d929a0813a
Prepend the ClassLoader autoloader to avoid calling other previously registered autoloaders, fixes #1699
12 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
b4c2347b24
Test fixes
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
Pierre du Plessis
255c0be7fc
Added tests for include path flag
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
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
78290945b8
Make sure there is a class to find in the file that must be ignored
12 years ago
Jordi Boggiano
514a3cde77
CS fixes
12 years ago
Jordi Boggiano
1beccf9f0f
Fix access of the static loader property
12 years ago