Commit Graph

51567 Commits

Author SHA1 Message Date
Matthew Smeets
d019d38220 Reference the correct interface in the RegistryInterface deprecation in upgrade notes 2020-10-15 20:55:38 +02:00
Nyholm
1e8916904e
bug #38581 [Semaphore] Reset Key lifetime time before we acquire it (jderusse)
This PR was merged into the 5.x branch.

Discussion
----------

[Semaphore] Reset Key lifetime time before we acquire it

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | /
| License       | MIT
| Doc PR        | /

This is the same issue fixed by #38553 but for Semaphore component.

Commits
-------

e7ffd5d2e7 Reset Key lifetime time in semaphore
2020-10-15 19:46:28 +02:00
Jérémy Derussé
e7ffd5d2e7
Reset Key lifetime time in semaphore 2020-10-15 19:25:55 +02:00
Nicolas Grekas
61290d5aa4 [HttpClient] added extra.trace_content option to TraceableHttpClient to prevent it from keeping the content in memory 2020-10-15 14:02:47 +02:00
Jérémy Derussé
f9ddc5c147
Missing Changelog for deprecating services 2020-10-15 11:48:15 +02:00
Nicolas Grekas
f6dc8260eb bug #38582 [DI] Fix Reflection file name with eval()\'d code (maxime-aknin)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Fix Reflection file name with eval()\'d code

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

remove eval()\'d code from lineage
similar to #30363

Commits
-------

394a694856 Fix Reflection file name with eval()\'d code
2020-10-15 10:31:52 +02:00
Maxime Aknin
394a694856 Fix Reflection file name with eval()\'d code
remove eval()\'d code from lineage
2020-10-15 10:31:43 +02:00
Nicolas Grekas
2514cf1c1d [FrameworkBundle] fix config declaration of http_cache option 2020-10-15 10:20:12 +02:00
Alexander M. Turek
b3a1851d43 minor #38579 Fix: Typo (OskarStark)
This PR was merged into the 5.x branch.

Discussion
----------

Fix: Typo

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

Commits
-------

db392d2441 Fix: Typo
2020-10-15 10:18:29 +02:00
Oskar Stark
db392d2441
Fix: Typo 2020-10-15 10:06:30 +02:00
Fabien Potencier
19a320513a feature #38565 [RateLimiter] Adding SlidingWindow algorithm (Nyholm)
This PR was squashed before being merged into the 5.x branch.

Discussion
----------

[RateLimiter] Adding SlidingWindow algorithm

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? |
| Tickets       |
| License       | MIT
| Doc PR        | Should be added

This is a draft PR to make sure we like the idea. I'll keep working on adding tests.

Commits
-------

c6d3b70315 [RateLimiter] Adding SlidingWindow algorithm
2020-10-15 08:59:52 +02:00
Nyholm
c6d3b70315 [RateLimiter] Adding SlidingWindow algorithm 2020-10-15 08:59:46 +02:00
Fabien Potencier
5bc26de767 feature #38576 Deeprecate lock service (jderusse)
This PR was merged into the 5.x branch.

Discussion
----------

Deeprecate lock service

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | no
| Deprecations? | yes
| Tickets       | #38458
| License       | MIT
| Doc PR        | TODO

This PR deprecate the `lock`, `LockInterface` service ass discussed in #38458

Commits
-------

40ea90ef6b Deeprecate lock service
2020-10-15 06:50:32 +02:00
Fabien Potencier
6bbab591c8 bug #38578 Add missing use statement (jderusse)
This PR was merged into the 5.1 branch.

Discussion
----------

Add missing use statement

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

The `StoreInterface` has been renamed into `PersistingStoreInterface` in 4.4, but people are allowed to use an old version of the Lock component with a recent version of the FrameworkBundle.

The StoreInterface is used here:
3e587d7013/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php (L1582)

Commits
-------

4a63308fb3 Add missing use statement
2020-10-15 06:48:07 +02:00
Jérémy Derussé
4a63308fb3
Add missing use statement 2020-10-15 01:12:09 +02:00
Jérémy Derussé
40ea90ef6b
Deeprecate lock service 2020-10-15 01:04:22 +02:00
Robin Chalas
f5a4a5d715 minor #38575 Add myself to CODEOWNERS for Security and Console (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

