This PR was merged into the 4.4 branch.
Discussion
----------
[WebProfilerBundle] Clean time.js
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
The `classnames` property was removed in https://github.com/symfony/symfony/pull/33535.
Commits
-------
997ca70385 [WebProfilerBundle] Clean time.js
This PR was merged into the 4.4 branch.
Discussion
----------
Adding .gitattributes to remove Tests directory from "dist"
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| Deprecations? | no?
| Tickets |
| License | MIT
| Doc PR |
This is a controversial topic that have been mentioned before. We recently had some discussions on Slack about it and the community not in an agreement. This was asked back in 2014 already.
Im making this PR again, because I think this will help more people than it hurts to keep the tests in the "dist" version.
### Reasons for keeping the tests with the source
* You can look at the tests to understand how the code works
* It is convenient
In the past there were an argument of people might depend on Symfony's classes in Tests. That is no longer the case since we moved reusable classes from Tests to Test.
### Reasons for removing them (merging this PR)
* There should be difference between `composer update --prefer-source` and `composer update --prefer-dist`
* Smaller packages when deploying with Docker or on Serverless.
* Static analysis tools will not complain on PHP syntax errors in our tests ([example](https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/xml_with_wrong_ext.php))
## How to decide?
Merging this PR or not is tricky because no side has a solid technical argument. It is basically just personal preference. Please give this PR a 👍 or 👎 if you want to give your opinion.
## Other PRs and issues related to this:
Add .gitattributes file (https://github.com/symfony/symfony/pull/29277)
Added .gitattributes files to root and all components (https://github.com/symfony/symfony/pull/26472)
Exclude non-essential files from Composer package (https://github.com/symfony/symfony/issues/25414)
[HttpFoundation] optimize files for distribution (https://github.com/symfony/symfony/pull/24427)
Add .gitattributes files (https://github.com/symfony/symfony/pull/23926)
[Suggestion] Adding .gitattributes to ignore unnecessary folders and files for production env (https://github.com/symfony/symfony/issues/20057)
Add lightweight and root only .gitattributes (https://github.com/symfony/symfony/pull/18004)
Add .gitattributes to exclude tests from ZIPs (https://github.com/symfony/symfony/pull/17995)
[RFC] Move tests out of the source and source out of the tests (https://github.com/symfony/symfony/issues/17749)
Removal of development & testing files using .gitattributes (https://github.com/symfony/symfony/issues/16174)
Please add .gitattributes files and fix line endings (https://github.com/symfony/symfony/issues/13521)
making use of .gitattributes (https://github.com/symfony/symfony/issues/11810)
## Workarounds
There are workarounds for both sides. Example:
### Workaround if merged
* `composer update --prefer-source`
### Workaround if closed
* `find vendor/symfony -name "Tests" -type d -exec rm -r "{}" \;`
* https://github.com/editorconfig/editorconfig/issues/228
* https://github.com/dg/composer-cleaner
Commits
-------
ac7dc24bcb Adding .gitattributes to remove Tests directory from "dist"
* 4.3:
fixed "link" to Contracts packages
[WebProfilerBundle] Fix time panel legend buttons
Fixed cache pools affecting each other due to an overwritten seed variable
properly catch legacy tag syntax usages
This PR was merged into the 4.4 branch.
Discussion
----------
add parameter type declarations to private methods
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
1b2aaa4a06 add parameter type declarations to private methods
This PR was merged into the 4.4 branch.
Discussion
----------
Ensure $request->hasSession() is always checked before calling getSession()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
7b2c326719 Ensure $request->hasSession() is always checked before calling getSession()
* 4.3:
[Security/Core] align defaults for sodium with PHP 7.4
fix inline handling when dumping tagged values
[HttpClient] fix canceling responses in a streaming loop
[Messenger] Flatten collection of stamps collected by the traceable middleware
[PropertyAccess] Fix PropertyAccessorCollectionTest
[HttpClient] rewind stream when using Psr18Client
Typo in web profiler
[4.3] Remove dead test fixtures
[Routing] Fix CHANGELOG
relax some date parser patterns
Avoid getting right to left style
* 4.2:
fix inline handling when dumping tagged values
[Messenger] Flatten collection of stamps collected by the traceable middleware
[PropertyAccess] Fix PropertyAccessorCollectionTest
Typo in web profiler
relax some date parser patterns
Avoid getting right to left style
* 3.4:
fix inline handling when dumping tagged values
[PropertyAccess] Fix PropertyAccessorCollectionTest
Typo in web profiler
relax some date parser patterns
Avoid getting right to left style
This PR was merged into the 3.4 branch.
Discussion
----------
[WebProfileBundle] Avoid getting right to left style
| Q | A
| ------------- | ---
| Branch? | >= 3.4 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- 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.
-->
Commits
-------
162819fef3 Avoid getting right to left style
This PR was merged into the 4.4 branch.
Discussion
----------
[WebProfilerBundle] mark all classes as internal
| 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? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets |
| License | MIT
| Doc PR |
those classes are not meant as extension point
Commits
-------
35b0d57692 [WebProfilerBundle] mark all classes as internal
This PR was squashed before being merged into the 4.4 branch (closes#32470).
Discussion
----------
Rename ErrorCatcher to ErrorRenderer (rendering part only)
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Follow up https://github.com/symfony/symfony/pull/32377
Commits
-------
fb5b0429b2 Rename ErrorCatcher to ErrorRenderer (rendering part only)
* 4.3: (26 commits)
Fix Twig 1.x compatibility
[Translator] Improve farsi(persian) translations for Form
Improve fa translations
Spell "triggering" properly
Added tests to cover the possibility of having scalars as services.
fixed tests on old PHP versions
[FrameworkBundle] Inform the user when save_path will be ignored
fixed CS
[SecurityBundle] Fix profiler dump for non-invokable security listeners
fixed CS
[Messenger] Doctrine Transport: Support setting auto_setup from DSN
[Translator] Load plurals from po files properly
[Serializer]: AbstractObjectNormalizer ignores the property types of discriminated classes
[EventDispatcher] Add tag kernel.rest on 'debug.event_dispatcher' service
[Console] Update to inherit and add licence
Add missing test for workflow dump description
[Intl] Remove --dev from intl compile autoloader
[Messenger] fix publishing headers set on AmqpStamp
Remove call to deprecated method
[Intl] Init compile tmp volume
...
* 4.2:
Fix Twig 1.x compatibility
[Translator] Improve farsi(persian) translations for Form
Improve fa translations
Added tests to cover the possibility of having scalars as services.
fixed tests on old PHP versions
[FrameworkBundle] Inform the user when save_path will be ignored
fixed CS
[Translator] Load plurals from po files properly
[Serializer]: AbstractObjectNormalizer ignores the property types of discriminated classes
[EventDispatcher] Add tag kernel.rest on 'debug.event_dispatcher' service
[Console] Update to inherit and add licence
[Intl] Remove --dev from intl compile autoloader
Remove call to deprecated method
[Intl] Init compile tmp volume
PHP 5 compat
Add test case
Update Request.php
Don't assume port 0 for X-Forwarded-Port
Load plurals from mo files properly
* 3.4:
Fix Twig 1.x compatibility
[Translator] Improve farsi(persian) translations for Form
Improve fa translations
Added tests to cover the possibility of having scalars as services.
fixed tests on old PHP versions
[FrameworkBundle] Inform the user when save_path will be ignored
fixed CS
[Translator] Load plurals from po files properly
[EventDispatcher] Add tag kernel.rest on 'debug.event_dispatcher' service
[Console] Update to inherit and add licence
[Intl] Remove --dev from intl compile autoloader
[Intl] Init compile tmp volume
PHP 5 compat
Add test case
Update Request.php
Don't assume port 0 for X-Forwarded-Port
Load plurals from mo files properly
When using a custom router that inject GET parameters, eg:
```
# services.yaml
parameters:
# Replace default url generator service
router.options.generator_base_class: Combodo\iTop\Portal\Routing\UrlGenerator
```
The path generated by the toolbar JS is HTML entity encoded which breaks the JS call (`&` becomes `&`).
This PR was squashed before being merged into the 4.4 branch (closes#31876).
Discussion
----------
[WebProfilerBundle] Add clear button to ajax tab
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31839
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
For pages that have been open for a long time, the profiler ajax tab can start filling up fast. In #31839 the request to allow the history to be cleared with one click.
The reason why I did not align the button to the right, is because after looking at the other tabs. None of them had items that were aligned to the right. Moved the addEventListener above the ajax tab logic to keep the code consistent.
Ps. Please be nice, this is my first contribution 🍰
<!--
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.
-->
Commits
-------
6bff4db6d3 [WebProfilerBundle] Add clear button to ajax tab
* 4.3:
[github] Implement the new security policy.
[Finder] fix wrong method call casing
Make tempfile path unique
minor: fix phpdocs in the ldap component
[Process] Fix infinite waiting for stopped process
Use absolute URL for when the profiler's domain differs from the controller's domain which initialises the profiler.
fix phpdoc
[DI] fix using bindings with locators of service subscribers
* 4.2:
[github] Implement the new security policy.
[Finder] fix wrong method call casing
Make tempfile path unique
minor: fix phpdocs in the ldap component
[Process] Fix infinite waiting for stopped process
Use absolute URL for when the profiler's domain differs from the controller's domain which initialises the profiler.
fix phpdoc
[DI] fix using bindings with locators of service subscribers
* 3.4:
[github] Implement the new security policy.
[Finder] fix wrong method call casing
Make tempfile path unique
minor: fix phpdocs in the ldap component
[Process] Fix infinite waiting for stopped process
Use absolute URL for when the profiler's domain differs from the controller's domain which initialises the profiler.
fix phpdoc
[DI] fix using bindings with locators of service subscribers
This PR was merged into the 3.4 branch.
Discussion
----------
[WebProfilerBundle] Use absolute URL for profiler links
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | n/a
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Generate absolute URL's so you can have a different (sub)domain for the profiler and the controller that uses it.
Also uses the link which the controller generated instead of always generating a new link in Twig. The changes shouldn't inpact normal behavior.
Commits
-------
13ee1fa2b7 Use absolute URL for when the profiler's domain differs from the controller's domain which initialises the profiler.
* 4.3: (23 commits)
minor: add some test in the ldap component
[Workflow] Update MethodMarkingStore
[Bridge\ProxyManager] isProxyCandidate() does not take into account interfaces
adding experimental note
[HttpClient] add missing argument check
[Messenger] Fix undefined index on read timeout
[Workflow] use method marking store
[Routing][AnnotationClassLoader] fix utf-8 encoding in default route name
fixed a phpdoc
[Debug] Wrap call to require_once in a try/catch
[EventDispatcher] Removed "callable" type hint from WrappedListener constructor
prevent deprecation when filesize matches error code
[PropertyInfo] Add missing documentation link in Readme
Use the current working dir as default first arg in 'link' binary
Respect parent class contract in ContainerAwareDoctrineEventManager
[WebProfilerBundle][Form] The form data collector return serialized object when profiler bundle attends object
[Validator] Add the missing translations for the Danish ("da") locale
[PropertyAccess] Add missing property to PropertyAccessor
[Cache] fix saving unrelated keys in recursive callback calls
[Serializer] Fix denormalization of object with variadic constructor typed argument
...
* 4.2:
[Console] Fix auto-complete for ChoiceQuestion (multi-select answers)
Translated form, security, validators resources into Belarusian (be)
[WebProfilerBundle] Don't filter submitted IP values
[Intl] Cleanup
bumped Symfony version to 4.2.9
updated VERSION for 4.2.8
updated CHANGELOG for 4.2.8
bumped Symfony version to 3.4.28
updated VERSION for 3.4.27
update CONTRIBUTORS for 3.4.27
updated CHANGELOG for 3.4.27
* 3.4:
[Console] Fix auto-complete for ChoiceQuestion (multi-select answers)
Translated form, security, validators resources into Belarusian (be)
[WebProfilerBundle] Don't filter submitted IP values
bumped Symfony version to 3.4.28
updated VERSION for 3.4.27
update CONTRIBUTORS for 3.4.27
updated CHANGELOG for 3.4.27
* 4.2:
Fix url matcher edge cases with trailing slash
[Form] Fix author tag + exception messages
[TwigBridge] Fix deprecation on twig 2.9
Fix left-associative ternary deprecation warnings for PHP 7.4
[Validator] Fixed imprecise translations
[Validator] Add Dutch translations
[Security] Cleanup "Digest nonce has expired." translation
Intercept redirections only for HTML format
[PhpUnitBridge] fix reading phpunit.xml on bootstrap
resolve class name parameters
Fix name and phpdoc of ContainerBuilder::removeBindings
[Intl] Update the ICU data to 64.2
* 3.4:
[Form] Fix author tag + exception messages
[TwigBridge] Fix deprecation on twig 2.9
[Validator] Fixed imprecise translations
[Validator] Add Dutch translations
Intercept redirections only for HTML format
Fix name and phpdoc of ContainerBuilder::removeBindings
[Intl] Update the ICU data to 64.2
* 4.2:
Catch empty deprecation.log silently (fixes#31050)
minor: the meaning of the data breach was not correct
Optimize SVGs
property normalizer should also pass format and context to isAllowedAttribute
* 3.4:
minor: the meaning of the data breach was not correct
Optimize SVGs
property normalizer should also pass format and context to isAllowedAttribute
* 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
* 3.4:
Show more accurate message in profiler when missing stopwatch
CS Fixes: Not double split with one array argument
Remove redundant animation prefixes
Remove redundant `box-sizing` prefixes
Rework firewall access denied rule
fixed CS
Fix missing $extraDirs when open_basedir returns
This PR was squashed before being merged into the 3.4 branch (closes#31059).
Discussion
----------
Show more accurate message in profiler when missing stopwatch
| Q | A
| ------------- | ---
| Branch? | 3.4+
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31056
| License | MIT
| Doc PR | ~
This adds a message to the profiler if the stopwatch component is not installed, instead of suggesting to check if debug is enabled (even if it is enabled).
I had to add a method in the collector to expose the value collected, which in theory adds a feature. Is there perhaps a way to expose this collected data _without_ a "BC break"? I don't think it breaks anything, though it does make the dependencies on the http-kernel a bit strict. The other solution is to ignore if it's null and only act if it's a boolean (feature detection).
Commits
-------
326aa86d6a Show more accurate message in profiler when missing stopwatch