Commit Graph

463 Commits

Author SHA1 Message Date
Nicolas Grekas
fcb330905d fix merge 2019-07-18 12:43:22 +02:00
Nicolas Grekas
ed0b361d6f Merge branch '4.3' into 4.4
* 4.3: (25 commits)
  fix merge
  [HttpClient] fix debug output added to stderr at shutdown
  fix cs
  Use mocks before replacing the error handler
  [Config] Do not use absolute path when computing the vendor freshness
  Bump minimum version of symfony/phpunit-bridge
  Container*::getServiceIds() should return an array of string
  [Config][ReflectionClassResource] Use ternary instead of null coaelscing operator
  [Validator] Add missing Russian and Ukrainian translations
  [Translation] Use HTTPS and fix a url
  [Config] Fix for signatures of typed properties
  [Validator] Add missing Hungarian translations
  [Validator] Add Lithuanian translation for Range validator
  Add HTTPS to a URL
  sync translation files
  PHPDoc fixes
  Add notInRange translation
  Add danish translation for Range validator
  Add german translation for Range validator
  Update validators.es.xlf
  ...
2019-07-18 12:38:27 +02:00
Nicolas Grekas
61ce400807 Merge branch '4.2' into 4.3
* 4.2: (23 commits)
  fix cs
  Use mocks before replacing the error handler
  [Config] Do not use absolute path when computing the vendor freshness
  Bump minimum version of symfony/phpunit-bridge
  Container*::getServiceIds() should return an array of string
  [Config][ReflectionClassResource] Use ternary instead of null coaelscing operator
  [Validator] Add missing Russian and Ukrainian translations
  [Translation] Use HTTPS and fix a url
  [Config] Fix for signatures of typed properties
  [Validator] Add missing Hungarian translations
  [Validator] Add Lithuanian translation for Range validator
  Add HTTPS to a URL
  sync translation files
  PHPDoc fixes
  Add notInRange translation
  Add danish translation for Range validator
  Add german translation for Range validator
  Update validators.es.xlf
  [Validator] Add missing en and fr translation ids from 4.4
  [Debug][DebugClassLoader] Don't check class if the included file don't exist
  ...
2019-07-18 12:34:59 +02:00
Nicolas Grekas
dc11777afa Merge branch '3.4' into 4.2
* 3.4: (23 commits)
  fix cs
  Use mocks before replacing the error handler
  [Config] Do not use absolute path when computing the vendor freshness
  Bump minimum version of symfony/phpunit-bridge
  Container*::getServiceIds() should return an array of string
  [Config][ReflectionClassResource] Use ternary instead of null coaelscing operator
  [Validator] Add missing Russian and Ukrainian translations
  [Translation] Use HTTPS and fix a url
  [Config] Fix for signatures of typed properties
  [Validator] Add missing Hungarian translations
  [Validator] Add Lithuanian translation for Range validator
  Add HTTPS to a URL
  sync translation files
  PHPDoc fixes
  Add notInRange translation
  Add danish translation for Range validator
  Add german translation for Range validator
  Update validators.es.xlf
  [Validator] Add missing en and fr translation ids from 4.4
  [Debug][DebugClassLoader] Don't check class if the included file don't exist
  ...
2019-07-18 12:29:22 +02:00
Thomas Calvet
04e0f3c575 Bump minimum version of symfony/phpunit-bridge 2019-07-17 12:41:35 +02:00
Nicolas Grekas
ea92f38c52 Fix root composer.json 2019-07-11 10:52:50 +02:00
Fabien Potencier
b6eac3f861 renamed the ErrorHandler component to ErrorCatcher 2019-06-27 19:38:50 +02:00
Fabien Potencier
4d8c473fd3 Merge branch '4.3' into 4.4
* 4.3:
  [Mailer] fixed tests on Windows
  [PhpUnitBridge] fix tests
  [Mailer] fixed error message when connecting to a stream raises an error before connect()
  [Mailer] fixed timeout type hint
  improve error messages in the event dispatcher
  [Security/Core] work around sodium_compat issue
  bumped Symfony version to 4.3.3
  updated VERSION for 4.3.2
  updated CHANGELOG for 4.3.2
  bumped Symfony version to 4.2.11
  updated VERSION for 4.2.10
  updated CHANGELOG for 4.2.10
  bumped Symfony version to 3.4.30
  updated VERSION for 3.4.29
  update CONTRIBUTORS for 3.4.29
  updated CHANGELOG for 3.4.29
  Fixed type annotation.
