Commit Graph

106 Commits

Author SHA1 Message Date
Zmey
0412e91060 [SecurityBundle] Comma separated ips for security.access_control 2020-09-12 07:06:09 +02:00
Fabien Potencier
24af7dfb08 Fix CHANGELOG 2020-08-22 08:38:27 +02:00
Evgeny Anisiforov
109e0a9f1a [HttpFoundation] add support for X_FORWARDED_PREFIX header 2020-08-22 08:37:28 +02:00
Grégoire Pineau
50d5167a66 [HttpFoundation] Added File::getContent() 2020-07-07 13:52:54 +02:00
Nicolas Grekas
dd81e32ec1 [HttpFoundation] add HeaderUtils::parseQuery(): it does the same as parse_str() but preserves dots in variable names 2020-06-23 13:46:20 +02:00
azjezz
0a2ef70c04 [HttpFoundation] add InputBag 2020-04-13 21:20:37 +01:00
azjezz
011cd38974 [HttpFoundation] Add support for all core http control directives 2020-04-01 11:36:04 +01:00
Mathias Arlaud
1e1d332c7c Improve UnexcpectedSessionUsageException backtrace 2020-03-24 18:16:22 +01:00
Ahmed TAILOULOUTE
155d980aea [HttpFoundation][Cache] Added MarshallingSessionHandler 2020-02-23 23:33:06 +01:00
Ahmed TAILOULOUTE
11cef32ff7 [HttpFoundation] Make dependency on Mime component optional 2020-02-07 21:28:17 +01:00
Fabien Potencier
a2b6085d29 feature #35215 [HttpFoundation] added withers to Cookie class (ns3777k)
This PR was squashed before being merged into the 5.1-dev branch (closes #35215).

Discussion
----------

[HttpFoundation] added withers to Cookie class

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

I was quite descriptive in the issue :-)

The main idea is to get the interface for changing a cookie to avoid every unneeded argument in the constructor.

Current:

```php
$cookie = Cookie::create(
    RegionSwitcher::REGION_COOKIE, $regionSlug, new DateTime('+1 year'), '/',
    $baseDomain, null, false
);
```

This PR:

```php
$cookie = Cookie::create('foo')
            ->withValue('bar')
            ->withExpiresTime(strtotime('Fri, 20-May-2011 15:25:52 GMT'))
            ->withDomain('.myfoodomain.com')
            ->withSecure(true);
```

Every `wither` returns a copy of current cookie with requested setting set. Cookie class remains immutable.

Commits
-------

549afaab17 [HttpFoundation] added withers to Cookie class
2020-01-30 16:43:43 +01:00
Nikita Safonov
549afaab17 [HttpFoundation] added withers to Cookie class 2020-01-30 16:43:37 +01:00
Loïck Piera
7f2cef759c
Add support for safe preference - RFC8674 2020-01-07 23:59:55 +01:00
Fabien Potencier
ebb13e7c99 Deprecate *Response::create() methods 2019-12-03 07:30:08 +01:00
Nicolas Grekas
3aa2a770b8 Merge branch '4.4' into 5.0
* 4.4: (28 commits)
  bug #34554 [HttpClient] Fix early cleanup of pushed HTTP/2 responses (lyrixx)
  Fix tests
  [Console] Fix commands description with numeric namespaces
  [HttpFoundation] Fixed typo
  [DI] Skip unknown method calls for factories in check types pass
  [EventDispatcher] Better error reporting when arguments to dispatch() are swapped
  improve upgrade instructions for twig.exception_controller configuration
  [HttpFoundation] Update CHANGELOG for PdoSessionHandler BC BREAK in 4.4
  [Serializer] CsvEncoder::NO_HEADERS_KEY ignored when used in constructor
  [Form] Keep preferred_choices order for choice groups
  [Debug] work around failing chdir() on Darwin
  [PhpUnitBridge] Read configuration CLI directive
  [DI] Missing test on YamlFileLoader
  Revert "minor #34608 [Process] add tests for php executable finder if file does not exist (ahmedash95)"
  Simpler example for Apache basic auth workaround
  [Console] Fix trying to access array offset on value of type int
  [Config] Remove extra sprintf arg
  [HttpKernel] fix typo
  [HttpKernel] Support typehint to deprecated FlattenException in controller
  Add preview mode support for Html and Serializer error renderers
  ...
