Permalink
Browse files

Merge remote-tracking branch 'upstream/master' into feature-dist

Conflicts:
	composer.lock
  • Loading branch information...
till committed Aug 18, 2012
2 parents a27471c + 5e0b39e commit 781d6813b39db1d107ecc1b3bdc42e45234b53b7
Showing with 1,045 additions and 299 deletions.
  1. +18 −0 CHANGELOG.md
  2. +4 −5 composer.json
  3. +7 −5 composer.lock
  4. +27 −0 doc/02-libraries.md
  5. +31 −0 doc/03-cli.md
  6. +4 −4 doc/04-schema.md
  7. +2 −1 doc/05-repositories.md
  8. +105 −53 src/Composer/Autoload/AutoloadGenerator.php
  9. +2 −0 src/Composer/Autoload/ClassLoader.php
  10. +7 −2 src/Composer/Autoload/ClassMapGenerator.php
  11. +21 −7 src/Composer/Command/CreateProjectCommand.php
  12. +1 −1 src/Composer/Command/DependsCommand.php
  13. +55 −0 src/Composer/Command/DumpAutoloadCommand.php
  14. +34 −7 src/Composer/Command/InitCommand.php
  15. +6 −0 src/Composer/Command/InstallCommand.php
  16. +92 −0 src/Composer/Command/StatusCommand.php
  17. +6 −0 src/Composer/Command/UpdateCommand.php
  18. +2 −0 src/Composer/Console/Application.php
  19. +2 −2 src/Composer/DependencyResolver/DefaultPolicy.php
  20. +1 −1 src/Composer/DependencyResolver/Solver.php
  21. +2 −2 src/Composer/Downloader/DownloadManager.php
  22. +3 −2 src/Composer/Downloader/FileDownloader.php
  23. +27 −15 src/Composer/Downloader/GitDownloader.php
  24. +16 −3 src/Composer/Downloader/HgDownloader.php
  25. +5 −1 src/Composer/Downloader/PearPackageExtractor.php
  26. +17 −4 src/Composer/Downloader/SvnDownloader.php
  27. +66 −5 src/Composer/Downloader/VcsDownloader.php
  28. +4 −1 src/Composer/Downloader/ZipDownloader.php
  29. +15 −2 src/Composer/Installer.php
  30. +18 −0 src/Composer/Installer/InstallationManager.php
  31. +2 −2 src/Composer/Installer/LibraryInstaller.php
  32. +46 −8 src/Composer/Installer/PearInstaller.php
  33. +1 −1 src/Composer/Json/JsonFile.php
  34. +1 −1 src/Composer/Package/Loader/JsonLoader.php
  35. +1 −1 src/Composer/Package/Loader/LoaderInterface.php
  36. +1 −0 src/Composer/Repository/ComposerRepository.php
  37. +4 −0 src/Composer/Repository/Vcs/GitDriver.php
  38. +4 −0 src/Composer/Repository/VcsRepository.php
  39. +1 −1 src/Composer/Util/Filesystem.php
  40. +10 −2 src/Composer/Util/RemoteFilesystem.php
  41. +101 −45 tests/Composer/Test/Autoload/AutoloadGeneratorTest.php
  42. +1 −0 tests/Composer/Test/Autoload/Fixtures/autoload_classmap3.php
  43. +1 −30 tests/Composer/Test/Autoload/Fixtures/autoload_functions.php
  44. +1 −1 tests/Composer/Test/Autoload/Fixtures/autoload_main.php
  45. +1 −1 tests/Composer/Test/Autoload/Fixtures/autoload_main2.php
  46. +1 −1 tests/Composer/Test/Autoload/Fixtures/autoload_main3.php
  47. +0 −12 tests/Composer/Test/Autoload/Fixtures/autoload_override_vendors.php
  48. +33 −0 tests/Composer/Test/Autoload/Fixtures/autoload_real_functions.php
  49. +49 −0 tests/Composer/Test/Autoload/Fixtures/autoload_real_target_dir.php
  50. +1 −47 tests/Composer/Test/Autoload/Fixtures/autoload_target_dir.php
  51. +1 −1 tests/Composer/Test/Autoload/Fixtures/autoload_vendors.php
  52. +8 −8 tests/Composer/Test/Autoload/Fixtures/php5.4/traits.php
  53. +12 −0 tests/Composer/Test/Fixtures/functional/create-project-command.test
  54. +4 −0 tests/Composer/Test/Fixtures/functional/create-project-shows-full-hash-for-dev-packages.test
  55. +3 −1 tests/Composer/Test/Fixtures/installer/SAMPLE
  56. +1 −1 tests/Composer/Test/Fixtures/installer/update-all.test
  57. +146 −0 tests/Composer/Test/FunctionalTest.php
  58. +9 −9 tests/Composer/Test/Installer/LibraryInstallerTest.php
  59. +1 −1 tests/Composer/Test/InstallerTest.php
  60. +0 −1 tests/Composer/Test/Json/JsonFileTest.php
  61. +0 −1 tests/Composer/Test/Mock/FactoryMock.php