2019-06-27 18:48:03 +02:00
Nicolas Grekas
9b69dc651a [PhpUnitBridge] fix tests 2019-06-27 18:09:32 +02:00
Nicolas Grekas
80e28a0acd Merge branch '4.3' into 4.4
* 4.3:
  Reject phpunit-bridge v5 for now
  Revert "Revert "bug #31730 [PhpUnitBridge] More accurate grouping (greg0ire)""
2019-06-26 14:22:07 +02:00
Nicolas Grekas
e24e948a42 Reject phpunit-bridge v5 for now 2019-06-26 14:21:28 +02:00
Nicolas Grekas
5f60bc9536 Merge branch '4.3' into 4.4
* 4.3:
  Bump phpunit-bridge
2019-06-26 12:04:36 +02:00
Nicolas Grekas
ac3ae812d3 Merge branch '4.2' into 4.3
* 4.2:
  Bump phpunit-bridge
2019-06-26 12:04:29 +02:00
Nicolas Grekas
37118bdcd6 Merge branch '3.4' into 4.2
* 3.4:
  Bump phpunit-bridge
2019-06-26 12:03:39 +02:00
Nicolas Grekas
85ac1a6dd5 Bump phpunit-bridge 2019-06-26 12:03:25 +02:00
Nicolas Grekas
28674b1e30 [HttpClient] add HttplugClient for compat with libs that need httplug v1 or v2 2019-06-11 17:49:07 +02:00
Fabien Potencier
6dd72dedaa Merge branch '4.3' into 4.4
* 4.3:
  Fix wrong requirements for ocramius/proxy-manager in root composer.json
  Change IntlTimeZone to DateTimeZone
2019-06-06 15:01:21 +02:00
Fabien Potencier
495f6a3b0b Merge branch '4.2' into 4.3
* 4.2:
  Fix wrong requirements for ocramius/proxy-manager in root composer.json
  Change IntlTimeZone to DateTimeZone
2019-06-06 15:00:51 +02:00
Henrik Volmer
ee98786365 Fix wrong requirements for ocramius/proxy-manager in root composer.json 2019-06-06 14:58:37 +02:00
Nicolas Grekas
d3055814ad Merge branch '4.3' into 4.4
* 4.3:
  [Cache] Fixed undefined variable in ArrayTrait
  [HttpClient] revert bad logic around JSON_THROW_ON_ERROR
  [HttpKernel] Fix handling non-catchable fatal errors
  Fix json-encoding when JSON_THROW_ON_ERROR is used
  [HttpFoundation] work around PHP 7.3 bug related to json_encode()
  [HttpClient] add $response->cancel()
  [Security] added support for updated \"distinguished name\" format in x509 authentication
2019-06-05 15:27:25 +02:00
Nicolas Grekas
c402418723 [HttpClient] add $response->cancel() 2019-06-04 13:36:30 +02:00
Nicolas Grekas
2c9a1960a1 Merge branch '4.3'
* 4.3:
  fix deps
  bumped Symfony version to 3.4.29
  updated VERSION for 3.4.28
  update CONTRIBUTORS for 3.4.28
  updated CHANGELOG for 3.4.28
  fix tests
2019-05-28 11:50:43 +02:00
Nicolas Grekas
08d9d43a0b Merge branch '4.2' into 4.3
* 4.2:
  fix deps
  bumped Symfony version to 3.4.29
  updated VERSION for 3.4.28
  update CONTRIBUTORS for 3.4.28
  updated CHANGELOG for 3.4.28
2019-05-28 11:50:37 +02:00
Nicolas Grekas
5bc84778f9 fix deps 2019-05-28 11:47:34 +02:00
Grégoire Pineau
519ba3cddb Merge remote-tracking branch 'origin/4.3'
* origin/4.3:
  deprecate calling createChildContext without the format parameter
  [EventDispatcher] Fix interface name used in error messages
  [FrameworkBundle] Add cache configuration for PropertyInfo
  Update dependencies in the main component
  Drop useless executable bit
  [Doctrine][PropertyInfo] Detect if the ID is writeable
  Add transport in subscriber's phpdoc
  [Validator] Autovalidation: skip readonly props
  [DI] default to service id - *not* FQCN - when building tagged locators
  [Cache] Log a more readable error message when saving into cache fails
  Update WorkflowEvents.php
  [Messenger] On failure retry, make message appear received from original sender
  [Messenger] remove send_and_handle option which can be achieved with SyncTransport
  Fixing tests - passing pdo is not wrapped for some reason in dbal
  Changing how RoutableMessageBus fallback bus works
  [Serializer] Fix BC break: DEPTH_KEY_PATTERN must be public
  [FrameworkBundle] Fixed issue when a parameter container a '%'
  Fix the interface incompatibility of EventDispatchers
  [TwigBundle] fixed Mailer integration in Twig
  [Form] Add intl/choice_translation_locale option to TimezoneType
