Commit Graph

46693 Commits

Author SHA1 Message Date
Yonel Ceruto
776523e56a Removed request header "Content-Type" from the preferred format guessing mechanism 2019-12-10 09:58:16 -05:00
Nicolas Grekas
85371a174e [Routing] fix memoryleak when loading compiled routes 2019-12-10 15:07:26 +01:00
Nicolas Grekas
2df13e1735 Merge branch '5.0'
* 5.0:
  [Cache] fix merge
2019-12-10 14:56:31 +01:00
Nicolas Grekas
418b8d9b7a [Cache] fix merge 2019-12-10 14:56:26 +01:00
Nicolas Grekas
c7d8accc9b Merge branch '5.0'
* 5.0:
  [Validator] fix low deps
  Don't patch BadFileName.php fixture file
2019-12-10 14:45:02 +01:00
Nicolas Grekas
c6eae73d15 Merge branch '4.4' into 5.0
* 4.4:
  [Validator] fix low deps
  Don't patch BadFileName.php fixture file
2019-12-10 14:44:54 +01:00
Nicolas Grekas
4c50968dd8 [Validator] fix low deps 2019-12-10 14:43:13 +01:00
Nicolas Grekas
894c96bd32 minor #34917 Don't patch BadFileName.php fixture file (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

Don't patch BadFileName.php fixture file

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Commits
-------

ba9d432d48 Don't patch BadFileName.php fixture file
2019-12-10 14:41:05 +01:00
Thomas Calvet
ba9d432d48 Don't patch BadFileName.php fixture file 2019-12-10 13:56:22 +01:00
Nicolas Grekas
5c9e3bac96 [Translation] fix memoryleak in PhpFileLoader 2019-12-10 13:51:10 +01:00
Christian Flothmann
142b1793e0 fix triggering deprecation in file locator 2019-12-10 13:26:43 +01:00
Dominik Pesch
ff1d77e155 bug #34877 [TwigBundle] fix findTemplate() to return null
Twig3 FilesystemLoader::findTemplate() should return `string|null`
instead of Twig2 `string|null|false`: see
<https://github.com/twigphp/Twig/blob/3.x/src/Loader/FilesystemLoader.php#L167>

Returning `null` fixes `exists()` of Twig 3 FilesystemLoader without
breaking Twig 2 (which expected `null` or `false` for not found
templates).

Change the test to assert `null` instead of `false`.
2019-12-10 12:13:11 +01:00
Nicolas Grekas
c2181b0887 Merge branch '5.0'
* 5.0:
  [Validator] Fix auto-mapping constraints should not be validated
  [Debug] Updated the README to deprecate the component
  [Cache] fix memory leak when using PhpFilesAdapter
  [Yaml] Implement multiline string as scalar block for tagged values
  [HttpFoundation] Use `Cache-Control: must-revalidate` only if explicit lifetime has been given
  [FrameworkBundle] Use UserInterface to @return in getUser method
  [CI] Replace php7.4snapshot with php7.4 in Travis configuration
  [ExpressionLanguage][Node][BinaryNode] Process division by zero
  Fixing bad order of operations with null coalescing operator
  forward caught exception
  [Validator][ConstraintValidator] Stop passing unnecessary timezone argument to \DateTime
  add tags before processing them
  [FrameworkBundle][ContainerLintCommand] Reinitialize bundles when the container is reprepared
  [Process] change the syntax of portable prepared command lines
  [MonologBridge] Fix debug processor datetime type
