Skip to content

Commit ec79213

Browse files
committed
Merge branch '6.1' into 6.2
* 6.1: [Intl] Add Scripts & Languages links [Filesystem] Fix check path methods [Filesystem] Add type hints readlink() [ErrorHandler] Add return type hints [HttpKernel] Add return type for handle method
2 parents cb9cd89 + dca2685 commit ec79213

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

components/filesystem.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ systems (unlike PHP's :phpfunction:`readlink` function)::
221221

222222
Its behavior is the following::
223223

224-
public function readlink($path, $canonicalize = false)
224+
public function readlink(string $path, bool $canonicalize = false): ?string
225225

226226
* When ``$canonicalize`` is ``false``:
227227
* if ``$path`` does not exist or is not a link, it returns ``null``.
@@ -399,8 +399,8 @@ as necessary::
399399
echo Path::makeRelative('/var/www/project/config/config.yaml', '/var/www/project/uploads');
400400
// => ../config/config.yaml
401401

402-
Use :method:`Symfony\\Component\\Filesystem\\Path::makeAbsolute` and
403-
:method:`Symfony\\Component\\Filesystem\\Path::makeRelative` to check whether a
402+
Use :method:`Symfony\\Component\\Filesystem\\Path::isAbsolute` and
403+
:method:`Symfony\\Component\\Filesystem\\Path::isRelative` to check whether a
404404
path is absolute or relative::
405405

406406
Path::isAbsolute('C:\Programs\PHP\php.ini')

components/http_kernel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ that system::
6767
Request $request,
6868
int $type = self::MAIN_REQUEST,
6969
bool $catch = true
70-
);
70+
): Response;
7171
}
7272

7373
Internally, :method:`HttpKernel::handle() <Symfony\\Component\\HttpKernel\\HttpKernel::handle>` -

components/intl.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ This component provides the following ICU data:
4444
Language and Script Names
4545
~~~~~~~~~~~~~~~~~~~~~~~~~
4646

47-
The ``Languages`` class provides access to the name of all languages
47+
The :class:`Symfony\\Component\\Intl\\Languages` class provides access to the name of all languages
4848
according to the `ISO 639-1 alpha-2`_ list and the `ISO 639-2 alpha-3 (2T)`_ list::
4949

5050
use Symfony\Component\Intl\Languages;
@@ -96,7 +96,7 @@ You may convert codes between two-letter alpha2 and three-letter alpha3 codes::
9696

9797
$alpha2Code = Languages::getAlpha2Code($alpha3Code);
9898

99-
The ``Scripts`` class provides access to the optional four-letter script code
99+
The :class:`Symfony\\Component\\Intl\\Scripts` class provides access to the optional four-letter script code
100100
that can follow the language code according to the `Unicode ISO 15924 Registry`_
101101
(e.g. ``HANS`` in ``zh_HANS`` for simplified Chinese and ``HANT`` in ``zh_HANT``
102102
for traditional Chinese)::

controller/error_pages.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ contents, create a new Normalizer that supports the ``FlattenException`` input::
220220

221221
class MyCustomProblemNormalizer implements NormalizerInterface
222222
{
223-
public function normalize($exception, string $format = null, array $context = [])
223+
public function normalize($exception, string $format = null, array $context = []): array
224224
{
225225
return [
226226
'content' => 'This is my custom problem normalizer.',
@@ -231,7 +231,7 @@ contents, create a new Normalizer that supports the ``FlattenException`` input::
231231
];
232232
}
233233

234-
public function supportsNormalization($data, string $format = null, array $context = [])
234+
public function supportsNormalization($data, string $format = null, array $context = []): bool
235235
{
236236
return $data instanceof FlattenException;
237237
}

0 commit comments

Comments
 (0)