View
@@ -1,3 +1,21 @@
+* 1.0.0-alpha5 (2012-08-18)
+
+ * Added `dump-autoload` command to only regenerate the autoloader
+ * Added --optimize to `dump-autoload` to generate a more performant classmap-based autoloader for production
+ * Added `status` command to show if any source-installed dependency has local changes, use --verbose to see changed files
+ * Added --verbose flag to `install` and `update` that shows the new commits when updating source-installed dependencies
+ * Added --no-update flag to `require` to only modify the composer.json file but skip the update
+ * Added --no-custom-installers and --no-scripts to `install`, `update` and `create-project` to prevent all automatic code execution
+ * Added support for installing archives that contain only a single file
+ * Fixed APC related issues in the autoload script on high load websites
+ * Fixed installation of branches containing capital letters
+ * Fixed installation of custom dev versions/branches
+ * Improved the coverage of the `validate` command
+ * Improved PEAR scripts/binaries support
+ * Improved and fixed the output of various commands
+ * Improved error reporting on network failures and some other edge cases
+ * Various minor bug fixes and docs improvements
+
* 1.0.0-alpha4 (2012-07-04)
* Break: The default `minimum-stability` is now `stable`, [read more](https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion)
View
@@ -25,9 +25,9 @@
"php": ">=5.3.2",
"justinrainbow/json-schema": "1.1.*",
"seld/jsonlint": "1.*",
- "symfony/console": "2.1.*",
- "symfony/finder": "2.1.*",
- "symfony/process": "2.1.*@dev"
+ "symfony/console": "2.1.*@RC",
+ "symfony/finder": "2.1.*@RC",
+ "symfony/process": "2.1.*@RC"
},
"suggest": {
"ext-zip": "Enabling the zip extension allows you to unzip archives, and allows gzip compression of all internet traffic",
@@ -41,6 +41,5 @@
"branch-alias": {
"dev-master": "1.0-dev"
}
- },
- "minimum-stability": "beta"
+ }
}
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -94,6 +94,33 @@ on it. It only has an effect on the main project.
If you do not want to commit the lock file and you are using git, add it to
the `.gitignore`.
+## Light-weight distribution packages
+
+Including the tests and other useless information like .travis.yml in
+distributed packages is not a good idea.
+
+The `.gitattributes` file is a git specific file like `.gitignore` also living
+at the root directory of your library. It overrides local and global
+configuration (`.git/config` and `~/.gitconfig` respectively) when present and
+tracked by git.
+
+Use `.gitattributes` to prevent unwanted files from bloating the zip
+distribution packages.
+
+ // .gitattributes
+ Tests/ export-ignore
+ phpunit.xml.dist export-ignore
+ Resources/doc/ export-ignore
+ .travis.yml export-ignore
+
+Test it by inspecting the zip file generated manually:
+
+ git archive branchName --format zip -o file.zip
+
+> **Note:** files would be still tracked by git just not included in the
+> distribution. This will only work for GitHub packages installed from
+> dist (i.e. tagged releases) for now.
+
## Publishing to a VCS
Once you have a vcs repository (version control system, e.g. git) containing a
View
@@ -211,6 +211,25 @@ By default the command checks for the packages on packagist.org.
from version control.
* **--dev:** Install packages listed in `require-dev`.
+## dump-autoload
+
+If you need to update the autoloader because of new classes in a classmap
+package for example, you can use "dump-autoload" to do that without having to
+go through an install or update.
+
+Additionally, it can dump an optimized autoloader that converts PSR-0 packages
+into classmap ones for performance reasons. In large applications with many
+classes, the autoloader can take up a substantial portion of every request's
+time. Using classmaps for everything is less convenient in development, but
+using this option you can still use PSR-0 for convenience and classmaps for
+performance.
+
+### Options
+
+* **--optimize:** Convert PSR-0 autoloading to classmap to get a faster
+ autoloader. This is recommended especially for production, but can take
+ a bit of time to run so it is currently not done by default.
+
## help
To get more information about a certain command, just use `help`.
@@ -269,6 +288,18 @@ By default it points to `/home/<user>/.composer` on *nix,
`/Users/<user>/.composer` on OSX and
`C:\Users\<user>\AppData\Roaming\Composer` on Windows.
+#### COMPOSER_HOME/config.json
+
+You may put a `config.json` file into the location which `COMPOSER_HOME` points
+to. Composer will merge this configuration with your project's `composer.json`
+when you run the `install` and `update` commands.
+
+This file allows you to set [configuration](04-schema.md#config) and
+[repositories](05-repositories.md) for the user's projects.
+
+In case global configuration matches _local_ configuration, the _local_
+configuration in the project's `composer.json` always wins.
+
### COMPOSER_PROCESS_TIMEOUT
This env var controls the time composer waits for commands (such as git
View
@@ -140,8 +140,8 @@ The recommended notation for the most common licenses is (alphabetical):
GPL-2.0+
GPL-3.0
GPL-3.0+
- LGPL-2.0
- LGPL-2.0+
+ LGPL-2.1
+ LGPL-2.1+
LGPL-3.0
LGPL-3.0+
MIT
@@ -163,15 +163,15 @@ An Example for disjunctive licenses:
{
"license": [
- "LGPL-2.0",
+ "LGPL-2.1",
"GPL-3.0+"
]
}
Alternatively they can be separated with "or" and enclosed in parenthesis;
{
- "license": "(LGPL-2.0 or GPL-3.0+)"
+ "license": "(LGPL-2.1 or GPL-3.0+)"
}
Similarly when multiple licenses need to be applied ("conjunctive license"),
View
@@ -161,7 +161,8 @@ project to use the patched version. If the library is on GitHub (this is the
case most of the time), you can simply fork it there and push your changes to
your fork. After that you update the project's `composer.json`. All you have
to do is add your fork as a repository and update the version constraint to
-point to your custom branch.
+point to your custom branch. For version constraint naming conventions see
+[Libraries](02-libraries.md) for more information.
Example assuming you patched monolog to fix a bug in the `bugfix` branch:
Oops, something went wrong.

0 comments on commit 781d681

Please sign in to comment.