2019-11-28 15:20:16 +01:00
Quentin Favrie
eda4d68f7d [HttpFoundation] Update CHANGELOG for PdoSessionHandler BC BREAK in 4.4 2019-11-28 12:41:49 +01:00
Nicolas Grekas
2a1a266573 Merge branch '4.4'
* 4.4:
  [Messenger] Fixed bad event dispatcher mocks.
  [Workflow] Simplified EventDispatcherMock.
  [Routing] revert the return type for UrlGeneratorInterface::generate to remove null
  [HttpFoundation] Add a way to anonymize IPs
2019-11-09 09:06:17 +01:00
Jordi Boggiano
9e62330bc4
[HttpFoundation] Add a way to anonymize IPs 2019-11-08 18:11:01 +01:00
Fabien Potencier
5dc29c402f Merge branch '4.4'
* 4.4:
  [HttpFoundation][FrameworkBundle] allow configuring the session handler with a DSN
  [Validator] Add AutoMapping constraint to enable or disable auto-validation
  [DI] Fix "!tagged" related upgrade/changelog notes
2019-10-30 11:44:38 +01:00
Nicolas Grekas
de9c61f423 [HttpFoundation][FrameworkBundle] allow configuring the session handler with a DSN 2019-10-30 10:56:04 +01:00
Nicolas Grekas
4036357150 Merge branch '4.4'
* 4.4:
  some backports from master
  Add return types to internal|final|private methods
  [HttpFoundation] Precalculate session expiry timestamp
2019-08-20 18:53:57 +02:00
azjezz
066000afa2 [HttpFoundation] Precalculate session expiry timestamp
Co-authored-by: Benjamin Cremer <b.cremer@shopware.com>
Co-authored-by: Rob Frawley 2nd <rmf@src.run>
2019-08-19 10:02:10 +01:00
Nicolas Grekas
2a9359d4a0 Merge branch '4.4'
* 4.4:
  [HttpFoundation] deprecate using $first in get and added key in all
2019-08-08 20:20:00 +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
Amrouche Hamza
2c5a8f1bdf [HttpFoundation] deprecate using $first in get and added key in all 2019-08-08 20:14:46 +02:00
Nicolas Grekas
b11129fb47 Merge branch '4.4'
* 4.4:
  Improve some URLs
  cleanup remaining param  and internal Intl FulLTransformer
  [HttpClient] fix data loss when streaming as a PHP resource
  Fix test compatibility with 4.x components
  [Cache] cs fix
2019-08-08 17:17:03 +02:00
Nicolas Grekas
bf73bd4942 Merge branch '4.3' into 4.4
* 4.3:
  Improve some URLs
  Fix test compatibility with 4.x components
  [Cache] cs fix
2019-08-08 17:13:31 +02:00
Nicolas Grekas
fdf6fc349c Merge branch '3.4' into 4.3
* 3.4:
  Improve some URLs
  Fix test compatibility with 4.x components
  [Cache] cs fix
2019-08-08 17:11:33 +02:00
Arman Hosseini
fab17a4487 Improve some URLs 2019-08-08 17:01:12 +02:00
Nicolas Grekas
155cfb273f Merge branch '4.4'
* 4.4: (33 commits)
  [DI] fix processing of regular parameter bags by MergeExtensionConfigurationPass
  [FrameworkBundle] reset cache pools between requests
  [HttpFoundation] Accept must take the lead for Request::getPreferredFormat()
  [FrameworkBundle] Allow to use the BrowserKit assertions with Panther and API Platform's test client
  Use ConnectionRegistry instead of RegistryInterface.
  Fixes windows error
  Improving the request/response format autodetection
  [Messager] Simplified MessageBus::__construct()
  [WIP][Mailer] Overwrite envelope sender and recipients from config
  [Messenger] Added more test for MessageBus
  [Mime] Updated some PHPDoc contents
  [PropertyAccess] Adds entries to CHANGELOG and UPGRADE
  fixed typo
  [FrameworkBundle] Simplified some code in the DI configuration
  [Filesystem] added missing deprecations to UPGRADE-4.3.md
  [Filesystem] depreacte calling isAbsolutePath with a null
  Fix authentication for redis transport
  only decorate when an event dispatcher was passed
  [Messenger] Added support for auto trimming of redis streams
  [FrmaeworkBundle] More simplifications in the DI configuration
  ...
