Commit Graph

247 Commits

Author SHA1 Message Date
Fabien Potencier 7e1a7b753e minor #35297 Improve upgrading instructions for deprecated router options (flack)
This PR was merged into the 4.4 branch.

Discussion
----------

Improve upgrading instructions for deprecated router options

See https://github.com/symfony/symfony/pull/30249#issuecomment-572976926

| 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       | #30249
| License       | MIT
| Doc PR        |

Commits
-------

2cc708341e Improve upgrading instructions for deprecated router options
2020-01-11 08:31:01 +01:00
Robin Chalas 36e6ceaeb7 Merge branch '4.3' into 4.4
* 4.3:
  Avoid stale-if-error if kernel.debug = true, because it hides errors
  [Console] Fix SymfonyQuestionHelper tests sometimes failing on AppVeyor
  [Workflow] Fix configuration node reference for "initial_marking"
  expand listener in place
  [DI] deferred exceptions in ResolveParameterPlaceHoldersPass
2020-01-10 22:54:01 +01:00
flack 2cc708341e Improve upgrading instructions for deprecated router options
See https://github.com/symfony/symfony/pull/30249#issuecomment-572976926
2020-01-10 15:12:13 +01:00
Javier Spagnoletti 452f92540b [Workflow] Fix configuration node reference for "initial_marking" 2020-01-09 17:48:41 -03:00
Nicolas Grekas 80cd480254 Merge branch '4.3' into 4.4
* 4.3:
  [Debug] fix ClassNotFoundFatalErrorHandler
  [Routing] Fix using a custom matcher & generator dumper class
  [Dotenv] Fixed infinite loop with missing quote followed by quoted value
  [HttpClient] Added missing sprintf
  [TwigBridge] button_widget now has its title attr translated even if its label = null or false
  [PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script
  [Messenger] Added check if json_encode succeeded
  [Security] Prevent canceled remember-me cookie from being accepted
  [FrameworkBundle][TranslationUpdateCommand] Do not output positive feedback on stderr
  [Security\Guard] Fix missing typehints
2020-01-08 18:29:02 +01:00
Quentin CURTET a3d90bece1 Docs - Update debug section of UPGRADE guides for 4.4 and 5.0 versions. 2019-12-18 22:36:53 +01:00
Fabien Potencier 4d11bca474 bug #34627 [Security/Http] call auth listeners/guards eagerly when they "support" the request (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security/Http] call auth listeners/guards eagerly when they "support" the request

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #34614, Fix #34679
| License       | MIT
| Doc PR        | -

This fixes the form authenticator linked to #34614.
Since laziness is here to provide compatibility with HTTP caching, it should be disabled when the request cannot be cached.

Tests don't pass yet, but I'm on the path to something here.

The PR now introduces a new `AbstractListener` that splits the handling logic in two:
- `supports(Request): ?bool` is always called eagerly and tells whether the listener matches the request for an earger call or a lazy call
- `authenticate(RequestEvent)` does the rest of the job when `supports()` allows so - lazily or not depending on the return value of `supports()`.

Of course, this remains compatible with non-lazy logics, see `AbstractListener::__invoke()`.

Commits
-------

b20ebe6b90 [Security/Http] call auth listeners/guards eagerly when they "support" the request
2019-11-30 10:56:08 +01:00
Nicolas Grekas b20ebe6b90 [Security/Http] call auth listeners/guards eagerly when they "support" the request 2019-11-30 10:49:41 +01:00
Nicolas Grekas 8d22819443 minor #34582 [HttpFoundation] Update CHANGELOG for PdoSessionHandler BC BREAK in 4.4 (tseho)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] Update CHANGELOG for PdoSessionHandler BC BREAK in 4.4

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

As explained in https://github.com/symfony/symfony/issues/34491, there was a BC BREAK between 4.3 and 4.4, when using `PdoSessionHandler` with MySQL, where the column `sess_lifetime` was modified from `MEDIUMINT` to `INTEGER UNSIGNED`.

This PR updates `UPGRADE-4.4.md` with a suggested query for updating the database accordingly.

Commits
-------

eda4d68f7d [HttpFoundation] Update CHANGELOG for PdoSessionHandler BC BREAK in 4.4
2019-11-28 12:41:55 +01:00
Quentin Favrie eda4d68f7d [HttpFoundation] Update CHANGELOG for PdoSessionHandler BC BREAK in 4.4 2019-11-28 12:41:49 +01:00
Lynn 78ff806b77 has_roles should be is_granted in upgrade files 2019-11-25 15:04:18 +01:00
Nicolas Grekas 12f00e3e15 Merge branch '4.3' into 4.4
* 4.3:
  allow button names to start with uppercase letter
2019-11-19 13:20:06 +01:00
Christian Flothmann d811b0e9b5 allow button names to start with uppercase letter 2019-11-19 08:55:12 +01:00
Thomas Calvet a247d319b9 Sync UPGRADE-5.0 before beta 2019-11-12 12:06:16 +01:00
Yonel Ceruto d1bf1cada4 [ErrorHandler] help finish the PR 2019-11-12 10:04:13 +01:00
Nicolas Grekas 6c9157bbc2 [ErrorHandler] merge and remove the ErrorRenderer component 2019-11-10 18:54:30 +01:00
Nicolas Grekas 6f67f0e0c0 [HttpKernel] make ExceptionEvent able to propagate any throwable 2019-11-10 10:37:33 +01:00
Nicolas Grekas 13dd18c8a6 feature #31587 [Routing][Config] Allow patterns of resources to be excluded from config loading (tristanbes)
This PR was merged into the 4.4 branch.

Discussion
----------

[Routing][Config] Allow patterns of resources to be excluded from config loading

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

The PR will fix the following RFC: #31516

Like resource loading for services, this PR offers a way to exclude patterns of resources like:

```yml
// config/routes/annotations.yaml
controllers:
    resource: ../../src/Controller/*
    type: annotation
    exclude: '../src/Controller/{DebugEmailController}.php'
```

All the annotation routes inside `Controller/` will be loaded in this example except all the one present inside the `Controller/DebugEmailController.php`

Commits
-------

332ff8811c [Routing][Config] Allow patterns of resources to be excluded from config loading
2019-11-04 11:53:20 +01:00
Robin Chalas 81b9c3c682 [DI] Fix "!tagged" related upgrade/changelog notes 2019-10-29 21:21:43 +01:00
Robin Chalas 6712d1e504 [Security] Allow to set a fixed algorithm 2019-10-27 13:32:13 +01:00
Tristan Bessoussa 332ff8811c [Routing][Config] Allow patterns of resources to be excluded from config loading 2019-10-24 13:56:35 +02:00
Nicolas Grekas 8e16143256 [FrameworkBundle] Dont reset the test container but the real one instead 2019-10-23 09:54:59 +02:00
Nicolas Grekas fdb9181d67 Remove legacy changelog lines 2019-10-15 15:33:13 +02:00
Yonel Ceruto 928363c408 Keeping backward compatibility with legacy FlattenException usage 2019-10-09 19:29:06 -04:00
Grégoire Pineau e95fa0113e Merge remote-tracking branch 'origin/4.3' into 4.4
* origin/4.3:
  [Workflow] Fixed BC break on WorkflowInterface
2019-10-03 18:33:25 +02:00
Grégoire Pineau 1eb10b996a [Workflow] Fixed BC break on WorkflowInterface 2019-10-03 18:20:08 +02:00
Jan Schädlich 98c4f6a06c [Console] Command::execute() should always return int - deprecate returning null
- added deprecation message for non-int return value in Command::execute()
- fixed all core commands to return proper int values
- added proper return type-hint to Command::execute() method in all core Commands
2019-10-02 16:44:58 +02:00
Pierre du Plessis b4de582c18
Add note about deprecating the XmlEncoder::TYPE_CASE_ATTRIBUTES constant in the upgrade guide 2019-10-02 11:08:22 +02:00
M. Vondano f3406338e6 [Console] Deprecate abbreviating hidden command names using Application->find() 2019-09-28 17:00:54 +02:00
Amrouche Hamza e169e1a4d5 [FrameworkBundle] WebTestCase KernelBrowser::getContainer null return type 2019-09-27 12:05:31 +02:00
Nicolas Grekas fc78e200db Merge branch '4.3' into 4.4
* 4.3:
  [FrameworkBundle] Fix framework bundle lock configuration not working as expected
  [Validator] Add the missing translations for the Azerbaijani locale
  [HttpClient] workaround bad Content-Length sent by old libcurl
  [Cache] dont override native Memcached options
  Fix CS
  Fix exceptions (PDOException) error code type
  Fix return type of Process::restart().
  [Cache] fail gracefully when locking is not supported
  [HttpClient] fix race condition when reading response with informational status
  Names for buttons should start with lowercase
2019-09-27 00:09:58 +02:00
Fabien Potencier d04fdee000 bug #32335 [Form] Names for buttons should start with lowercase (mcfedr)
This PR was merged into the 4.3 branch.

Discussion
----------

[Form] Names for buttons should start with lowercase

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

This fix changes the messages related to the changes in https://github.com/symfony/symfony/pull/28969 - the message used to state that names should start with a letter, a digit ... - so I got a confusing message:

```
Using names for buttons that do not start with a letter, a digit, or an underscore is deprecated since Symfony 4.3 and will throw an exception in 5.0 ("Search" given).'
```

Which made me find the message, look at the regex that was used, and work out that actually it should start with a lowercase letter, and hence this PR - where I assume there is a reason that the name must start with lowercase letters.

Commits
-------

f65524e4e0 Names for buttons should start with lowercase
2019-09-25 21:19:30 +02:00
Christian Flothmann eceb0e595c tweak deprecation messages and changelog 2019-09-25 10:01:37 +02:00
Javier Eguiluz 8532d62c5f Fixed a minor typo in the UPGRADE to 5.0 guide 2019-09-24 15:52:36 +02:00
Grégoire Pineau e767bb1b42 Revert \"feature #33507 [WebProfiler] Deprecated intercept_redirects in 4.4 (dorumd)\" 2019-09-23 17:45:34 +02:00
Dorel Mardari 514c736924 [WebProfiler] Deprecated intercept_redirects in 4.4 2019-09-16 21:21:02 +02:00
Yonel Ceruto 586f299ebd deprecated not passing dash symbol (-) to STDIN commands 2019-09-07 09:00:46 -04:00
Alexander M. Turek 0b08040459 [Validator] Deprecated CacheInterface in favor of PSR-6. 2019-09-05 14:29:38 +02:00
Yonel Ceruto b79532ab0e Add ErrorController to preview and render errors 2019-09-02 17:02:21 -04:00
Fabien Potencier 545d38a037 feature #33319 Allow configuring class names through methods instead of class parameters in Doctrine extensions (alcaeus)
This PR was merged into the 4.4 branch.

Discussion
----------

Allow configuring class names through methods instead of class parameters in Doctrine extensions

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

While removing class parameters for DoctrineBundle 2.0 (see https://github.com/doctrine/DoctrineBundle/issues/630), I noticed that the DoctrineExtension still requires them. This PR adds a new method that keeps legacy behaviour, but will dropped in Symfony 5. Extending classes (mainly DoctrineBundle and DoctrineMongoDBBundle) must implement this method themselves to return the appropriate class names instead of declaring them as class parameters in their service configuration. I'll create a separate for the master branch to make this method abstract in 5.0.

The cache driver class names are not being replaced in this PR, as we're dropping support for `doctrine/cache` in DoctrineBundle 2.0. A separate PR will be created to handle those deprecations and to clean up the code.

Commits
-------

b53d8ccfc1 [DoctrineBridge] Allow configuring class names through methods instead of class parameters
2019-08-27 09:59:14 +02:00
Andreas Braun b53d8ccfc1
[DoctrineBridge] Allow configuring class names through methods instead of class parameters 2019-08-27 09:49:29 +02:00
Alexander M. Turek a0ca3afeca Deprecate returning non-boolean values from checkCredentials(). 2019-08-23 20:43:33 +02:00
Nicolas Grekas f499083f78 feature #33258 [HttpKernel] deprecate global dir to load resources from (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] deprecate global dir to load resources from

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

Replaces #31958

Here two example deprecations by adding files in the deprecated locations:
```
Overwriting the resource "@AcmeBundle/Resources/config/routing.yaml" with "/vagrant/src/Resources/AcmeBundle/config/routing.yaml" is deprecated since Symfony 4.4 and will be removed in 5.0.
Loading the file "foobar.yaml" from the global resource directory "/vagrant/src" is deprecated since Symfony 4.4 and will be removed in 5.0.
```

Commits
-------

aa82566f76 [HttpKernel] deprecate global dir to load resources from
2019-08-21 17:04:54 +02:00
Christian Flothmann e6b6a9d33a deprecate support for null locales 2019-08-21 10:16:47 +02:00
Tobias Schultze aa82566f76 [HttpKernel] deprecate global dir to load resources from 2019-08-21 00:57:10 +02:00
Nicolas Grekas 32e0a25200 feature #32845 [HttpKernel][FrameworkBundle] Add alternative convention for bundle directories (yceruto)
This PR was squashed before being merged into the 4.4 branch (closes #32845).

Discussion
----------

[HttpKernel][FrameworkBundle] Add alternative convention for bundle directories

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/32453
| License       | MIT
| Doc PR        | TODO

We already know that bundles must be compatible with many Symfony's versions, so it is very likely that current bundles won't be able to use this feature soon, unless they create symbolic links to support both structures.

The point is that this is already happening, so in the future when our bundles stop to support <=4.3 then you'll be sure to change the current directory structure.

We have recently added the `getPublicDir()` method in https://github.com/symfony/symfony/pull/31975, here I'm removing it in favor of hardcoding a new convention.

I've added some functional tests in which I've changed everything to this structure:
```
-- ModernBundle
   |-- config/
   |-- public/
   |-- src/
       |-- ModernBundle.php
   |-- templates/
   |-- translations/
```
WDYT?

Commits
-------

6996e1cbe2 [HttpKernel][FrameworkBundle] Add alternative convention for bundle directories
2019-08-13 15:29:11 +02:00
Yonel Ceruto 6996e1cbe2 [HttpKernel][FrameworkBundle] Add alternative convention for bundle directories 2019-08-13 15:29:02 +02:00
Jérémy Derussé 56d5d6d0e6
Add deprecation for method signature 2019-08-09 10:19:49 +02:00
Fabien Potencier 8c255923d8 feature #32598 [FrameworkBundle][Routing] Private service route loaders (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle][Routing] Private service route loaders

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

Continuation of https://github.com/symfony/symfony/pull/30926.

~Please review only the 2nd commit, I'm building this on top of https://github.com/symfony/symfony/pull/32582.~

Commits
-------

64aa2c8529 [FrameworkBundle][Routing] Private service route loaders
2019-08-09 08:48:02 +02:00
Nicolas Grekas 29dbbe1b2d feature #32122 [HttpFoundation] deprecate HeaderBag::get() returning an array and add all($key) instead (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] deprecate HeaderBag::get() returning an array and add all($key) instead

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

<!--
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):
 - 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 4.4.
 - Legacy code removals go to the master branch.
-->

the $first param has been deprecated in the get methid
and we are adding a $key parameter to all to get all values from a key as arrays
Do we deprecated the get method ? if so this will be a little bigger in terms of changes.

Commits
-------

2c5a8f1bdf [HttpFoundation] deprecate using $first in get and added key in all
2019-08-08 20:15:43 +02:00