Commit Graph

41215 Commits

Author SHA1 Message Date
Fabien Potencier
6d51eaf5fc fixed CS 2019-03-31 12:10:11 +02:00
Fabien Potencier
e92c120f27 feature #30116 [Filesystem] Fix mirroring a directory into itself or in his child with realpath checks (Fleuv, XuruDragon)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Filesystem] Fix mirroring a directory into itself or in his child with realpath checks

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

This this the continuity of #29857 by @Fleuv

Fix a bug while trying to mirror a directory into itself or in a child
Adding handle real path checks when mirroring.

Commits
-------

8011f494d4 Handling relative/absolute path
59437a4af9 Skipping iterations in the mirror() method where the iterated file's path name is equal to the target path
2019-03-31 11:15:35 +02:00
Fabien Potencier
67083b6f93 feature #28879 [Debug] Mimic __toString php behavior in FlattenException (Deltachaos)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Debug] Mimic __toString php behavior in FlattenException

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

The `Symfony\Component\Debug\Exception\FlattenException` object is returned by `Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector::getException` method, but the docblock of this method indicates that it should return `\Exception` object.

As the `FlattenException` class should behave as much as possible like a php `\Exception` object, it should implement the same methods as `\Exception`.

This PR is adding `__toString` and `getTraceAsString` methods. Those methods are (in my opinion) the most useful methods of a `\Exception` object. A potential use case (where i am stumbled across this inconsistency) is to get the last exception of a request in a `WebTestCase` using the profiler and printing the trace.

Commits
-------

