Commit Graph

128 Commits

Author SHA1 Message Date
Nicolas Grekas
581b439931 Merge branch '4.4' into 5.0
* 4.4: (26 commits)
  [HttpClient] NativeHttpClient should not send >1.1 protocol version
  [HttpClient] fix support for non-blocking resource streams
  [Mailer] Make sure you can pass custom headers to Mailgun
  [Mailer] Remove line breaks in email attachment content
  Update links to documentation
  [Validator] Add the missing translations for the Arabic (ar) locale
  ensure to expect no validation for the right reasons
  [Security-Guard] fixed 35203 missing name tag in param docblock
  [HttpClient] fix casting responses to PHP streams
  [PhpUnitBridge] Add test case for @expectedDeprecation annotation
  [PhpUnitBridge][SymfonyTestsListenerTrait] Remove $testsWithWarnings stack
  [Mailer] Fix addresses management in Sendgrid API payload
  [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API
  [Mailer][MailchimpBridge] Fix incorrect sender address when sender has name
  [HttpClient] fix capturing SSL certificates with NativeHttpClient
  Update year in license files
  [TwigBridge][Form] Added missing help messages in form themes
  Update year in license files
  Update year in license files
  fix version when "anonymous: lazy" was introduced
  ...
2020-01-04 15:08:26 +01:00
Nicolas Grekas
c000577edb Merge branch '4.3' into 4.4
* 4.3:
  [Mailer] Remove line breaks in email attachment content
  Update links to documentation
  [Validator] Add the missing translations for the Arabic (ar) locale
  ensure to expect no validation for the right reasons
  [PhpUnitBridge] Add test case for @expectedDeprecation annotation
  [PhpUnitBridge][SymfonyTestsListenerTrait] Remove $testsWithWarnings stack
  [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API
  [Mailer][MailchimpBridge] Fix incorrect sender address when sender has name
  [HttpClient] fix capturing SSL certificates with NativeHttpClient
  [TwigBridge][Form] Added missing help messages in form themes
  Update year in license files
  Update year in license files
  [HttpClient] fix typo
  [Console][FormatterHelper] Use helper strlen statically and remove duplicated code
  [Routing] Fix i18n routing when the url contains the locale
  Fix BC issue in phpDoc Reflection library
  [Translator] Performance improvement in MessageCatalogue and catalogue operations.
2020-01-04 14:00:46 +01:00
Jan Rosier
0d7a8bdd0a Update year in license files 2020-01-01 12:51:43 +01:00
Fabien Potencier
c147ef4bc7 Merge branch '4.4'
* 4.4:
  Fix CS
  Fix CS
  Fix CS
  [DependencyInjection][Xml] Fix the attribute 'tag' is not allowed in 'bind' tag
2019-12-01 09:49:37 +01:00
Fabien Potencier
c13974cc20 Merge branch '4.4' into 5.0
* 4.4:
  Fix CS
  Fix CS
  Fix CS
  [DependencyInjection][Xml] Fix the attribute 'tag' is not allowed in 'bind' tag
2019-12-01 09:48:26 +01:00
Fabien Potencier
9b10c167ef Merge branch '4.3' into 4.4
* 4.3:
  Fix CS
  Fix CS
2019-12-01 09:39:58 +01:00
Fabien Potencier
2c04fad016 Fix CS 2019-12-01 09:39:44 +01:00
Nicolas Grekas
1b4ab81085 Merge branch '5.0'
* 5.0:
  [Routing] fix tests
  [DI] minor cleanup
  [Form] group constraints when calling the validator
  Remove wrong @group legacy annotations
  [DependencyInjection] Fix dumping multiple deprecated aliases
  allow button names to start with uppercase letter
  Allow PHP ^7.2.5
  States that the HttpClient provides a Http Async implementation
  [Routing] Fix ContainerLoader and ObjectLoaderTest
  [HttpKernel] Make ErrorListener::onKernelException()'s dispatcher argument explicit
  [HttpKernel] Drop deprecated ExceptionListener
  Removed extra whitespace
  [Security] Fix best encoder not wired using migrate_from
2019-11-21 08:02:52 +01:00
Nicolas Grekas
6194c2a96c Allow PHP ^7.2.5 2019-11-18 18:27:11 +01:00
Fabien Potencier
e60a876201 updated version to 5.1 2019-11-17 19:31:35 +01:00
Nicolas Grekas
f2daa534b9 Merge branch '4.4'
* 4.4:
  [Console] Constant STDOUT might be undefined.
  Add missing conflict with symfony/serializer <4.4
  Allow returning null from NormalizerInterface::normalize
  bumped Symfony version to 4.4.0
  updated VERSION for 4.4.0-BETA1
  updated CHANGELOG for 4.4.0-BETA1
  [Security\Core] throw AccessDeniedException when switch user fails
  [Mime] fix guessing mime-types of files with leading dash
  [HttpFoundation] fix guessing mime-types of files with leading dash
  [VarExporter] fix exporting some strings
  [Cache] forbid serializing AbstractAdapter and TagAwareAdapter instances
  Use constant time comparison in UriSigner
2019-11-13 08:42:48 +01:00
Nicolas Grekas
ae3552685d Merge branch '4.3' into 4.4
* 4.3:
  [Console] Constant STDOUT might be undefined.
  Allow returning null from NormalizerInterface::normalize
  [Security\Core] throw AccessDeniedException when switch user fails
  [Mime] fix guessing mime-types of files with leading dash
  [HttpFoundation] fix guessing mime-types of files with leading dash
  [VarExporter] fix exporting some strings
  [Cache] forbid serializing AbstractAdapter and TagAwareAdapter instances
  Use constant time comparison in UriSigner
2019-11-13 08:39:40 +01:00
Nicolas Grekas
d446d7733a [VarExporter] fix exporting some strings 2019-11-11 13:48:54 +01:00
Nicolas Grekas
76776943cd Merge branch '4.4'
* 4.4:
  [Debug] remove return types that break FC badly
  [Mailer][MailchimpBridge] Don't send address names if empty string
  [ExpressionLanguage][Lexer] Exponential format for number
  [Mailer] Fix SES Message Id retrieval
  Add .gitignore to .gitattributes
2019-10-22 19:21:12 +02:00
Reedy
246c5fdf43 Add .gitignore to .gitattributes 2019-10-12 01:35:04 +01:00
Fabien Potencier
21d9320be2 Merge branch '4.4'
* 4.4:
  Adding .gitattributes to remove Tests directory from "dist"
  [Messenger] Don't deep merge routing.senders config option
2019-09-16 10:16:50 +02:00
Nyholm
ac7dc24bcb Adding .gitattributes to remove Tests directory from "dist" 2019-09-16 10:12:51 +02:00
Nicolas Grekas
7f2236f7bf Add more "object" return types 2019-08-26 18:20:41 +02:00
Nicolas Grekas
9ce1f02501 Merge branch '4.4'
* 4.4:
  Add more return types after fixing a typo in my script
2019-08-23 14:18:57 +02:00
Nicolas Grekas
65d942010c Add more return types after fixing a typo in my script 2019-08-23 14:16:45 +02:00
Nicolas Grekas
d400aeb4f5 Merge branch '4.4'
* 4.4:
  Add return types to internal & magic methods when possible
  fixed CSC
  Add Address::fromString
  [DomCrawler] Added Crawler::matches(), ::closest(), ::outerHtml()
2019-08-22 15:39:30 +02:00
Nicolas Grekas
962dcfeed0 Add return types to internal & magic methods when possible 2019-08-22 15:18:41 +02:00
Nicolas Grekas
a84a7f0206 Merge branch '4.4'
* 4.4:
  fix deps=low
  [VarExporter] fix support for PHP 7.4
  Use PHP 7.4 on deps=low
2019-08-22 10:40:55 +02:00
Nicolas Grekas
1981f06c88 Merge branch '4.3' into 4.4
* 4.3:
  fix deps=low
  [VarExporter] fix support for PHP 7.4
  Use PHP 7.4 on deps=low
2019-08-22 10:37:03 +02:00
Nicolas Grekas
1a036dc9ff [VarExporter] fix support for PHP 7.4 2019-08-22 09:33:08 +02:00
Alexander M. Turek
34eda04866 Added more parameter type declarations. 2019-08-21 17:16:25 +02:00
Nicolas Grekas
742b6b8508 Merge branch '4.4'
* 4.4:
  Replace warning by isolated test
  Fix deprecation in 4.4 branche
2019-08-08 22:54:27 +02:00
Nicolas Grekas
6888e702b9 Merge branch '4.3' into 4.4
* 4.3:
  Replace warning by isolated test
2019-08-08 22:52:24 +02:00
Nicolas Grekas
85c50119f1 Merge branch '3.4' into 4.3
* 3.4:
  Replace warning by isolated test
2019-08-08 22:52:04 +02:00
Nicolas Grekas
28ae698af3 Merge branch '4.4'
* 4.4:
  Fix compatibility with PHPUnit 8
  Disable phpunit typehint patch on 4.3 branch
  Fix deprecation on 4.3
2019-08-08 14:08:24 +02:00
Nicolas Grekas
32389f8b7f Merge branch '4.3' into 4.4
* 4.3:
  Disable phpunit typehint patch on 4.3 branch
  Fix deprecation on 4.3
2019-08-08 14:07:40 +02:00
Jérémy Derussé
8fd16a6bee
Fix deprecation on 4.3 2019-08-08 00:24:12 +02:00
Nicolas Grekas
d1ef28e7db Merge branch '4.4'
* 4.4:
  Fix tests
  Fix deprecated phpunit annotation
2019-08-02 15:12:48 +02:00
Nicolas Grekas
daa4e4020f Merge branch '4.3' into 4.4
* 4.3:
  Fix tests
  Fix deprecated phpunit annotation
2019-08-02 14:28:34 +02:00
Nicolas Grekas
1b56d7f04d Merge branch '3.4' into 4.3
* 3.4:
  Fix tests
  Fix deprecated phpunit annotation
2019-08-02 14:15:04 +02:00
Nicolas Grekas
f8ccc8105c Merge branch '4.4'
* 4.4: (43 commits)
  [PhpunitBridge] Read environment variable from superglobals
  [Bridge/PhpUnit] Fix PHP5.5 compat
  [PhpUnitBridge] More accurate grouping
  fixed CS
  [Form] remove comment about to-be-removed method as it is used in master by ButtonBuilder
  Extract unrecoverable exception to interface
  [FrameworkBundle] Fix calling Client::getProfile() before sending a request
  Fix type error
  [Security/Core] require libsodium >= 1.0.14
  [Workflow] re-add workflow.definition tag to workflow services
  [Security/Core] Don't use ParagonIE_Sodium_Compat
  revert #30525 due to performance penalty
  collect called listeners information only once
  [Lock] fix missing inherit docs in RedisStore
  [Messenger] fix retrying handlers using DoctrineTransactionMiddleware
  [Mailgun Mailer] fixed issue when using html body
  [Messenger] make all stamps final and mark stamp not meant to be sent
  [HttpClient] fix timing measurements with NativeHttpClient
  add return type declaration
  use proper return types in ErrorHandler and ArgumentResolver
  ...
2019-06-26 11:36:22 +02:00
Nicolas Grekas
55c0b02587 Merge branch '4.3' into 4.4
* 4.3: (34 commits)
  [PhpunitBridge] Read environment variable from superglobals
  [Bridge/PhpUnit] Fix PHP5.5 compat
  [PhpUnitBridge] More accurate grouping
  fixed CS
  Extract unrecoverable exception to interface
  [FrameworkBundle] Fix calling Client::getProfile() before sending a request
  Fix type error
  [Security/Core] require libsodium >= 1.0.14
  [Workflow] re-add workflow.definition tag to workflow services
  [Security/Core] Don't use ParagonIE_Sodium_Compat
  revert #30525 due to performance penalty
  collect called listeners information only once
  [Lock] fix missing inherit docs in RedisStore
  [Messenger] fix retrying handlers using DoctrineTransactionMiddleware
  [Mailgun Mailer] fixed issue when using html body
  [HttpClient] fix timing measurements with NativeHttpClient
  [HttpClient] fix dealing with 1xx informational responses
  add test to avoid regressions
  fix mirroring directory into parent directory
  fix typos
  ...
2019-06-26 11:30:56 +02:00
Tobias Schultze
18793b7ca7 feature #31996 [5.0] Add return types in final classes (dFayet)
This PR was merged into the 5.0-dev branch.

Discussion
----------

[5.0] Add return types in final classes

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes/no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | #31981
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

This is the first step for the issue #31981

I have some questions:

-  ~I have not added type for methods with `@inheritdoc` annotation, should I?~
- ~Don't we want to type also functions without `@return` annotation? (still in `final` classes)~
- ~If yes is the answer of the previous one, do we also want the `void` return type?~
- ~I have also added the return type in the `DependencyInjection` PhpDumper, but is it also wanted? (if yes, I will clean a bit the code changed)~
- ~Should we update the documentation's code samples when they display `final` classes?~

Todo:
- [x] Adjust the PR, following the answers of the questions
- [x] Add return type also when there is no `@return`, or with `@inheritdoc`
- [x] [src/Symfony/Component/Debug/ErrorHandler.php#L383](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Debug/ErrorHandler.php#L383) `@return` annotation is not correct according to the return, investigate and adjust if needed
- [x] [src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php#L50](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php#L50) `@return` annotation is not correct according to the return, investigate and adjust if needed
- [x] Do a PR on documentation to add return type on code snippets with final classes => unneeded as they were already typed

Commits
-------

ca5ae1989e Replace @return annotation by return type in final classes
2019-06-23 23:15:46 +01:00
dFayet
ca5ae1989e Replace @return annotation by return type in final classes 2019-06-23 00:57:33 +02:00
Fabien Potencier
3634390a27 Merge branch '4.2' into 4.3
* 4.2:
  Fix link to documentation
  [Validator] Use LogicException for missing Property Access Component in comparison constraints
2019-06-22 10:39:44 +02:00
Alex Nostadt
e0d2c58bc2 Fix link to documentation 2019-06-22 10:17:17 +02:00
Fabien Potencier
c449e6368c Merge branch '4.4'
* 4.4:
  fixed CS
  fixed CS
  fixed CS
  fixed CS
  Do not log or call the proxy function when the locale is the same
  Added missing required dependencies on psr/cache and psr/container in symfony/cache-contracts and symfony/service-contracts respectively.
  [HttpClient] fix closing debug stream prematurely
  [Mailer] made code more robust
  Restore compatibility with php 5.5
  fixed sender/recipients in SMTP Envelope
  collect called listeners information only once
  [HttpClient] add HttplugClient for compat with libs that need httplug v1 or v2
  [HttpKernel] Remove TestEventDispatcher.
2019-06-13 13:15:36 +02:00
Fabien Potencier
8787bbc94a Merge branch '4.3' into 4.4
* 4.3:
  fixed CS
  fixed CS
  fixed CS
  Do not log or call the proxy function when the locale is the same
  Added missing required dependencies on psr/cache and psr/container in symfony/cache-contracts and symfony/service-contracts respectively.
  [HttpClient] fix closing debug stream prematurely
  [Mailer] made code more robust
  Restore compatibility with php 5.5
  fixed sender/recipients in SMTP Envelope
  collect called listeners information only once
  [HttpKernel] Remove TestEventDispatcher.
2019-06-13 13:05:05 +02:00
Fabien Potencier
84bc7aba91 Merge branch '4.2' into 4.3
* 4.2:
  fixed CS
  fixed CS
  [HttpKernel] Remove TestEventDispatcher.
2019-06-13 13:01:17 +02:00
Fabien Potencier
37fa45bbd1 fixed CS 2019-06-13 12:57:15 +02:00
Nicolas Grekas
2dffc58aac Bump deps to ^4.4|^5.0 for Symfony 5.0 2019-05-28 20:01:02 +02:00
Nicolas Grekas
d94d9d792c Bump Symfony 5.0 to PHP 7.2 2019-05-28 18:49:20 +02:00
Nicolas Grekas
66924dba7c Merge branch '4.4'
* 4.4:
  Allow Symfony 5.0
2019-05-28 18:26:29 +02:00
Nicolas Grekas
384393cb36 Allow Symfony 5.0 2019-05-28 17:53:17 +02:00
Fabien Potencier
8869eb3521 updated version to 5.0 2019-05-28 14:18:42 +02:00
Fabien Potencier
387207f6c4 updated version to 4.4 2019-05-09 09:23:25 +02:00
Fabien Potencier
7e2fbe13c8 Merge branch '4.2'
* 4.2:
  fixed bad merge
  Show more accurate message in profiler when missing stopwatch
  CS Fixes: Not double split with one array argument
  [Serializer] Add default object class resolver
  Remove redundant animation prefixes
  Remove redundant `box-sizing` prefixes
  [VarExporter] support PHP7.4 __serialize & __unserialize
  Rework firewall access denied rule
  MetadataAwareNameConverter: Do not assume that property names are strings
  [VarExporter] fix exporting classes with private constructors
  fixed CS
  Fix missing $extraDirs when open_basedir returns
2019-04-10 21:42:49 +02:00
Nicolas Grekas
c7a504c822 [VarExporter] support PHP7.4 __serialize & __unserialize 2019-04-09 22:09:28 +02:00
Nicolas Grekas
e354d54e7e [VarExporter] fix exporting classes with private constructors 2019-04-08 20:04:40 +02:00
Fabien Potencier
51a359c079 Merge branch '4.2' into short-array-master
* 4.2:
  fixed CS
  fixed CS
  fixed tests
  fixed CS
  fixed CS
  fixed CS
  fixed short array CS in comments
  fixed CS in ExpressionLanguage fixtures
  fixed CS in generated files
  fixed CS on generated container files
  fixed CS on Form PHP templates
  fixed CS on YAML fixtures
  fixed fixtures
  switched array() to []
2019-01-16 22:53:39 +01:00
Fabien Potencier
d2098d7e5d fixed CS 2019-01-16 21:35:37 +01:00
Christian Flothmann
3860d685f4 Merge branch '4.2'
* 4.2:
  update years in license files
  Fix: Adjust DocBlock
  \"ParserTest->getParserTestData()\" -> only some more tests
  access the container getting it from the kernel
  Replace slave and master by replica and primary
  Fix erasing cookies issue
  [Lock] Pedantic improvements for lock
  [EventDispatcher] Fixed phpdoc on interface
  update year in license files
  [VarExporter] fix exporting array indexes
  [SecurityBundle] Fix traceable voters
  [Console] Fix help text for single command applications
  Fix random test failure on lock
  improve error message when using test client without the BrowserKit component
  Fixed minor typos in an error message
  [Event Dispatcher] fixed 29703: TraceableEventDispatcher reset now sets callStack to null with test to dispatch after reset.
  Fixed minor typos
  Fix: Method can also return null
  [Stopwatch] Fixed phpdoc for category name
2019-01-03 10:16:58 +01:00
Christian Flothmann
36110b1e95 update years in license files 2019-01-03 10:09:06 +01:00
Christian Flothmann
3c936f447b [VarExporter] fix exporting array indexes 2019-01-01 14:11:42 +01:00
Nicolas Grekas
df4ad4e7d4 Merge branch '4.2'
* 4.2: (27 commits)
  [VarExporter] dont call userland code with uninitialized objects
  Fix typos in doc blocks
  [Debug] ignore underscore vs backslash namespaces in DebugClassLoader
  [TwigBridge][Form] Prevent multiple rendering of form collection prototypes
  [FrameworkBundle] fix describing routes with no controllers
  [DI] move RegisterServiceSubscribersPass before DecoratorServicePass
  Update ValidationListener.php
  [Yaml] ensures that the mb_internal_encoding is reset to its initial value
  [Messenger] Restore message handlers laziness
  [WebLink] Fixed documentation link
  [Security] getTargetPath of TargetPathTrait must return string or null
  [Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument
  Optimize perf by replacing call_user_func with dynamic vars
  [Cache] Fix dsn parsing
  [Routing] fix dumping same-path routes with placeholders
  [WebProfilerBundle][TwigBundle] CSS fixes
  Add a docblock for FormFactoryInterface
  [Security] defer log message in guard authenticator
  [Validator] Added IBAN format for Vatican City State
  merge conflicts
  ...
2018-12-13 13:43:21 +01:00
Nicolas Grekas
f0cd2b2838 [VarExporter] dont call userland code with uninitialized objects 2018-12-13 08:48:06 +01:00
Nicolas Grekas
c7fe1b6bcb Merge branch '4.2'
* 4.2:
  [VarExporter] fix dumping private properties from abstract classes
  Fix empty output for debug:autowiring when reflection-docblock is not available
  [Workflow] Fixed BC break for Workflow metadata
  [Routing] ignore trailing slash for non-GET requests
2018-12-03 22:43:20 +00:00
Nicolas Grekas
b10e2638a4 [VarExporter] fix dumping private properties from abstract classes 2018-12-03 22:40:09 +00:00
Nicolas Grekas
79b661da9b Merge branch '4.2'
* 4.2:
  [Serializer] fixed DateTimeNormalizer to maintain microseconds when a different timezone required
  [Routing] fix taking verb into account when redirecting
  [TwigBundle] Sync tab navigation css
  [WebProfilerBundle] Fix log filter in dark mode
  [WebProfilerBundle][4.2] Deny messenger <4.2
  [DI] Fix dumping expressions accessing single-use private services
  [VarExporter] fix dumping protected property from abstract classes
  [WebProfilerBundle] Split form field heading
  Minor tweak for c3ad8a5
2018-12-02 14:25:44 +01:00
Nicolas Grekas
0132ba9dc5 [VarExporter] fix dumping protected property from abstract classes 2018-12-02 00:05:18 +01:00
Fabien Potencier
534b83f080 updated version to 4.3 2018-11-26 17:19:01 +01:00
Nicolas Grekas
46e2ecd5c8 [VarExporter] fix handling of __sleep() 2018-11-14 11:32:16 +01:00
Nicolas Grekas
fd74951405 Merge branch '4.1'
* 4.1:
  [Form] Hardened test suite for empty data
  Bump phpunit XSD version to 5.2
  [Fwb][EventDispatcher][HttpKernel] Fix getClosureScopeClass usage to describe callables
  Add required key attribute
2018-11-11 20:52:12 +01:00
Roland Franssen
d254004c26 [VarExporter] Cleanup unused var 2018-10-29 11:58:48 +01:00
Nicolas Grekas
d9bade0385 [VarExporter] add Instantiator::instantiate() to create+populate objects without calling their constructor nor any other methods 2018-09-18 17:22:26 +02:00
Nicolas Grekas
443bd119b1 [VarExporter] fix more edge cases 2018-09-11 10:35:53 +02:00
Nicolas Grekas
2c444927bc [VarExporter] throw component-specific exceptions 2018-09-10 10:23:43 +02:00
Nicolas Grekas
a5bf9b0445 [VarExporter] fix exporting final serializable classes extending internal ones 2018-09-09 17:25:49 +02:00
Nicolas Grekas
4cf1ae4e07 [VarExporter] minor CS tweak 2018-09-08 20:19:57 +02:00
Nicolas Grekas
4a16b6ca65 [VarExporter] fix exporting instances of final classes that extend internal ones 2018-09-08 19:59:25 +02:00
Nicolas Grekas
36e412fdfc [VarExporter] fix exporting objects that mutate on __sleep() 2018-09-05 15:34:16 +02:00
Nicolas Grekas
07e90d71d8 [VarExporter] optimize dumped code in time and space 2018-09-03 11:21:37 +02:00
Nicolas Grekas
7831ad75e5 [VarExporter] a new component to serialize values to plain PHP code 2018-08-27 18:34:07 +02:00