Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection widget prototype fix #29547

Closed
wants to merge 30 commits into from

Conversation

kagje
Copy link

@kagje kagje commented Dec 10, 2018

Q A
Branch? 4.2
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #29489
License MIT

When the form_div_layout.html.twig file is used for form theming, a collection widget will try to render its 'prototype' property, regardless of whether it has already been rendered elsewhere - this change fixes this behavior.

fancyweb and others added 30 commits October 23, 2018 11:56
* 4.2:
  Update PR template
  Fixes sprintf(): Too few arguments in Translator
  [Cache] fix deps
  updated CHANGELOG for 4.2.0-RC1
  bumped Symfony version to 4.1.9
  updated VERSION for 4.1.8
  updated CHANGELOG for 4.1.8
  bumped Symfony version to 3.4.20
  updated VERSION for 3.4.19
  updated CHANGELOG for 3.4.19
  [Console] Move back root exception to stack trace in verbose mode
* 4.2:
  [DI] fix combinatorial explosion when analyzing the service graph
  [Debug] workaround opcache bug mutating "$this" !?!
* 4.2:
  [Routing] fix trailing slash redirection
  calculate cache keys for property setters depending on the value
  updated VERSION for 2.8.48
  update CONTRIBUTORS for 2.8.48
  updated CHANGELOG for 2.8.48
* 4.2:
  typo
  [Messenger] Mention HandleTrait in UPGRADE-4.2.md file
  add a test case
  [Form] Handle all case variants of "nan" when parsing a number
* 4.2:
  [Routing] fix greediness of trailing slash
  bumped Symfony version to 4.2.1
  updated VERSION for 4.2.0
  updated CHANGELOG for 4.2.0
* 4.2:
  fix cs
  [FrameworkBundle] define doctrine as default_pdo_provider only if the package is installed
  [Validator] Allow `ConstraintViolation::__toString()` to expose codes that are not null or emtpy strings
  Added upgrade to HandlersLocator
  fix type for $value in DocBlock
  [WebProfilerBundle] Fix title case
  [Config] fix path exclusion during glob discovery
  [FrameworkBundle][Messenger] Restore check for messenger serializer default id
  Fix wrapped loop of event listener
  [DI] fix edge case in InlineServiceDefinitionsPass
  undeprecate the single-colon notation for controllers
  Update HttpKernel.php
…entering in the Workflow for the first time (lyrixx)

This PR was merged into the 4.3-dev branch.

Discussion
----------

[Workflow] Trigger `entered` event for subject entering in the Workflow for the first time

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

Commits
-------

388840f [Workflow] Trigger `entered` event for subject entering in the Workflow for the first time
…xtract()` method (andrey-helldar)

This PR was squashed before being merged into the 4.3-dev branch (closes symfony#29127).

Discussion
----------

[DomCrawler] Added return of element name in `extract()` method

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#10646

Situation: you need to get an array of keys and values.
The current package code does not allow this to be done easily.
The changes made to the code will allow you to return the required data set.
```php
use Symfony\Component\DomCrawler\Crawler;

$crawler = new Crawler($content);

$crawler
    ->filter('ItemsList > Item')
    ->each(function (Crawler $element) {
        $data = $element
            ->children()
            ->extract(['_name', '_text']);

        var_dump($data);
    });

// Result:
array:2 [
  0 => array:2 [
    0 => "id",
    1 => "1"
  ],
  1 => array:2 [
    0 => "title",
    1 => "Foo Bar"
  ]
]
```

Commits
-------

79162c1 [DomCrawler] Added return of element name in `extract()` method
This PR was squashed before being merged into the 4.3-dev branch (closes symfony#28976).

Discussion
----------

[DI] Add a "default" EnvProcessor

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

This PR add a new fallback env processor in order to return a default value when the primary processor is not able to fetch a value (env variable, file or key does not exists)

```
#
default_host: localhost
host: '%env(default:default_host:OPTIONAL_ENV_VARIABLE)%"

default_secret: this secret is not secret
secret: '%env(default:default_secret:file:THIS_FILE_ONLY_EXIST_IN_PRODUCTION)%"

default_charset: utf8
charset: '%env(default:default_charset:key:charset:json:DATABASE_CONFIG)%"
```

Commits
-------

aee4e33 [DI] Add a \"default\" EnvProcessor
…ty() (ro0NL)

This PR was squashed before being merged into the 4.3-dev branch (closes symfony#28858).

Discussion
----------

[DI] Deprecated using env vars with cannotBeEmpty()

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes-ish
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | symfony#28827
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Continuation of symfony#28838 for 4.2

Using environment variables for nodes marked `cannotBeEmpty()` is semantically not possible, we'll never know the value is empty yes/no during compile time. Neither we should assume one or another.

Commits
-------

397c19e [DI] Deprecated using env vars with cannotBeEmpty()
…sylfabre)

This PR was merged into the 4.3-dev branch.

Discussion
----------

[Validator] Checking a BIC along with an IBAN

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | symfony#28166
| License       | MIT
| Doc PR        | symfony/symfony-docs#10349

A BIC comes usually with an IBAN so it's better to check that they are associated. This PR provides an `iban` option to `Symfony\Component\Validator\Constraints\Bic` to check the BIC against an IBAN.

It also provides an `ibanPropertyPath` to retrieves the IBAN using the property accessor like with comparison constraints.

Commits
-------

bb6be15 [Validator] Checking a BIC along with an IBAN Fix symfony#28166
* 4.2:
  [DI] fix InlineServiceDefinitionsPass' fix
  [LDAP] Add TIMEOUT Option to LDAP Connection Options
This PR was merged into the 4.3-dev branch.

Discussion
----------

Add upgrade from 4.2 to 4.3

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Forgotten in symfony#28858 i guess. cc @nicolas-grekas

Commits
-------

ce6ecaf Add upgrade from 4.2 to 4.3
…classes as final (fancyweb)

This PR was merged into the 4.3-dev branch.

Discussion
----------

[Debug] Mark ErrorHandler and ExceptionHandler classes as final

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

The goal of marking this method final is to be able to change the argument signature to `\Throwable` in Symfony 5.0

We will then be able to convert the incoming `\Throwable` to `\ErrorException` thanks to the `FatalThrowableError` class.

The use case is when you use the `ExceptionHandler::register()` method of the `Debug` component with a custom `set_error_handler()` that don't handle this conversion. This is for example the case of the `Drupal` one.

Commits
-------

2a4e2e6 [Debug] Mark the ErrorHandler and ExceptionHandler classes as final
This PR was squashed before being merged into the 4.3-dev branch (closes symfony#29401).

Discussion
----------

[DI] Fix deps=low

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

 cc @nicolas-grekas

Commits
-------

e0d9502 [DI] Fix deps=low
* 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
* 4.2:
  [DI] dont inline when lazy edges are found
* 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
* 4.2:
  [TwigBridge] Deprecating legacy Twig paths in DebugCommand and simplifications
  [Cache] Fixed Memcached adapter doClear()to call flush()
  Fixes sprintf(): Too few arguments in Translator
  fix TransChoiceTokenParser deprecation message
  [DoctrineBridge] Conflict with Messenger <4.2
  [Contracts] extract LocaleAwareInterface out of TranslatorInterface
 A collection prototype that has already been rendered shouldn't be rendered again as this is deprecated since Symfony 4.2
@kagje
Copy link
Author

kagje commented Dec 10, 2018

Already done here: #29527

@kagje kagje deleted the collection-widget-prototype-fix branch December 10, 2018 13:19
@kagje kagje restored the collection-widget-prototype-fix branch December 10, 2018 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants