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.
2013-05-06 09:37:21 -05:00
Jordi Boggiano
5ba147663d
Use ClassLoader::set to initialize the class loader paths
2013-05-05 10:57:21 +02:00
Jordi Boggiano
dc71ba557b
Consistently use arrays as paths for a given namespace prefix
2013-05-05 10:56:46 +02:00
Jordi Boggiano
5264d0637b
Fix regression added in 33af9eea95
, fixes #1841
2013-04-28 22:50:24 +02:00
Jordi Boggiano
3ce71466f1
Treat empty paths in autoloader as ".", fixes #1727
2013-04-07 11:34:58 +02:00
Martin Hasoň
07d2f17afe
[Autoload] Make all paths relative for file portability
2013-04-05 15:01:51 +02:00
Martin Hasoň
3499610631
Fixed tests for autoloader generator
2013-04-01 09:28:02 +02:00
Martin Hasoň
48444a028c
Added support for vendor dir excluded from working dir
2013-04-01 09:27:50 +02:00
Jordi Boggiano
3cc5698e7b
Allow PHP 5.2 autoloaders to consume namespace, classmap and include path files, fixes #1730
2013-03-27 18:45:33 +01:00
Jordi Boggiano
d929a0813a
Prepend the ClassLoader autoloader to avoid calling other previously registered autoloaders, fixes #1699
2013-03-16 16:14:55 +01:00
Jordi Boggiano
8d55b9cced
Merge remote-tracking branch 'ronnylt/script-event-post-dump-autoload'
...
Conflicts:
tests/Composer/Test/Autoload/AutoloadGeneratorTest.php
2013-02-22 18:42:29 +01:00
Jordi Boggiano
b4c2347b24
Test fixes
2013-02-20 16:50:26 +01:00
Jordi Boggiano
5a484cb3a9
Make sure target-dir plays well with classmap and files autoload, for root and deps, refs #1550
2013-02-19 15:23:43 +01:00
Jordi Boggiano
ab1256e135
Merge remote-tracking branch 'cmodijk/master'
2013-02-19 14:21:31 +01:00
Cliff Odijk
5127fe8359
added type check to autoloader fixes #1504
2013-02-14 00:10:18 +01:00
Pierre du Plessis
255c0be7fc
Added tests for include path flag
2013-02-04 10:12:41 +02:00
Pierre du Plessis
84b34b70e0
Add config option to set if the PHP include path should automatically be used when generating the autoloader
2013-01-14 11:15:06 +02:00
Ronny López
e5cbf83185
Added post-autoload-dump script event.
2013-01-10 15:04:20 +01:00
Jordi Boggiano
c80cb76b9b
Always prepend autoloaders to avoid tools (i.e. phpunit) taking precedence over the project autoloader
2013-01-08 17:34:37 +01:00
Jordi Boggiano
78290945b8
Make sure there is a class to find in the file that must be ignored
2013-01-05 23:40:06 +01:00
Jordi Boggiano
514a3cde77
CS fixes
2013-01-05 20:01:58 +01:00
Jordi Boggiano
1beccf9f0f
Fix access of the static loader property
2012-12-25 16:08:36 +01:00
Martin Hasoň
45d7eb5b53
Fixed generating packageMap in AutoloaderGenerater (fixes generating include_paths.php file)
2012-12-17 11:13:07 +01:00
Martin Hasoň
03e355f063
Fixed topological sorting of packages in AutoloadGenerator
2012-12-14 15:21:40 +01:00
Jordi Boggiano
51eca2cdfc
Fix matching of classes in trailing non-php text, fixes #1409
2012-12-13 17:39:17 +01:00
Jordi Boggiano
aefe3a0b11
Add support for .inc files in classmap, fixes #1396
2012-12-08 21:54:51 +01:00
Jordi Boggiano
c5f3a6febd
Fix optimized autoloader generation for PSR-0 configs that include non-existent dirs, fixes #1286
2012-11-27 14:23:10 +01:00
Jordi Boggiano
de3235a2a4
Add tests to prevent regressions on strings/nowdoc/comment stripping
2012-11-25 14:10:58 +01:00
Jordi Boggiano
5a01ada383
Restrict unicode chars allowed to what php core allows, refs #1361
2012-11-25 14:07:06 +01:00
Jordi Boggiano
2d7c3c9d27
Tweak #1361 to re-enable support for unicode classnames
2012-11-25 13:52:42 +01:00
Igor Wiedler
530991217b
Support classmap generation for classes without space after class name
...
Class names with multi-byte characters are not supported.
Closes #1360 .
2012-11-25 12:08:50 +01:00
Jordi Boggiano
de3188ca7d
Remove target dir for classmap autoloads of the root package, fixes #1308
2012-11-13 17:09:22 +01:00
Jordi Boggiano
75da832cd3
Fix parsing of large files that go over the PCRE limits
2012-11-12 12:33:46 +01:00
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())
2012-11-12 09:15:35 +01:00
Victor Berchet
ab48114531
[ClassMapGenerator] Improve error message when the path does not exist
...
i.e. the composer.json has a typo
2012-11-12 07:33:15 +01:00
Victor Berchet
ff5c428d60
[ClassMapGenerator] Refine the findClasses method
...
The code could not throw
2012-11-12 07:32:47 +01:00
Jordi Boggiano
5a763cf010
Fix scanning of empty namespace{} blocks
2012-11-11 16:29:49 +01:00
Jordi Boggiano
487e66d0a9
Allow loading of multiple composer autoloaders concurrently, fixes #1248
2012-11-10 21:54:23 +01:00
Martin Hasoň
1ff1b8ac1f
Sorted generated classmap
2012-10-17 12:00:45 +02:00
Martin Hasoň
c63f0d9642
Preserved original position of package if required packages are before this
2012-10-17 10:50:53 +02:00
Martin Hasoň
e75abcbb41
Fixed order of packages in the classmap autoloader
2012-10-17 01:40:15 +02:00
Martin Hasoň
b683aeb586
Fix expected values in tests for autoloader generator
2012-10-17 01:00:11 +02:00
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
2012-09-14 11:21:34 +02:00
Filip Procházka
9d8db4e148
AutoloadGenerator: respect dependencies, when requiring files
2012-09-06 15:07:07 +02:00
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
2012-08-24 23:25:14 +02:00
Jordi Boggiano
d6de4a0036
Rename Package interfaces to reduce BC issues
2012-08-24 02:29:31 +02:00
Jordi Boggiano
521bbe6556
CS fixes
2012-08-18 16:22:15 +02:00
Jordi Boggiano
2af2c27168
Add regression test for files autoload in root package, fixes #880
2012-08-18 14:58:55 +02:00
Jordi Boggiano
44d7d4a38e
Make PSR0 scanning optional
2012-08-14 20:28:49 +02:00
Jordi Boggiano
48c46ce3b6
Automatically generate classmaps for all PSR-0 packages to speed things up, fixes #541 , fixes #127
2012-08-14 19:55:30 +02:00