2019-12-10 12:07:17 +01:00
Nicolas Grekas
5f50769825 Merge branch '4.4' into 5.0
* 4.4:
  [Validator] Fix auto-mapping constraints should not be validated
  [Debug] Updated the README to deprecate the component
  [Cache] fix memory leak when using PhpFilesAdapter
  [Yaml] Implement multiline string as scalar block for tagged values
  [HttpFoundation] Use `Cache-Control: must-revalidate` only if explicit lifetime has been given
  [FrameworkBundle] Use UserInterface to @return in getUser method
  [CI] Replace php7.4snapshot with php7.4 in Travis configuration
  [ExpressionLanguage][Node][BinaryNode] Process division by zero
  Fixing bad order of operations with null coalescing operator
  forward caught exception
  [Validator][ConstraintValidator] Stop passing unnecessary timezone argument to \DateTime
  add tags before processing them
  [FrameworkBundle][ContainerLintCommand] Reinitialize bundles when the container is reprepared
  [Process] change the syntax of portable prepared command lines
  [MonologBridge] Fix debug processor datetime type
2019-12-10 12:06:55 +01:00
Nicolas Grekas
ea5ad5c40b minor #34912 [Debug] Updated the README to deprecate the component (javiereguiluz)
This PR was merged into the 4.4 branch.

Discussion
----------

[Debug] Updated the README to deprecate the component

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | https://github.com/symfony/symfony-docs/issues/12775
| License       | MIT
| Doc PR        | -

Commits
-------

ab9e0eb2f5 [Debug] Updated the README to deprecate the component
2019-12-10 12:00:13 +01:00
Nicolas Grekas
7049b94aed bug #34694 [Validator] Fix auto-mapping constraints should not be validated (ogizanagi)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Validator] Fix auto-mapping constraints should not be validated

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | #34672 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | N/A

As for `Traverse`, I don't think we should add these "constraints" to the list.

I'm also wondering if it really makes sense to have these annotations as constraints. I think it should rather behave like the `GroupSequence` annotation to add the info the generic metadata at loading time, but we don't need to rely on the constraints behavior at all.

Commits
-------

bc53e4bca0 [Validator] Fix auto-mapping constraints should not be validated
2019-12-10 11:58:52 +01:00
Maxime Steinhausser
bc53e4bca0 [Validator] Fix auto-mapping constraints should not be validated 2019-12-10 11:58:45 +01:00
Nicolas Grekas
2e7032420f bug #34848 [Process] change the syntax of portable command lines (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Process] change the syntax of portable command lines

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #34838
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/12772

An alternative to #34845

Right now, portable command lines use `"$FOO"` for placeholders.
But because we validate that a corresponding variable exists before running the command, this fails with `Command line is missing a value for key "$FOO"` when `FOO` is not defined.

This PR proposes to use `"${:FOO}"` instead. The difference with the previous syntax is that this cannot collide with existing shell scripts as it is invalid for them.

When this is merged, we'll have to update https://symfony.com/blog/new-in-symfony-4-1-prepared-commands too.

Commits
-------

3c7b775b3e [Process] change the syntax of portable prepared command lines
2019-12-10 11:51:39 +01:00
Nicolas Grekas
b81f4280df bug #34862 [FrameworkBundle][ContainerLintCommand] Reinitialize bundles when the container is reprepared (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle][ContainerLintCommand] Reinitialize bundles when the container is reprepared

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Some bundles extensions are "instances dependents", eg they cache service registrations (eg: 70dec3c8a3/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php (L743)).

Launching the lint command loads all bundles a first time, just to be able to run the command.

Then, when we build the container again for the lint command, it loads all bundles a second time. But since it's the same bundles instances, some services are not registered, leading to missing services in `CheckExceptionOnInvalidReferenceBehaviorPass`.

Commits
-------

31975e4981 [FrameworkBundle][ContainerLintCommand] Reinitialize bundles when the container is reprepared
2019-12-10 11:48:48 +01:00
Javier Eguiluz
ab9e0eb2f5 [Debug] Updated the README to deprecate the component 2019-12-10 11:48:09 +01:00
Nicolas Grekas
e77059825c Merge branch '4.3' into 4.4
* 4.3:
  [Cache] fix memory leak when using PhpFilesAdapter
  [Yaml] Implement multiline string as scalar block for tagged values
  [HttpFoundation] Use `Cache-Control: must-revalidate` only if explicit lifetime has been given
  [FrameworkBundle] Use UserInterface to @return in getUser method
  [CI] Replace php7.4snapshot with php7.4 in Travis configuration
  [ExpressionLanguage][Node][BinaryNode] Process division by zero
  forward caught exception
  [Validator][ConstraintValidator] Stop passing unnecessary timezone argument to \DateTime
  add tags before processing them
  [MonologBridge] Fix debug processor datetime type
