Skip to content

Commit f4090c3

Browse files
committed
Merge branch '6.3' into 6.4
* 6.3: [Standards] Update code guidelines Update asset_mapper.rst
2 parents 85f82ec + 6c0b18e commit f4090c3

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

contributing/code/standards.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,14 @@ Structure
190190
191191
* Exception and error messages must start with a capital letter and finish with a dot ``.``;
192192

193+
* Exception, error and deprecation messages containing a class name must
194+
use ``get_debug_type()`` instead of ``::class`` to retrieve it:
195+
196+
.. code-block:: diff
197+
198+
- throw new \Exception(sprintf('Command "%s" failed.', $command::class));
199+
+ throw new \Exception(sprintf('Command "%s" failed.', get_debug_type($command)));
200+
193201
* Do not use ``else``, ``elseif``, ``break`` after ``if`` and ``case`` conditions
194202
which return or throw something;
195203

frontend/asset_mapper.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ This *can* work with importmaps, but it should *not* be used for critical CSS
391391
that needs to be loaded before the page is rendered because the browser
392392
won't download the CSS until the JavaScript file executed.
393393

394-
However, if you *do* want to lazily-load a CSS file, you an make this work
394+
However, if you *do* want to lazily-load a CSS file, you can make this work
395395
by using the ``importmap:require`` command and pointing it at a CSS file.
396396

397397
.. code-block:: terminal

0 commit comments

Comments
 (0)