Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ceffa85

Browse filesBrowse files
committed
minor symfony#29 Enhance README (nicolas-grekas)
This PR was merged into the 1.1-dev branch. Discussion ---------- Enhance README Commits ------- a7ff25a Enhance README
2 parents b913001 + a7ff25a commit ceffa85
Copy full SHA for ceffa85

2 files changed

+30Lines changed: 30 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+22Lines changed: 22 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,28 @@ To write portable code between PHP5 and PHP7, some care must be taken:
4040
- after calling `error_clear_last()`, the result of `$e = error_get_last()` must be
4141
verified using `isset($e['message'][0])` instead of `null === $e`.
4242

43+
Usage
44+
=====
45+
46+
When using [Composer](https://getcomposer.org/) to manage your dependencies, you
47+
should **not** `require` the `symfony/polyfill` package, but the standalone ones:
48+
- `symfony/polyfill-apcu` for using the `apcu_*` functions,
49+
- `symfony/polyfill-php54` for using the PHP 5.4 functions,
50+
- `symfony/polyfill-php55` for using the PHP 5.5 functions,
51+
- `symfony/polyfill-php56` for using the PHP 5.6 functions,
52+
- `symfony/polyfill-php70` for using the PHP 7.0 functions,
53+
- `symfony/polyfill-iconv` for using the iconv functions,
54+
- `symfony/polyfill-intl-grapheme` for using the `grapheme_*` functions,
55+
- `symfony/polyfill-intl-icu` for using the intl functions and classes,
56+
- `symfony/polyfill-intl-normalizer` for using the intl normalizer,
57+
- `symfony/polyfill-mbstring` for using the mbstring functions,
58+
- `symfony/polyfill-util` for using the polyfill utility helpers,
59+
- `symfony/polyfill-xml` for using the `utf8_encode/decode` functions.
60+
61+
Requiring `symfony/polyfill` directly would prevent Composer from sharing
62+
correctly polyfills in dependency graphs. As such, it would likely install
63+
more code than required.
64+
4365
Design
4466
======
4567

Collapse file

‎src/Php70/README.md‎

Copy file name to clipboardExpand all lines: src/Php70/README.md
+8Lines changed: 8 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ This component provides functions unavailable in releases prior to PHP 7.0:
1212
More information can be found in the
1313
[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
1414

15+
Compatibility notes
16+
===================
17+
18+
To write portable code between PHP5 and PHP7, some care must be taken:
19+
- `\*Error` exceptions must by caught before `\Exception`;
20+
- after calling `error_clear_last()`, the result of `$e = error_get_last()` must be
21+
verified using `isset($e['message'][0])` instead of `null === $e`.
22+
1523
License
1624
=======
1725

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.