2019-12-10 11:33:21 +01:00
Nicolas Grekas
7f2d9c2b1e Merge branch '3.4' into 4.3
* 3.4:
  [Yaml] Implement multiline string as scalar block for tagged values
  [HttpFoundation] Use `Cache-Control: must-revalidate` only if explicit lifetime has been given
  [FrameworkBundle] Use UserInterface to @return in getUser method
  [CI] Replace php7.4snapshot with php7.4 in Travis configuration
  [ExpressionLanguage][Node][BinaryNode] Process division by zero
  forward caught exception
  [Validator][ConstraintValidator] Stop passing unnecessary timezone argument to \DateTime
  add tags before processing them
  [MonologBridge] Fix debug processor datetime type
2019-12-10 11:30:59 +01:00
Nicolas Grekas
5aff4a66f1 bug #34896 [Cache] fix memory leak when using PhpFilesAdapter (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[Cache] fix memory leak when using PhpFilesAdapter

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #34687
| License       | MIT
| Doc PR        | -

Similar to #34839 but for `PhpFilesAdapter`, as the "appendOnly" mode is a v4-only feature.

Commits
-------

0b46226648 [Cache] fix memory leak when using PhpFilesAdapter
2019-12-10 11:24:37 +01:00
Nicolas Grekas
0b46226648 [Cache] fix memory leak when using PhpFilesAdapter 2019-12-10 11:09:22 +01:00
Nicolas Grekas
42712ee006 bug #34438 [HttpFoundation] Use Cache-Control: must-revalidate only if explicit lifetime has been given (mpdude)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Use `Cache-Control: must-revalidate` only if explicit lifetime has been given

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

This is really nit-picking: The conservative, safe default for `Cache-Control` is `private, no-cache` which means the response must not be served from cache unless it has been validated.

If `Last-Modified` or `Expires` are present, we can relax `no-cache` to be `must-revalidate`, which means that _once the response has become stale_, it must be revalidated.

An `ETag` alone does not give the response a lifetime, so IMO sticking with `no-cache` in this case would be more consistent.

Commits
-------

1b1002b426 [HttpFoundation] Use `Cache-Control: must-revalidate` only if explicit lifetime has been given
2019-12-10 10:07:44 +01:00
Nicolas Grekas
035d8a3925 bug #34449 [Yaml] Implement multiline string as scalar block for tagged values (natepage)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[Yaml] Implement multiline string as scalar block for tagged values

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT

At the moment you can parse a tagged value defined as a scalar block. But you can't actually dump a multiline string as scalar block when using a tagged value.

This PR implements the multiline string as scalar block for tagged values as well.

Commits
-------

84241d4e62 [Yaml] Implement multiline string as scalar block for tagged values
2019-12-10 09:51:28 +01:00
natepage
84241d4e62 [Yaml] Implement multiline string as scalar block for tagged values 2019-12-10 09:51:22 +01:00
Matthias Pigulla
1b1002b426 [HttpFoundation] Use Cache-Control: must-revalidate only if explicit lifetime has been given 2019-12-10 09:49:31 +01:00
Nicolas Grekas
8aefe97a89 bug #34601 [MonologBridge] Fix debug processor datetime type (mRoca)
This PR was merged into the 3.4 branch.

Discussion
----------

[MonologBridge] Fix debug processor datetime type

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |n/a
| License       | MIT
| Doc PR        | n/a