Add myself to CODEOWNERS for Security and Console

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

Commits
-------

a2ab55407b Add myself to CODEOWNERS for Security and Console
2020-10-15 00:48:59 +02:00
Robin Chalas
a2ab55407b Add myself to CODEOWNERS for Security and Console 2020-10-15 00:44:28 +02:00
Robin Chalas
4a221f8f33 minor #38574 Add wouterj as codeowner for Security related packages (wouterj)
This PR was merged into the 4.4 branch.

Discussion
----------

Add wouterj as codeowner for Security related packages

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

This is what I've manually been doing since the 5.1 release. Now that I'm part of the Symfony mergers team, I would be happy to let GitHub ping important PRs for me automatically :)

_as 3.4 is closing the end of its maintenance lifetime, I think it'll save some merge conflicts to only add this in 4.4+_

Commits
-------

08c080600a Add wouterj as codeowner for Security related packages
2020-10-15 00:40:50 +02:00
Wouter de Jong
08c080600a Add wouterj as codeowner for Security related packages 2020-10-14 22:00:39 +02:00
Fabien Potencier
8c4ecc313b Bump Symfony version to 5.2.0 2020-10-14 21:27:47 +02:00
Fabien Potencier
546907b087
Merge pull request #38573 from fabpot/release-5.2.0-BETA2
released v5.2.0-BETA2
2020-10-14 21:22:41 +02:00
Fabien Potencier
0641541f34 Update VERSION for 5.2.0-BETA2 2020-10-14 21:22:19 +02:00
Fabien Potencier
1b4a2afabf Update CHANGELOG for 5.2.0-BETA2 2020-10-14 21:22:09 +02:00
Fabien Potencier
a428b011b3 feature #38552 [Security][Notifier] Added integration of Login Link with the Notifier component (wouterj)
This PR was squashed before being merged into the 5.x branch.

Discussion
----------

[Security][Notifier] Added integration of Login Link with the Notifier component

| Q             | A
| ------------- | ---
| Branch?       | 5.x (5.2 hopefully?)
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

This adds a `LoginLinkNotification` that uses the `NotificationEmail` and integrates with the notifier component. This makes it much easier to use the login link functionality, as it provides a default email and sms implementation.

```php
class AuthController extends AbstractController
{
    /** @Route("/login", name="login") */
    public function login(LoginLinkHandlerInterface $loginLinkHandler, UserRepository $userRepository, Request $request, NotifierInterface $notifier)
    {
        if (!$request->isMethod('POST')) {
            return $this->redirect('/');
        }

        $user = $userRepository->findOneBy(['email' => $request->get('email')]);
        if (!$user) {
            return new Response('User not found');
        }

        $loginLink = $loginLinkHandler->createLoginLink($user);
        $notifier->send(new LoginLinkNotification($loginLink, 'Welcome to ACME!'), new Recipient($user->getEmail()));

        return new Response('Login link send!');
    }

    /** @Route("/login/check", name="check_login") */
    public function loginCheck()
    {
        throw new \BadMethodCallException();
    }
}
```