2019-05-16 11:31:29 +02:00
David Prévot
96f4626952 Update dependencies in the main component 2019-05-13 07:53:09 +02:00
Fabien Potencier
e19db439d8 Merge branch '4.3'
* 4.3:
  removed deprecated usage of some Twig features
2019-05-10 09:14:12 +02:00
Fabien Potencier
e75ed98979 Merge branch '4.2' into 4.3
* 4.2:
  removed deprecated usage of some Twig features
2019-05-10 09:13:57 +02:00
Fabien Potencier
74afcd6777 removed deprecated usage of some Twig features 2019-05-10 08:54:47 +02:00
Fabien Potencier
387207f6c4 updated version to 4.4 2019-05-09 09:23:25 +02:00
Fabien Potencier
e9aaaafbbb Merge branch '4.2'
* 4.2:
  [TwigBridge] Require twig ^1.40|^2.9
  [Serializer] Fix tests
  Use the apply tag instead of the filter tag
  Updated some translation files
  [Translator] Preserve default domain when extracting strings from php files
2019-04-28 08:09:58 +01:00
Fabien Potencier
454574b0a3 Merge branch '3.4' into 4.2
* 3.4:
  [TwigBridge] Require twig ^1.40|^2.9
  [Serializer] Fix tests
  Use the apply tag instead of the filter tag
  Updated some translation files
  [Translator] Preserve default domain when extracting strings from php files
2019-04-28 08:09:27 +01:00
Grégoire Paris
9c11b98d0a
Use the apply tag instead of the filter tag
The filter has been deprecated in favor of the apply tag since Twig 2.9,
see https://twig.symfony.com/doc/2.x/tags/filter.html (apply does not
seem to have its own documentation page yet).
2019-04-27 20:55:44 +02:00
Titouan Galopin
4050ec4257 [DomCrawler] Optionally use html5-php to parse HTML 2019-04-03 15:17:16 +02:00
Nicolas Grekas
aabd1d455e [HttpClient] add ResponseInterface::toArray() 2019-03-09 17:49:48 +01:00
Nicolas Grekas
fc83120691 [HttpClient] Add Psr18Client - aka a PSR-18 adapter 2019-03-07 17:16:39 +01:00
Nicolas Grekas
8610668c1c [HttpClient] introduce the component 2019-03-07 17:16:39 +01:00
Fabien Potencier
ee787d17b4 [Mime] added classes for generating MIME messages 2019-03-02 15:10:47 +01:00
Robin Chalas
9429face97 feature #29753 [Console] Add an iterate method to the ProgressBar class (jvasseur)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Console] Add an iterate method to the ProgressBar class

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/10949

Add an iterate method to the `ProgressBar` class that simplify updating the progress bar when iterating over an `iterable`.

Before:
```php
$bar->start();
foreach ($iterable as $value) {
    // Process $value

    $bar->advance();
}
$bar->finish();
```

After:
```php
foreach ($bar->iterate($iterable) as $value) {
    // Process $value
}
```

Additionally if `$iterable` is countable, the progress bar max step will automatically set to its count. If it isn't countable, nothing is done (instead of setting it to 0) to allow passing a max independently before calling `iterate`.

I will try to do the doc PR soon.

Commits
-------