This PR fixes an eventual `Call to a member function getTimestamp() on string` if any Processor transforms the `datetime` value, and uses the same record conditions as in the [ConsoleFormatter](https://github.com/symfony/monolog-bridge/blob/master/Formatter/ConsoleFormatter.php#L118 )

Commits
-------

ffe3f10780 [MonologBridge] Fix debug processor datetime type
2019-12-10 09:37:56 +01:00
Nicolas Grekas
35b1328cc2 minor #34780 [CI] Replace php7.4snapshot with php7.4 in Travis configuration (fre5h)
This PR was merged into the 3.4 branch.

Discussion
----------

[CI] Replace php7.4snapshot with php7.4 in Travis configuration

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | no
| License       | MIT
| Doc PR        | no

There is a php7.4 already supported on Travis CI. This pull request replaces previous `7.4snapshot` with `7.4` in Travis config.

Commits
-------

4d3b73e688 [CI] Replace php7.4snapshot with php7.4 in Travis configuration
2019-12-10 09:34:02 +01:00
Nicolas Grekas
cd433461cf minor #34723 [FrameworkBundle] Use UserInterface to @return in getUser method (Arman-Hosseini)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Use UserInterface to @return in getUser method

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License       | MIT
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained 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 branch master.
-->

Commits
-------

9f1ebd7fb9 [FrameworkBundle] Use UserInterface to @return in getUser method
2019-12-10 09:25:53 +01:00
Arman Hosseini
9f1ebd7fb9 [FrameworkBundle] Use UserInterface to @return in getUser method 2019-12-10 09:25:47 +01:00
Artem Henvald
4d3b73e688 [CI] Replace php7.4snapshot with php7.4 in Travis configuration 2019-12-10 09:22:46 +01:00
Nicolas Grekas
2eacbc5b54 bug #34842 [ExpressionLanguage] Process division by zero (tigr1991)
This PR was merged into the 3.4 branch.

Discussion
----------

[ExpressionLanguage] Process division by zero

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

To be able to catch the error in expression like ` 1 / 0`

**Before PR:**
```
try {
    1 / 0;
} catch (\Throwable $e) {
    // It won't be caught anyway
    // PHP Warning:  Division by zero in...
}

try {
    1 % 0;
} catch (\Throwable $e) {
    // It will be caught since PHP7
    // \DivisionByZeroError with message `Modulo by zero`
}
```
**After PR:**
```
try {
    1 / 0;
} catch (\Throwable $e) {
    // It will be caught
    // \DivisionByZeroError with message `Division by zero`
}

try {
    1 % 0;
} catch (\Throwable $e) {
    // It will be caught
    // \DivisionByZeroError with message `Modulo by zero`
}
```

Commits
-------

02ab72ab30 [ExpressionLanguage][Node][BinaryNode] Process division by zero
2019-12-10 09:19:19 +01:00
Ivan
02ab72ab30 [ExpressionLanguage][Node][BinaryNode] Process division by zero 2019-12-10 09:18:51 +01:00
Nicolas Grekas
429b18e28e minor #34895 [Validator][ConstraintValidator] Stop passing unnecessary timezone argument to \DateTime (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator][ConstraintValidator] Stop passing unnecessary timezone argument to \DateTime

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Since we format the \DateTimeImmutable with the "e" character, it uses this timezone identifier and do not consider the passed one. See https://www.php.net/manual/en/datetime.construct.php:

> The $timezone parameter and the current timezone are ignored when the $time parameter either is a UNIX timestamp (e.g. @946684800) or specifies a timezone (e.g. 2010-01-28T15:00:00+02:00).

Commits
-------

03dbcf8794 [Validator][ConstraintValidator] Stop passing unnecessary timezone argument to \DateTime
2019-12-10 09:11:51 +01:00
Nicolas Grekas
56bfbd8377 bug #34902 [PropertyAccess] forward caught exception (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyAccess] forward caught exception

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #34899
| License       | MIT
| Doc PR        |

Commits
-------

98e18d33df forward caught exception
2019-12-10 09:05:46 +01:00
Yonel Ceruto
5e75edf578 bug #34903 Fixing bad order of operations with null coalescing operator (weaverryan)
This PR was merged into the 4.4 branch.

Discussion
----------

Fixing bad order of operations with null coalescing operator

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | None
| License       | MIT
| Doc PR        | not needed

Hi!

Reported by a user on SymfonyCasts :). Apparently without the parentheses, the order of operations is incorrect: https://3v4l.org/UZ7GU