![image](https://user-images.githubusercontent.com/749025/95884718-be9d0780-0d7c-11eb-88ff-36b6b3108ca6.png)

---

The `NotificationEmail` is slightly changed, to allow bypassing the logging-related functionality. Also, @weaverryan suggested to remove the "created by Symfony" footer as this email is meant to be sent to all users of a service.

Commits
-------

04ef565895 [Security][Notifier] Added integration of Login Link with the Notifier component
2020-10-14 20:49:35 +02:00
Wouter de Jong
04ef565895 [Security][Notifier] Added integration of Login Link with the Notifier component 2020-10-14 20:49:27 +02:00
Fabien Potencier
89dddd1770 bug #38516 [HttpFoundation] Fix Range Requests (BattleRattle)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Fix Range Requests

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

This PR fixes some deviations from [RFC 7233](https://tools.ietf.org/html/rfc7233) for handling range requests, mentioned in #38295.

- overlapping ranges are now satisfiable (e.g. when requested range end is larger than the file size)
- range units other than `bytes` will get ignored
- range requests for methods other than `GET` will be ignored

I did not manage yet to implement the support for multiple ranges, but also don't know, if that's needed here.

Commits
-------

681804ba1a [HttpFoundation] Fix Range Requests
2020-10-14 19:31:51 +02:00
Nicolas Grekas
ffbb9883bd Merge branch '5.1' into 5.x
* 5.1:
  [Contracts] add branch-aliases for dev-main
  [Cache] Make Redis initializers static
  [Messenger] Fixed typos in Connection
  [CI] Fixed build on AppVeyor
  Fix tests typo
  [Lock] Reset Key lifetime time before we acquire it
  [CI] Silence errors when remove file/dir on test tearDown()
  Fix tests
  Remove content-type check on toArray methods
2020-10-14 19:08:19 +02:00
Nicolas Grekas
3e587d7013 Merge branch '4.4' into 5.1
* 4.4:
  [Contracts] add branch-aliases for dev-main
  [Cache] Make Redis initializers static
  Fix tests typo
  [Lock] Reset Key lifetime time before we acquire it
  [CI] Silence errors when remove file/dir on test tearDown()
2020-10-14 18:43:39 +02:00
Norman Soetbeer
681804ba1a [HttpFoundation] Fix Range Requests 2020-10-14 18:38:26 +02:00
Nicolas Grekas
6ba6ae75e0 minor #38571 [Contracts] add branch-aliases for dev-main (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Contracts] add branch-aliases for dev-main

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

symfony/contracts is still using a "main" branch so we need to alias it for composer to know which version this maps to.

Commits
-------

969f3c217b [Contracts] add branch-aliases for dev-main
2020-10-14 18:24:00 +02:00
Nicolas Grekas
8553361a10 bug #38566 Fix minor issue when sharing windows between Limiters (Nyholm)
This PR was squashed before being merged into the 5.x branch.

Discussion
----------

Fix minor issue when sharing windows between Limiters

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

If I start using my custom Limiter, then change back to `FixedWindowLimiter`, then my cache might contain a value that `FixedWindowLimiter` does not support.

This PR makes sure that we handle such switch.

Commits
-------

e9ac9712d8 Fix minor issue when sharing windows between Limiters
2020-10-14 18:23:07 +02:00
Nyholm
e9ac9712d8 Fix minor issue when sharing windows between Limiters 2020-10-14 18:22:58 +02:00
Nicolas Grekas
969f3c217b [Contracts] add branch-aliases for dev-main 2020-10-14 17:23:35 +02:00
Fabien Potencier
2d5c2cf287 feature #38563 [Messenger][Redis] Adding support for lazy connect (Nyholm)
This PR was squashed before being merged into the 5.x branch.

Discussion
----------

[Messenger][Redis] Adding support for lazy connect

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #38558
| License       | MIT
| Doc PR        | Should be added

With inspiration from the CacheComponent. This PR makes it possible to make the connection to Redis only when you first use it.

Commits
-------

1d7c8013e6 [Messenger][Redis] Adding support for lazy connect
2020-10-14 16:11:47 +02:00
Nyholm
1d7c8013e6 [Messenger][Redis] Adding support for lazy connect 2020-10-14 16:11:38 +02:00
Fabien Potencier
a590e90698 minor #38567 [Cache] Make Redis initializers static (Nyholm)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] Make Redis initializers static

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

I am on very thin ice now. I saw a comment on similar code here: https://github.com/symfony/symfony/pull/38563#discussion_r504600024

These anonymous functions in the cache component could also be made static to avoid being connected to the object using the Redis trait.

Feel free to correct me if this does not make much sense.

Commits
-------

ad8de57b91 [Cache] Make Redis initializers static
2020-10-14 16:09:22 +02:00
Nyholm
ad8de57b91
[Cache] Make Redis initializers static 2020-10-14 13:43:26 +02:00
Fabien Potencier
674382b7ea bug #38553 [Lock] Reset Key lifetime time before we acquire it (Nyholm)
This PR was merged into the 4.4 branch.

Discussion
----------

[Lock] Reset Key lifetime time before we acquire it

| Q             | A
| ------------- | ---
| Branch?       | 5.1 (maybe lower, I'll check)
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #38541
| License       | MIT
| Doc PR        | n/a

Im out on somewhat deep water now. I am pretty sure we should reset the Key lifetime every time we acquire it. Without it it will me tricky to re-use a lock. (As pointed out by #38541)

@jderusse can you confirm.

Commits
-------

55ad70225a [Lock] Reset Key lifetime time before we acquire it
2020-10-14 11:40:34 +02:00
Fabien Potencier
4529e08433 minor #38555 [Messenger] Fixed typos in Amqp Connection (Nyholm)
This PR was submitted for the 5.x branch but it was merged into the 5.1 branch instead.

Discussion
----------

[Messenger] Fixed typos in Amqp Connection

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

Sorry for a small PR. When working with https://github.com/symfony/symfony-docs/pull/14404, I found a typo, then another one.. When I found 4 of them I decided to make a PR.

Commits
-------

5dec141afb [Messenger] Fixed typos in Connection
2020-10-14 11:38:18 +02:00
Nyholm
5dec141afb [Messenger] Fixed typos in Connection 2020-10-14 11:38:11 +02:00
Fabien Potencier
d235724d6d minor #38561 Fix tests typo (ScullWM)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix tests typo

| Q             | A
| ------------- | ---
| Branch?       | 4.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 #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

While working on PSR 16 cache tests, I found this small glitch in the mocked `isHit` method

Commits
-------

047ce05f6b Fix tests typo
2020-10-14 11:36:53 +02:00
Fabien Potencier
9f6d604b52 Fix test 2020-10-14 11:36:06 +02:00
Fabien Potencier
268e9e3f34 minor #38556 [CI] Fixed build on AppVeyor (Nyholm)
This PR was submitted for the 5.x branch but it was squashed and merged into the 5.1 branch instead.

Discussion
----------

[CI] Fixed build on AppVeyor

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      |
| New feature?  |
| Deprecations? |
| Tickets       |
| License       | MIT
| Doc PR        |

CI fails on AppVeyor with:

> There was 1 error:
>1) Symfony\Bridge\PhpUnit\Tests\DeprecationErrorHandler\ConfigurationTest::testBaselineFileWriteError
unlink(C:\Users\appveyor\AppData\Local\Temp\1\sf-38AF.tmp): Permission denied
>C:\projects\symfony\src\Symfony\Bridge\PhpUnit\Tests\DeprecationErrorHandler\ConfigurationTest.php:404
ERRORS!

We dont need to fail the tests if we cannot remove a file on `tearDown()`

Commits
-------

0c08432a3d [CI] Fixed build on AppVeyor
2020-10-14 11:34:46 +02:00
Nyholm
0c08432a3d [CI] Fixed build on AppVeyor 2020-10-14 11:34:34 +02:00
Fabien Potencier
9982713327 Merge branch '3.4' into 4.4
* 3.4:
  [CI] Silence errors when remove file/dir on test tearDown()
2020-10-14 11:30:35 +02:00
Fabien Potencier
9b2dcac5d3 minor #38560 [CI] Silence errors when remove file/dir on test tearDown() (Nyholm)
This PR was merged into the 3.4 branch.

Discussion
----------

[CI] Silence errors when remove file/dir on test tearDown()

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

Requested in #38556

Commits
-------

efef41faa1 [CI] Silence errors when remove file/dir on test tearDown()
2020-10-14 09:59:59 +02:00
Fabien Potencier
e9d23677a7 Merge branch '4.4' into 5.1
* 4.4:
  Fix tests
  Remove content-type check on toArray methods
2020-10-14 09:58:47 +02:00
Fabien Potencier
8430954bce bug #38559 [Lock] Reset lifetime on acquireRead() (Nyholm)
This PR was merged into the 5.x branch.

Discussion
----------

[Lock] Reset lifetime on acquireRead()

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

Same as #38553 but this is for `acquireRead()` instead of `acquire()`.

`acquireRead()` is new in 5.2.

Commits
-------

de412bf24b Reset lifetime on acquireRead()
2020-10-14 09:58:12 +02:00
Thomas P
047ce05f6b Fix tests typo 2020-10-14 09:37:02 +02:00