eb355314b0 Add an iterate method to the ProgressBar class
2019-01-31 10:53:43 +01:00
Jérôme Vasseur
eb355314b0 Add an iterate method to the ProgressBar class 2019-01-30 21:33:07 +01:00
Nicolas Grekas
e8a7a0e2fc Dont advertize what symfony/symfony "provides" 2019-01-24 23:02:27 +01:00
Fabien Potencier
74ca91deaa [Mime] added the component 2019-01-16 23:56:01 +01:00
Nicolas Grekas
ee337dd761 Merge branch '4.2'
* 4.2:
  [Security\Http] detect bad redirect targets using backslashes
  [Form] Filter file uploads out of regular form types
  Fix CI
  minor #28258 [travis] fix composer.lock invalidation for deps=low (nicolas-grekas)
  [travis] fix composer.lock invalidation for PRs patching several components
  [travis] fix composer.lock invalidation for deps=low
  minor #28199 [travis][appveyor] use symfony/flex to accelerate builds (nicolas-grekas)
  [travis] ignore ordering when validating composer.lock files for deps=low
  minor #28146 [travis] cache composer.lock files for deps=low (nicolas-grekas)
  fix ci
  [travis] fix requiring mongodb/mongodb before composer up
  minor #28114 [travis] merge "same Symfony version" jobs in one (nicolas-grekas)
  [2.7] Make CI green
  updated VERSION for 2.7.49
  updated CHANGELOG for 2.7.49
  [HttpKernel] fix trusted headers management in HttpCache and InlineFragmentRenderer
  [HttpFoundation] Remove support for legacy and risky HTTP headers
  updated VERSION for 2.7.48
  update CONTRIBUTORS for 2.7.48
  updated CHANGELOG for 2.7.48
2018-12-06 11:37:20 +00:00
Nicolas Grekas
95e4edba92 Merge branch '4.1' into 4.2
* 4.1:
  [Security\Http] detect bad redirect targets using backslashes
  [Form] Filter file uploads out of regular form types
  Fix CI
  minor #28258 [travis] fix composer.lock invalidation for deps=low (nicolas-grekas)
  [travis] fix composer.lock invalidation for PRs patching several components
  [travis] fix composer.lock invalidation for deps=low
  minor #28199 [travis][appveyor] use symfony/flex to accelerate builds (nicolas-grekas)
  [travis] ignore ordering when validating composer.lock files for deps=low
  minor #28146 [travis] cache composer.lock files for deps=low (nicolas-grekas)
  fix ci
  [travis] fix requiring mongodb/mongodb before composer up
  minor #28114 [travis] merge "same Symfony version" jobs in one (nicolas-grekas)
  [2.7] Make CI green
  updated VERSION for 2.7.49
  updated CHANGELOG for 2.7.49
  [HttpKernel] fix trusted headers management in HttpCache and InlineFragmentRenderer
  [HttpFoundation] Remove support for legacy and risky HTTP headers
  updated VERSION for 2.7.48
  update CONTRIBUTORS for 2.7.48
  updated CHANGELOG for 2.7.48
2018-12-06 11:36:58 +00:00
Fabien Potencier
534b83f080 updated version to 4.3 2018-11-26 17:19:01 +01:00
Nicolas Grekas
a42e8774d6 [Cache] added support for connecting to Redis clusters via DSN 2018-10-10 06:45:03 -07:00
Nicolas Grekas
0a1220fd96 [Cache] leverage Contracts\Cache 2018-09-04 09:24:06 +02:00
Nicolas Grekas
de6329a7d9 Autoload symfony/contracts from the local repository 2018-09-01 18:41:38 +02:00
Fabien Potencier
da0ef24744 feature #28231 [VarExporter] a new component to serialize values to plain PHP code (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarExporter] a new component to serialize values to plain PHP code

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This PR proposes moving what is currently the `PhpMarshaller` class in the Cache component to a separate component.

This component would provide only one public static method:
`VarExporter::export($value, bool &$isStaticValue = null): string`.

This method returns `$value` serialized as plain PHP code. Running this code creates the same exact data structure that `$value` contained. This is exactly like `serialize()` and `unserialize()`, from which all semantics are preserved (`__sleep`, `__wakeup` and `Serializable`).

The reason to use this method *vs* `serialize()` or even igbinary is performance: thanks to OPcache, the resulting code is significantly faster and more memory efficient than using `unserialize()` or `igbinary_unserialize()`.

Unlike `var_export()`, this works on any serializable PHP value.

It also provides a few improvements over `var_export()`/`serialize()`:
- the output is PSR-2 compatible
- the output can be re-indented without messing up with any `\r` or `\n` in the data
- missing classes throw a `ReflectionException` instead of being unserialized to a `PHP_Incomplete_Class` object
- references involving `SplObjectStorage`, `ArrayObject` or `ArrayIterator` instances are preserved
- `Reflection*`, `IteratorIterator` and `RecursiveIteratorIterator` classes throw an exception when being serialized (their unserialized version is broken anyway, see  https://bugs.php.net/76737.)

Commits
-------

7831ad75e5 [VarExporter] a new component to serialize values to plain PHP code
2018-08-27 18:42:24 +02:00
Nicolas Grekas
7831ad75e5 [VarExporter] a new component to serialize values to plain PHP code 2018-08-27 18:34:07 +02:00