Thanks!

Commits
-------

6291264 Fixing bad order of operations with null coalescing operator
2019-12-09 16:15:29 -05:00
Ryan Weaver
629126435d Fixing bad order of operations with null coalescing operator 2019-12-09 15:51:18 -05:00
Christian Flothmann
98e18d33df forward caught exception 2019-12-09 21:23:16 +01:00
Christian Flothmann
bf877b811c bug #34888 [TwigBundle] add tags before processing them (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBundle] add tags before processing them

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #34815
| License       | MIT
| Doc PR        |

Commits
-------

e1145a78b5 add tags before processing them
2019-12-09 17:39:04 +01:00
Thomas Calvet
03dbcf8794 [Validator][ConstraintValidator] Stop passing unnecessary timezone argument to \DateTime 2019-12-09 14:42:15 +01:00
Christian Flothmann
e1145a78b5 add tags before processing them 2019-12-09 10:36:27 +01:00
Nicolas Grekas
ae00ff4cfa Merge branch '5.0'
* 5.0: (38 commits)
  [Security] Check UserInterface::getPassword is not null before calling needsRehash
  gracefully handle missing event dispatchers
  Fix TokenStorage::reset not called in stateless firewall
  [DotEnv] Remove `usePutEnv` property default value
  [HttpFoundation] get currently session.gc_maxlifetime if ttl doesnt exists
  Set up typo fix
  [DependencyInjection] Handle env var placeholders in CheckTypeDeclarationsPass
  [Cache] fix memory leak when using PhpArrayAdapter
  [Validator] Allow underscore character "_" in URL username and password
  [TwigBridge] Update bootstrap_4_layout.html.twig
  [DoctrineBridge] Removed QueryBuilder type hint in getLoader()
  [FrameworkBundle][SodiumVault] Create secrets directory only when needed
  fix parsing negative octal numbers
  [String] implement __sleep()/__wakeup() on strings
  Fixed translations file dumper behavior
  [Routing][ObjectLoader] Remove forgotten deprecation after merge
  [SecurityBundle] Passwords are not encoded when algorithm set to \"true\"
  [DependencyInjection] Resolve expressions in CheckTypeDeclarationsPass
  [SecurityBundle] Properly escape regex in AddSessionDomainConstraintPass
  do not validate passwords when the hash is null
  ...
2019-12-07 17:42:39 +01:00
Nicolas Grekas
1d1e29c8cd Merge branch '4.4' into 5.0
* 4.4: (30 commits)
  [Security] Check UserInterface::getPassword is not null before calling needsRehash
  gracefully handle missing event dispatchers
  Fix TokenStorage::reset not called in stateless firewall
  [DotEnv] Remove `usePutEnv` property default value
  [HttpFoundation] get currently session.gc_maxlifetime if ttl doesnt exists
  Set up typo fix
  [DependencyInjection] Handle env var placeholders in CheckTypeDeclarationsPass
  [Cache] fix memory leak when using PhpArrayAdapter
  [Validator] Allow underscore character "_" in URL username and password
  [TwigBridge] Update bootstrap_4_layout.html.twig
  [FrameworkBundle][SodiumVault] Create secrets directory only when needed
  fix parsing negative octal numbers
  [SecurityBundle] Passwords are not encoded when algorithm set to \"true\"
  [DependencyInjection] Resolve expressions in CheckTypeDeclarationsPass
  [SecurityBundle] Properly escape regex in AddSessionDomainConstraintPass
  do not validate passwords when the hash is null
  [DI] fix resolving bindings for named TypedReference
  [Config] never try loading failed classes twice with ClassExistenceResource
  [Mailer] Fix SMTP Authentication when using STARTTLS
  [DI] Fix making the container path-independent when the app is in /app
  ...