514a1b506c [Debug] Mimic __toString php behavior in FlattenException
2019-03-31 11:12:58 +02:00
Fabien Potencier
47242e36e0 fixed CS 2019-03-31 10:40:49 +02:00
Fabien Potencier
2bd27ffd1b feature #29495 [Ldap] Implement pagination (kevans91)
This PR was squashed before being merged into the 4.3-dev branch (closes #29495).

Discussion
----------

[Ldap] Implement pagination

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yno
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | N/A (cannot test at the moment)
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

Implement pagination support in the ExtLdap adapter. In a more abstract sense, other adapters should use a query's pageSize option to determine if pagination is being needed. Pagination is required in some environments that frequently query for more results than the remote server is willing to allow.

BC break was avoided by having Query->getResource() return the first result, if available.

A small hack is included to work around php-ldap failing to reset pagination properly; the LDAP_OPT_SERVER_CONTROLS are sent with every request, whether pagination has been 'reset' by sending a 0-page request or not. This appears to be a php-ldap bug that will need to be addressed there, but we can work-around it for now by doing both: setting the 0-page option *and* unsetting the OID directly. This was resulting in odd results, like queries returning 0 results or returning < server_page_size results for a query that should have returned >= server_page_size.

Commits
-------

b96347485c [Ldap] Implement pagination
2019-03-31 10:40:08 +02:00
Kyle Evans
b96347485c [Ldap] Implement pagination 2019-03-31 10:39:25 +02:00
Fabien Potencier
5e079536c9 [LDAP] fixed typos and CS 2019-03-31 10:31:43 +02:00
Fabien Potencier
22234e331e feature #29448 [Ldap] Entry move support (kevans91)
This PR was squashed before being merged into the 4.3-dev branch (closes #29448).

Discussion
----------

[Ldap] Entry move support

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no (see [1])
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A (see [2])

Add Move support to the ldap EntryManagerInterface and the ExtLdap adapter. This is used to re-parent an entry to another part of the directory. The interface to do so need not be complicated, requiring only the entry to be moved and the parent DN to be moved to.

Underlying implementations may require a 'newrdn' attribute -- this is generally the RDN w.r.t. the immediate parent of the entry, which is easily parsed.

I've attempted to implement it as the rename functionality was originally implemented: adding an interface to be deprecated effective immediately, presumably to allow it to be backported without breaking existing interfaces, and then implementing this interface in the ExtLdap adapter.

[1] I do not have the capacity to run the ldap tests for this locally due to current $work situation; I have no reason to believe this test will fail as written, though. This functionality has been used as currently implemented (against Windows ADS) for some time in my production environment, so it has been functionally tested otherwise.

[2] No doc PR has been created for this feature addition, since it's a minor addition. The LDAP documentation should likely be amended to include rename functionality as well as this.

Commits
-------

32743c850f [Ldap] Entry move support
2019-03-31 10:29:16 +02:00
Kyle Evans
32743c850f [Ldap] Entry move support 2019-03-31 10:29:07 +02:00
Fabien Potencier
c9b8ca631c minor #30788 [Mailer] Remove unneeded catch in ping() (sstok)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Mailer] Remove unneeded catch in ping()

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

The stop() method doesn't throw.

Commits
-------

907adf47e3 [Mailer] Remove unneeded catch in ping()
2019-03-30 17:00:28 +01:00
Fabien Potencier
2fb2508cee Merge branch '3.4' into 4.2
* 3.4:
  [Serializer] Added check of constuctor modifiers to AbstractNormalizer
  [Intl] Simplify the compile binary
  [Routing] Fix routes annotation loading with glob pattern
  Fix hardcoded hotPathTagName
  [Validator] Improve constraint default option check
  [Validator] Fix annotation default for @Count and @Length
  Update composer.json
  Fix getSetMethodNormalizer to correctly ignore the attributes specified in "ignored_attributes"
  Add missing "vi" translations
  add missing German translations
  [Intl] Fix test
  added missing translation
  use behavior instead of behaviour
  [Validator] Translate JSON message to Hungarian
  [Validator] fix sr_Latn translations
  [FrameworkBundle][HttpFoundation] make session service resettable
2019-03-30 16:58:42 +01:00
Sebastiaan Stok
907adf47e3
[Mailer] Remove unneeded catch in ping()
The stop() method doesn't throw
2019-03-30 16:56:09 +01:00
Fabien Potencier
c7c1c3bad9 bug #30784 [Translator] Add resource path to exception message for schema valida… (jschaedl)
This PR was submitted for the master branch but it was merged into the 4.2 branch instead (closes #30784).

Discussion
----------

[Translator] Add resource path to exception message for schema valida…

…tion errors

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30762
| License       | MIT

Commits
-------

3ce7f5a5f9 [Translator] Add resource path to exception message for schema validation errors
2019-03-30 16:56:03 +01:00
Jan Schädlich
3ce7f5a5f9 [Translator] Add resource path to exception message for schema validation errors 2019-03-30 16:55:39 +01:00
Fabien Potencier
c128d50196 bug #30787 [Mailer] Fix SMTP support when a message cannot be sent (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Mailer] Fix SMTP support when a message cannot be sent

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

3d25c1c613 [Mailer] fixed SMTP support when a message cannot be sent
2019-03-30 16:52:03 +01:00
Fabien Potencier
3d25c1c613 [Mailer] fixed SMTP support when a message cannot be sent 2019-03-30 14:46:29 +01:00
Fabien Potencier
086f4a20f7 minor #30786 [Mailer] fix typo (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Mailer] fix typo

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

9cf665f2ea [Mailer] fixed typo
2019-03-30 14:30:35 +01:00
Fabien Potencier
9cf665f2ea [Mailer] fixed typo 2019-03-30 14:28:10 +01:00
Fabien Potencier
f3f1ebc520 minor #30783 Fix author (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Fix author

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

827e61f645 fixed author
2019-03-30 13:11:35 +01:00
Fabien Potencier
827e61f645 fixed author 2019-03-30 13:09:36 +01:00
Fabien Potencier
845cf9e271 feature #30741 Add the Mailer component (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Add the Mailer component

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | upcoming

https://speakerdeck.com/fabpot/mailer

Commits
-------

69b9ee794c added the Mailer component
2019-03-30 12:38:45 +01:00
Fabien Potencier
69b9ee794c added the Mailer component 2019-03-30 09:09:06 +01:00
Fabien Potencier
e3bbf8de11 bug #30720 Fix getSetMethodNormalizer to correctly ignore the attributes specified in "ignored_attributes" (Emmanuel BORGES)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix getSetMethodNormalizer to correctly ignore the attributes specified in "ignored_attributes"

…ed in "ignored_attributes"

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30453
| License       | MIT

The GetSetMethodNormalizer class correctly ignores the attributes specified in "ignored_attributes"

Commits
-------

606d8d370d Fix getSetMethodNormalizer to correctly ignore the attributes specified in "ignored_attributes"
2019-03-30 08:48:10 +01:00
Fabien Potencier
760bbd595b feature #30780 Fix some exception previous type hints (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Fix some exception previous type hints

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

follow-up for #30729

Commits
-------

f92efeb429 fixed some exception previous type hints
2019-03-30 08:46:07 +01:00
Fabien Potencier
f92efeb429 fixed some exception previous type hints 2019-03-30 08:40:00 +01:00
Fabien Potencier
2041924587 minor #30779 Remove obsolete code (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Remove obsolete code

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

The bug referenced was fixed in 7.0 beta 3 (668ecaa606)

Commits
-------

8d25319783 removed obsolete code
2019-03-30 08:37:12 +01:00
Fabien Potencier
8d25319783 removed obsolete code 2019-03-30 08:32:15 +01:00
Fabien Potencier
e9e2f217a3 feature #30729 [HttpKernel] change $previous argument for HttpException to \Throwable (sGy1980de)
This PR was submitted for the 4.2 branch but it was squashed and merged into the 4.3-dev branch instead (closes #30729).

Discussion
----------

[HttpKernel] change $previous argument for HttpException to \Throwable

| Q             | A
| ------------- | ---
| Branch?       |  4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30728
| License       | MIT

This will fix #30728 with the suggested solution to change the signature of `HttpException` and all its descendants from `\Exception` to `\Throwable`.

Commits
-------

15cb4754e7 [HttpKernel] change $previous argument for HttpException to \Throwable
2019-03-30 08:30:17 +01:00
Silvio Ginter
15cb4754e7 [HttpKernel] change $previous argument for HttpException to \Throwable 2019-03-30 08:30:07 +01:00
Fabien Potencier
30b96175a6 feature #30744 [Finder] Throw a dedicated exception for non-existing directory (xelan)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Finder] Throw a dedicated exception for non-existing directory

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes [1]
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no [2]
| Tests pass?   | yes
| Fixed tickets | #30723
| License       | MIT
| Doc PR        | N/A [3]

Makes `Finder::in()` throw a `DirectoryNotFoundException` instead of an `InvalidArgumentException` if one of the directories is not found.
This behavior is more consistent with the `AccessDeniedException` for files which are unreadable due to insufficient permissions.
To keep backward compatibility, the new exception class inherits from `InvalidArgumentException`.

[1] A valid, but non-existent directory name is IMHO not an invalid argument
[2] However, it may be semantically better to extend from `RuntimeException`,  This would require a deprecation.
[3] Possible exceptions are currently not explained at https://symfony.com/doc/current/components/finder.html

Commits
-------

48d5f94cda Throw a dedicated exception for non-existing directory
2019-03-30 08:28:10 +01:00
Fabien Potencier
cc6bfea220 bug #30749 [Serializer] Added check of constuctor modifiers to AbstractNormalizer (NekaKawaii)
This PR was submitted for the 4.2 branch but it was merged into the 3.4 branch instead (closes #30749).

Discussion
----------

[Serializer] Added check of constuctor modifiers to AbstractNormalizer

| Q             | A
| ------------- | ---
| Branch?       |  4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30748
| License       | MIT

If constructor is not public, instantiate target object without constructor to prevent errors like `Access to non-public constructor of class Target`

Commits
-------

eb0e14c298 [Serializer] Added check of constuctor modifiers to AbstractNormalizer
2019-03-30 08:26:43 +01:00
Dmitriy Tkachenko
eb0e14c298 [Serializer] Added check of constuctor modifiers to AbstractNormalizer 2019-03-30 08:26:35 +01:00
Fabien Potencier
7cb14f3186 fixed typo 2019-03-30 08:22:54 +01:00
Fabien Potencier
6ffad7bba4 feature #30759 [Messenger] Adding the "sync" transport to call handlers synchronously (weaverryan)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Adding the "sync" transport to call handlers synchronously

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

This adds a `sync://` transport that just calls the handlers immediately. Why? This allows you to route your messages to some "async" transport. But then, when developing locally or running your tests, you can choose to run them synchronously instead:

```yml
# config/packages/messenger.yaml
framework:
    messenger:
        transports:
            async: '%env(MESSENGER_TRANSPORT_DSN)%'
        routing:
            'App\Message\SmsNotification': async
            'App\Message\OtherMessage': async
```

```
# .env
# by default, handle this sync
MESSENGER_TRANSPORT_DSN=sync://
```

```
# .env.local on production (or set this via real env vars)
# on production, use amqp
MESSENGER_TRANSPORT_DSN=amqp://.......
```

Cheers!

Commits
-------

3da5a438aa Adding the "sync" transport to call handlers synchronously
2019-03-30 08:22:14 +01:00
Fabien Potencier
3edb79f5d3 feature #30772 [Contracts][EventDispatcher] move the Event class to symfony/contracts (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Contracts][EventDispatcher] move the Event class to symfony/contracts

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

Will allow decoupling more components in 5.0

Commits
-------

a4ce08ec30 [Contracts][EventDispatcher] move the Event class to symfony/contracts
2019-03-30 08:19:14 +01:00
Fabien Potencier
2b734606b8 bug #30776 [Routing] Fix routes annotation loading with glob pattern (snoob)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] Fix routes annotation loading with glob pattern

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29747
| License       | MIT
| Doc PR        | n/a

Loading routes annotation loading with glob pattern triggers an error if one of the targetted directory contains an abstract class. This fixes it

Commits
-------

c7c45a13a7 [Routing] Fix routes annotation loading with glob pattern
2019-03-30 08:13:09 +01:00
Fabien Potencier
1c92836e8c bug #30773 [DependencyInjection] Fix hardcoded hotPathTagName (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] Fix hardcoded hotPathTagName

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

replace the hardcoded string by the injected variable

Commits
-------

67fb8eff2e Fix hardcoded hotPathTagName
2019-03-30 08:04:10 +01:00
Fabien Potencier
f4176b0cf6 fixed typos 2019-03-30 08:02:29 +01:00
Fabien Potencier
b12351a7eb feature #30708 [Messenger] ReceiverInterface::handle() to get() & Worker with prioritized transports (weaverryan)
This PR was squashed before being merged into the 4.3-dev branch (closes #30708).

Discussion
----------

[Messenger] ReceiverInterface::handle() to get() & Worker with prioritized transports

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

Highlights:

* `messenger:consume` can now consume messages from multiple transports with priority ️

```
bin/console messenger:consume amqp_high amqp_medium amqp_low
```

* How long you want to sleep before checking more messages is now an option to `messenger:consume`
* `ReceiverInterface::receive()` is replaced with `ReceiverInterface::get()`
* Logic for looping & sleeping is moved into `Worker`

Commits
-------

e800bd5bde [Messenger] ReceiverInterface::handle() to get() & Worker with prioritized transports
2019-03-30 08:01:33 +01:00
Ryan Weaver
e800bd5bde [Messenger] ReceiverInterface::handle() to get() & Worker with prioritized transports 2019-03-30 08:01:26 +01:00
Fabien Potencier
6b8ff62648 minor #30778 [Intl] Simplify the compile binary (jakzal)
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] Simplify the compile binary

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

The intl docker image comes with build-essential packages now, so there's no need for additional installation steps.

re #30584

Commits
-------

b3184c26ad [Intl] Simplify the compile binary
2019-03-30 07:56:46 +01:00
Jakub Zalas
b3184c26ad
[Intl] Simplify the compile binary
The docker image comes with the build-essential packages now.
2019-03-29 22:39:22 +00:00
Yannick Snobbert
c7c45a13a7 [Routing] Fix routes annotation loading with glob pattern 2019-03-29 22:58:42 +01:00
Jérémy Derussé
67fb8eff2e
Fix hardcoded hotPathTagName 2019-03-29 20:18:37 +01:00
Nicolas Grekas
a4ce08ec30 [Contracts][EventDispatcher] move the Event class to symfony/contracts 2019-03-29 19:47:03 +01:00
Fabien Potencier
755d481168 minor #30761 [Security] Add symfony/polyfill-ctype to dev requirements (SpacePossum)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Add symfony/polyfill-ctype to dev requirements

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

because this [test](https://github.com/symfony/symfony/blob/v3.4.0/src/Symfony/Component/Security/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php#L55) uses `ctype_print`

Commits
-------

f8a033c0ef Update composer.json
2019-03-29 18:48:25 +01:00
Fabien Potencier
ee5d7fdacf bug #30737 [Validator] Improve constraint default option check (vudaltsov)
This PR was squashed before being merged into the 3.4 branch (closes #30737).

Discussion
----------

[Validator] Improve constraint default option check

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

Any constraint without default option used as annotation with unnamed first argument (for example, `@Assert\Collection(1)`) throws an exception with an ugly message `The options "" do not exist in constraint Collection`.

This PR makes constraint check the default option in the annotation case in the same way it checks it in the "real" code case. So the exception will be `No default option is configured for constraint Collection.`

Commits
-------

915912e18e [Validator] Improve constraint default option check
2019-03-29 18:25:59 +01:00
Valentin Udaltsov
915912e18e [Validator] Improve constraint default option check 2019-03-29 18:25:52 +01:00
Fabien Potencier
2389d7c686 Revert "feature #30651 Allow user to set the project dir (tdutrion)"
This reverts commit aa12dd0bd7, reversing
changes made to 7d01aae41e.
2019-03-29 18:00:10 +01:00
Fabien Potencier
c203379dd5 feature #27648 [Lock] Added MongoDBStore (Joe Bennett)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Lock] Added MongoDBStore

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes (requires `ext-mongodb` and `mongodb/mongodb` to test)
| Fixed tickets | #27345
| License       | MIT
| Doc PR        | symfony/symfony-docs#9807

**Testing caveat**
In order to test this, the test environment needs `ext-mongodb` and `mongodb/mongodb`.

I have both written the test and tested `Symfony\Component\Lock\Store\MongoDbStore` and it does pass in an environment with `ext-mongodb` and `mongodb/mongodb`.

**Description**
We should support Semaphore Locks with a MongoDB back end to allow those that already use MongoDB as a distributed storage engine.

Symfony already partially supports MongoDB for session storage: `Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandler`

**Example**

```php
$client = new MongoDb\Client();

$store = new Symfony\Component\Lock\Store\MongoDbStore(
    $client
    array(
        'database' => 'my-app',
    )
);
$lockFactory = new Symfony\Component\Lock\Factory($store);
$lock = $lockFactory->createLock('my-resource');
```

This is a squashed pull request of https://github.com/symfony/symfony/pull/27346

Commits
-------

9c04639dc3 #27345 Added Lock/Store/MongoDbStore
2019-03-29 17:15:05 +01:00