Skip to content

Commit

Permalink
minor #54533 Proofread UPGRADE guide (wouterj)
Browse files Browse the repository at this point in the history
This PR was merged into the 7.1 branch.

Discussion
----------

Proofread UPGRADE guide

| Q             | A
| ------------- | ---
| Branch?       | 7.1
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        | -
| License       | MIT

Feature-freeze is upon us, so here is a new proofread of the UPGRADE guide. It seems like we didn't introduce many deprecations this time. I've scanned all CHANGELOG files to find missing items.

Commits
-------

3f7c344 Proofread UPGRADE guide
  • Loading branch information
fabpot committed Apr 17, 2024
2 parents 508f316 + 3f7c344 commit b0724ba
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 3 deletions.
85 changes: 84 additions & 1 deletion UPGRADE-7.1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,38 @@
UPGRADE FROM 7.0 to 7.1
=======================

Symfony 7.1 is a minor release. According to the Symfony release process, there should be no significant
backward compatibility breaks. Minor backward compatibility breaks are prefixed in this document with
`[BC BREAK]`, make sure your code is compatible with these entries before upgrading.
Read more about this in the [Symfony documentation](https://symfony.com/doc/7.1/setup/upgrade_minor.html).

If you're upgrading from a version below 7.0, follow the [7.0 upgrade guide](UPGRADE-7.0.md) first.

Table of Contents
-----------------

Bundles

* [FrameworkBundle](#FrameworkBundle)
* [SecurityBundle](#SecurityBundle)
* [TwigBundle](#TwigBundle)

Bridges

* [DoctrineBridge](#DoctrineBridge)

Components

* [AssetMapper](#AssetMapper)
* [Cache](#Cache)
* [DependencyInjection](#DependencyInjection)
* [ExpressionLanguage](#ExpressionLanguage)
* [Form](#Form)
* [Intl](#Intl)
* [PropertyInfo](#PropertyInfo)
* [Translation](#Translation)
* [Workflow](#Workflow)

AssetMapper
-----------

Expand All @@ -9,7 +41,7 @@ AssetMapper
Cache
-----

* Deprecate `CouchbaseBucketAdapter`, use `CouchbaseCollectionAdapter` instead
* Deprecate `CouchbaseBucketAdapter`, use `CouchbaseCollectionAdapter` with Couchbase 3 instead

DependencyInjection
-------------------
Expand All @@ -27,14 +59,65 @@ ExpressionLanguage
* Deprecate passing `null` as the allowed variable names to `ExpressionLanguage::lint()` and `Parser::lint()`,
pass the `IGNORE_UNKNOWN_VARIABLES` flag instead to ignore unknown variables during linting

Form
----

* Deprecate not configuring the `default_protocol` option of the `UrlType`, it will default to `null` in 8.0 (the current default is `'http'`)

FrameworkBundle
---------------

* Mark classes `ConfigBuilderCacheWarmer`, `Router`, `SerializerCacheWarmer`, `TranslationsCacheWarmer`, `Translator` and `ValidatorCacheWarmer` as `final`
* Deprecate the `router.cache_dir` config option, the Router will always use the `kernel.build_dir` parameter

Intl
----

* [BC BREAK] Extracted `EmojiTransliterator` to a separate `symfony/emoji` component, the new FQCN is `Symfony\Component\Emoji\EmojiTransliterator`.
You must install the `symfony/emoji` component if you're using the old `EmojiTransliterator` class in the Intl component.

Mailer
------

* Postmark's "406 - Inactive recipient" API error code now results in a `PostmarkDeliveryEvent` instead of throwing a `HttpTransportException`

PropertyInfo
------------

* Deprecate the `Type` class, use `Symfony\Component\TypeInfo\Type` class of `symfony/type-info` component instead

*Before*
```php
use Symfony\Component\PropertyInfo\Type;

// bool
$boolType = new Type(LegacyType::BUILTIN_TYPE_BOOL);
// bool|null
$nullableType = new Type(LegacyType::BUILTIN_TYPE_BOOL, nullable: true);
// array<int, string|null>
$arrayType = new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING, true));

$arrayType->getBuiltinType(); // returns "array"
$arrayType->getCollectionKeyTypes(); // returns an array with an "int" Type instance
$arrayType->getCollectionValueTypes()[0]->isNullable(); // returns true
```

*After*
```php
use Symfony\Component\TypeInfo\Type;

// bool
$boolType = Type::bool();
// bool|null
$nullableType = Type::nullable(Type::bool());
// array<int, string|null>
$arrayType = Type::array(Type::nullable(Type::string()), Type::int());

(string) $arrayType->getBaseType(); // returns "array"
$arrayType->getCollectionKeyType(); // returns an "int" Type instance
$arrayType->getCollectionValueType()->isNullable(); // returns true
```

* Deprecate `PropertyTypeExtractorInterface::getTypes()`, use `PropertyTypeExtractorInterface::getType()` instead

HttpKernel
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Clock/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CHANGELOG
7.1
---

* Add `DatePoint::get/setMicrosecond()`
* Add `DatePoint::getMicrosecond()` and `DatePoint::setMicrosecond()`

6.4
---
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Form/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CHANGELOG
---

* Add option `separator` to `ChoiceType` to use a custom separator after preferred choices (use the new `separator_html` option to display the separator text as HTML)
* Deprecate not configuring the `default_protocol` option of the `UrlType`, it will default to `null` in 8.0
* Deprecate not configuring the `default_protocol` option of the `UrlType`, it will default to `null` in 8.0 (the current default is `'http'`)
* Add a `keep_as_list` option to `CollectionType`
* Add a new `model_type` option to `MoneyType`, to be able to cast the transformed value to `integer`

Expand Down

0 comments on commit b0724ba

Please sign in to comment.