2019-12-07 17:40:37 +01:00
Nicolas Grekas
6e44447e5d Merge branch '4.3' into 4.4
* 4.3:
  gracefully handle missing event dispatchers
  [Cache] fix memory leak when using PhpArrayAdapter
  fix parsing negative octal numbers
  [SecurityBundle] Properly escape regex in AddSessionDomainConstraintPass
  [Config] never try loading failed classes twice with ClassExistenceResource
2019-12-07 17:27:44 +01:00
Nicolas Grekas
a492e72129 Merge branch '3.4' into 4.3
* 3.4:
  [Cache] fix memory leak when using PhpArrayAdapter
  fix parsing negative octal numbers
  [SecurityBundle] Properly escape regex in AddSessionDomainConstraintPass
  [Config] never try loading failed classes twice with ClassExistenceResource
2019-12-07 17:25:26 +01:00
Fabien Potencier
b4c8d51fed bug #34760 [Mailer] Fix SMTP Authentication when using STARTTLS (DjLeChuck)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Fix SMTP Authentication when using STARTTLS

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #34522
| License       | MIT

When the mail server uses STARTTLS, the SMTP Authentication is not performed because the AUTH capabilities are not send during the first EHLO call, but during the second one.

Example of problematic exchange solved by this PR:
```
      < 220 mydomain.tld ESMTP Postcow
      > EHLO [127.0.0.1]
      < 250-mydomain.tld
      < 250-PIPELINING
      < 250-SIZE 104857600
      < 250-ETRN
      < 250-STARTTLS
      < 250-ENHANCEDSTATUSCODES
      < 250-8BITMIME
      < 250-DSN
      < 250 CHUNKING
      > STARTTLS
      < 220 2.0.0 Ready to start TLS
      > EHLO [127.0.0.1]
      < 250-mydomain.tld
      < 250-PIPELINING
      < 250-SIZE 104857600
      < 250-ETRN
      < 250-AUTH PLAIN LOGIN
      < 250-AUTH=PLAIN LOGIN
      < 250-ENHANCEDSTATUSCODES
      < 250-8BITMIME
      < 250-DSN
      < 250 CHUNKING
      > MAIL FROM:<noreply@XXX>
      < 250 2.1.0 Ok
      > RCPT TO:<XXX>
      < 554 5.7.1 <XXX>: Client host rejected: Access denied
```

Commits
-------

75b54542ab [Mailer] Fix SMTP Authentication when using STARTTLS
2019-12-07 15:09:53 +01:00
Fabien Potencier
d84e92c965 feature #34769 [DependencyInjection] Autowire public typed properties (Plopix)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[DependencyInjection] Autowire public typed properties

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| License       | MIT

### Description

This PR adds the Autowiring of **public typed properties** in PHP 7.4.
It is only on "public" properties.

It could let people think that services are better injected in "public".
I don't know what to think about it, you?

### How about "private" properties - further thinking

Even if I think that it would be awesome to be able to inject in "private" properties, we discussed it with @nicolas-grekas, and I agree Symfony should not break any standard logic. If the property is private then it is private the DI cannot touch it.

But that could/would remove a lot of boilerplate, and if it is declarative, that might still be something to do.
Maybe we could introduce a new annotation for injection in "private": `@requiredPrivated` ?

Commits
-------

cad7fbb9f7 [DI] Autowire public typed properties
2019-12-07 14:48:36 +01:00
Fabien Potencier
c0b2ade0a3 bug #34762 [Config] never try loading failed classes twice with ClassExistenceResource (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Config] never try loading failed classes twice with ClassExistenceResource

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #34658
| License       | MIT
| Doc PR        | -

Commits
-------

90c9a80863 [Config] never try loading failed classes twice with ClassExistenceResource
2019-12-07 14:42:18 +01:00