2019-07-04 15:54:52 +02:00
Grégoire Pineau
f82e28c533 [HttpFoundation] Deprecated ApacheRequest 2019-07-01 10:07:19 +02:00
Yonel Ceruto
7b99fb45bb Removed legacy code and cleanup 2019-06-25 20:29:20 +02:00
Nicolas Grekas
39622488bb Remove deprecated code paths that trigger a runtime notice 2019-06-09 16:44:48 +02:00
dFayet
59fa1bd127 [HTTP Foundation] Deprecate passing argument to method Request::isMethodSafe() 2019-06-05 03:45:23 +02:00
Valentin
388d8f548c [Routing] UrlHelper to get absolute URL for a path 2019-04-07 11:24:57 +02:00
Fabien Potencier
f527acfac7 Merge branch '4.2'
* 4.2: (45 commits)
  [Form] various minor fixes
  Ensure the parent process is always killed
  bugfix: the terminal state was wrong and not reseted
  [Console] Fix inconsistent result for choice questions in non-interactive mode
  Define null return type for Constraint::getDefaultOption()
  [Routing] Fix: annotation loader ignores method's default values
  [HttpKernel] Fix DebugHandlersListener constructor docblock
  Skip Glob brace test when GLOB_BRACE is unavailable
  bumped Symfony version to 4.2.6
  updated VERSION for 4.2.5
  updated CHANGELOG for 4.2.5
  bumped Symfony version to 3.4.25
  updated VERSION for 3.4.24
  update CONTRIBUTORS for 3.4.24
  updated CHANGELOG for 3.4.24
  [EventDispatcher] cleanup
  fix testIgnoredAttributesInContext
  Re-generate icu 64.1 data
  Improve PHPdoc / IDE autocomplete for config tree builder
  [Bridge][Twig] DebugCommand - fix escaping and filter
  ...
2019-04-06 16:04:46 +02:00
Fabien Potencier
4f91020c8d added PHPUnit assertions in various components 2019-04-01 18:52:57 +02: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
Oskar Stark
8b5c5ed587 use behavior instead of behaviour 2019-03-25 08:48:46 +01:00
Robin Chalas
a44f19c5f1 [HttpFoundation] Add missing changelog/upgrade notes 2019-01-20 19:14:21 +01:00
Tobias Schultze
397ed83c3c Revert "[HttpFoundation] Adds getAcceptableFormats() method for Request"
This reverts commit 8a127ea34a.
2018-10-31 18:20:23 +01:00
Mathias STRASSER
6413dcbe75 [Security] add port in access_control 2018-10-10 03:31:51 -07:00
Nicolas Grekas
9493cfd5f2 [HttpFoundation] make cookies auto-secure when passing them $secure=null + plan to make it and samesite=lax the defaults in 5.0 2018-09-20 08:41:35 +02:00
Nicolas Grekas
c67f2aa291 Merge branch '4.1'
* 4.1:
  [HttpFoundation] Remove support for legacy and risky HTTP headers
2018-08-01 10:41:47 +02:00
Nicolas Grekas
bde8a7fca4 Merge branch '4.0' into 4.1
* 4.0:
  [HttpFoundation] Remove support for legacy and risky HTTP headers
2018-08-01 10:41:27 +02:00
Nicolas Grekas
45d6729ddc Merge branch '3.4' into 4.0
* 3.4:
  [HttpFoundation] Remove support for legacy and risky HTTP headers
2018-08-01 10:38:58 +02:00
Nicolas Grekas
768abbfe64 Merge branch '2.8' into 3.4
* 2.8:
  [HttpFoundation] Remove support for legacy and risky HTTP headers
2018-08-01 10:38:11 +02:00
Nicolas Grekas
e447e8b921 [HttpFoundation] Remove support for legacy and risky HTTP headers 2018-07-31 23:38:46 +02:00
Andrei Igna
8a127ea34a [HttpFoundation] Adds getAcceptableFormats() method for Request 2018-06-19 13:26:24 +02:00
Christian Schmidt
b435e80cae [HttpFoundation] Add HeaderUtility class 2018-04-20 16:29:33 +02:00