Skip to content

Proofread UPGRADE guide #54533

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

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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`
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure whether we should classify this as a BC BREAK or not. Technically, if you now handled this in an exception handler your code will be broken. On the other hand, anything that has proper handling now and was an error before is often called a feature.


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

SecurityBundle
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