Skip to content

Commit afdae72

Browse files
committed
cms@a69fb94
Finish 4.13.0
1 parent 38361a0 commit afdae72

File tree

2 files changed

+284
-0
lines changed

2 files changed

+284
-0
lines changed

docs/.artifacts/cms/4.x/console-commands.md

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,6 +1376,206 @@ $ php craft on
13761376
The system is now online.
13771377
```
13781378

1379+
## `pc`
1380+
1381+
Alias of project-config.
1382+
1383+
<h3 id="pc-apply">
1384+
<a href="#pc-apply" class="header-anchor">#</a>
1385+
<code>pc/apply</code>
1386+
</h3>
1387+
1388+
1389+
Applies project config file changes.
1390+
1391+
<h4 id="pc-apply-options" class="command-subheading">Options</h4>
1392+
1393+
1394+
--force
1395+
: Whether every entry change should be force-applied.
1396+
1397+
1398+
--quiet
1399+
: Whether to reduce the command output.
1400+
1401+
1402+
1403+
<h3 id="pc-diff">
1404+
<a href="#pc-diff" class="header-anchor">#</a>
1405+
<code>pc/diff</code>
1406+
</h3>
1407+
1408+
1409+
Outputs a diff of the pending project config YAML changes.
1410+
1411+
<h4 id="pc-diff-options" class="command-subheading">Options</h4>
1412+
1413+
1414+
--invert
1415+
: Whether to treat the loaded project config as the source of truth, instead of the YAML files.
1416+
1417+
1418+
1419+
<h3 id="pc-export">
1420+
<a href="#pc-export" class="header-anchor">#</a>
1421+
<code>pc/export</code>
1422+
</h3>
1423+
1424+
1425+
Exports the entire project config to a single file.
1426+
1427+
<h4 id="pc-export-parameters" class="command-subheading">Parameters</h4>
1428+
1429+
path
1430+
: The path the project config should be exported to.
1431+
Can be any of the following:
1432+
1433+
- A full file path
1434+
- A folder path (export will be saved in there with a dynamically-generated name)
1435+
- A filename (export will be saved in the working directory with the given name)
1436+
- Blank (export will be saved in the working directly with a dynamically-generated name)
1437+
1438+
1439+
1440+
<h4 id="pc-export-options" class="command-subheading">Options</h4>
1441+
1442+
1443+
--external
1444+
: Whether to pull values from the project config YAML files instead of the loaded config.
1445+
1446+
1447+
--overwrite
1448+
: Whether to overwrite an existing export file, if a specific file path is given.
1449+
1450+
1451+
1452+
<h3 id="pc-get">
1453+
<a href="#pc-get" class="header-anchor">#</a>
1454+
<code>pc/get</code>
1455+
</h3>
1456+
1457+
1458+
Outputs a project config value.
1459+
1460+
Example:
1461+
```
1462+
php craft project-config/get system.edition
1463+
```
1464+
1465+
The “path” syntax used here may be composed of directory and filenames (within your `config/project` folder), YAML object keys (including UUIDs for many Craft resources), and integers (referencing numerically-indexed arrays), joined by a dot (`.`): `path.to.nested.array.0.property`.
1466+
1467+
<h4 id="pc-get-parameters" class="command-subheading">Parameters</h4>
1468+
1469+
path
1470+
: The config item path
1471+
1472+
1473+
1474+
<h4 id="pc-get-options" class="command-subheading">Options</h4>
1475+
1476+
1477+
--external
1478+
: Whether to pull values from the project config YAML files instead of the loaded config.
1479+
1480+
1481+
1482+
<h3 id="pc-rebuild">
1483+
<a href="#pc-rebuild" class="header-anchor">#</a>
1484+
<code>pc/rebuild</code>
1485+
</h3>
1486+
1487+
1488+
Rebuilds the project config.
1489+
1490+
<h3 id="pc-remove">
1491+
<a href="#pc-remove" class="header-anchor">#</a>
1492+
<code>pc/remove</code>
1493+
</h3>
1494+
1495+
1496+
Removes a project config value.
1497+
1498+
Example:
1499+
```
1500+
php craft project-config/remove some.nested.key
1501+
```
1502+
1503+
::: danger
1504+
This should only be used when the equivalent change is not possible through the control panel or other Craft APIs. By directly modifying project config values, you are bypassing all validation and can easily destabilize configuration.
1505+
:::
1506+
1507+
As with [set](#project-config-set), removing values only updates the root `dateModified` key when using the [`--update-timestamp` flag](#project-config-set-options). If you do not include this flag, you must run `project-config/touch` before changes will be detected or applied in other environments!
1508+
1509+
<h4 id="pc-remove-parameters" class="command-subheading">Parameters</h4>
1510+
1511+
path
1512+
: The config item path
1513+
1514+
1515+
1516+
<h3 id="pc-set">
1517+
<a href="#pc-set" class="header-anchor">#</a>
1518+
<code>pc/set</code>
1519+
</h3>
1520+
1521+
1522+
Sets a project config value.
1523+
1524+
Example:
1525+
```
1526+
php craft project-config/set some.nested.key
1527+
```
1528+
1529+
See [get](#project-config-get) for the accepted key formats.
1530+
1531+
::: danger
1532+
This should only be used when the equivalent change is not possible through the control panel or other Craft APIs. By directly modifying project config values, you are bypassing all validation and can easily destabilize configuration.
1533+
:::
1534+
1535+
Values are updated in the database *and* in your local YAML files, but the root `dateModified` project config property is only touched when using the [`--update-timestamp` flag](#project-config-set-options). If you do not update the timestamp along with the value, the change may not be detected or applied in other environments!
1536+
1537+
<h4 id="pc-set-parameters" class="command-subheading">Parameters</h4>
1538+
1539+
path
1540+
: The config item path
1541+
1542+
value
1543+
: The config item value as a valid YAML string
1544+
1545+
1546+
1547+
<h4 id="pc-set-options" class="command-subheading">Options</h4>
1548+
1549+
1550+
--force
1551+
: Whether every entry change should be force-applied.
1552+
1553+
1554+
--message
1555+
: A message describing the changes.
1556+
1557+
1558+
--update-timestamp
1559+
: Whether the `dateModified` value should be updated
1560+
1561+
1562+
1563+
<h3 id="pc-touch">
1564+
<a href="#pc-touch" class="header-anchor">#</a>
1565+
<code>pc/touch</code>
1566+
</h3>
1567+
1568+
1569+
Updates the `dateModified` value in `config/project/project.yaml`, attempting to resolve a Git conflict for it.
1570+
1571+
<h3 id="pc-write">
1572+
<a href="#pc-write" class="header-anchor">#</a>
1573+
<code>pc/write</code>
1574+
</h3>
1575+
1576+
1577+
Writes out the currently-loaded project config as YAML files to the `config/project/` folder, discarding any pending YAML changes.
1578+
13791579
## `plugin`
13801580

13811581
Manages plugins.
@@ -2893,6 +3093,18 @@ version using the syntax `<handle>:<version>`.
28933093
until the licenses have been renewed.
28943094

28953095

3096+
--minor-only
3097+
: Whether only minor updates should be applied.
3098+
3099+
3100+
--patch-only
3101+
: Whether only patch updates should be applied.
3102+
3103+
3104+
--except
3105+
: Plugin handles to exclude
3106+
3107+
28963108
--force, -f
28973109
: Force the update if allowUpdates is disabled
28983110

docs/.artifacts/cms/4.x/events.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3802,6 +3802,24 @@
38023802
"type": "yii\\base\\ActionEvent",
38033803
"desc": "an event raised right after executing a controller action."
38043804
},
3805+
{
3806+
"class": "craft\\console\\controllers\\PcController",
3807+
"name": "EVENT_DEFINE_ACTIONS",
3808+
"type": "craft\\events\\DefineConsoleActionsEvent",
3809+
"desc": "The event that is triggered when defining custom actions for this controller."
3810+
},
3811+
{
3812+
"class": "craft\\console\\controllers\\PcController",
3813+
"name": "EVENT_BEFORE_ACTION",
3814+
"type": "yii\\base\\ActionEvent",
3815+
"desc": "an event raised right before executing a controller action. You may set `ActionEvent::isValid` to be false to cancel the action execution."
3816+
},
3817+
{
3818+
"class": "craft\\console\\controllers\\PcController",
3819+
"name": "EVENT_AFTER_ACTION",
3820+
"type": "yii\\base\\ActionEvent",
3821+
"desc": "an event raised right after executing a controller action."
3822+
},
38053823
{
38063824
"class": "craft\\console\\controllers\\PluginController",
38073825
"name": "EVENT_DEFINE_ACTIONS",
@@ -24095,6 +24113,48 @@
2409524113
"type": "yii\\base\\Event",
2409624114
"desc": "an event raised at the end of `validate()`"
2409724115
},
24116+
{
24117+
"class": "craft\\elements\\conditions\\LanguageConditionRule",
24118+
"name": "EVENT_INIT",
24119+
"type": "yii\\base\\Event",
24120+
"desc": "The event that is triggered after the model's init cycle"
24121+
},
24122+
{
24123+
"class": "craft\\elements\\conditions\\LanguageConditionRule",
24124+
"name": "EVENT_DEFINE_BEHAVIORS",
24125+
"type": "craft\\events\\DefineBehaviorsEvent",
24126+
"desc": "The event that is triggered when defining the class behaviors"
24127+
},
24128+
{
24129+
"class": "craft\\elements\\conditions\\LanguageConditionRule",
24130+
"name": "EVENT_DEFINE_RULES",
24131+
"type": "craft\\events\\DefineRulesEvent",
24132+
"desc": "The event that is triggered when defining the model rules"
24133+
},
24134+
{
24135+
"class": "craft\\elements\\conditions\\LanguageConditionRule",
24136+
"name": "EVENT_DEFINE_FIELDS",
24137+
"type": "craft\\events\\DefineFieldsEvent",
24138+
"desc": "The event that is triggered when defining the arrayable fields"
24139+
},
24140+
{
24141+
"class": "craft\\elements\\conditions\\LanguageConditionRule",
24142+
"name": "EVENT_DEFINE_EXTRA_FIELDS",
24143+
"type": "craft\\events\\DefineFieldsEvent",
24144+
"desc": "The event that is triggered when defining the extra arrayable fields"
24145+
},
24146+
{
24147+
"class": "craft\\elements\\conditions\\LanguageConditionRule",
24148+
"name": "EVENT_BEFORE_VALIDATE",
24149+
"type": "yii\\base\\ModelEvent",
24150+
"desc": "an event raised at the beginning of `validate()`. You may set `ModelEvent::isValid` to be false to stop the validation."
24151+
},
24152+
{
24153+
"class": "craft\\elements\\conditions\\LanguageConditionRule",
24154+
"name": "EVENT_AFTER_VALIDATE",
24155+
"type": "yii\\base\\Event",
24156+
"desc": "an event raised at the end of `validate()`"
24157+
},
2409824158
{
2409924159
"class": "craft\\elements\\conditions\\LevelConditionRule",
2410024160
"name": "EVENT_INIT",
@@ -37188,6 +37248,12 @@
3718837248
"type": "craft\\events\\DefineAddressSubdivisionsEvent",
3718937249
"desc": "The event that is triggered when defining subdivisions options for an address field for a given country code, and optionally administrativeArea and locality."
3719037250
},
37251+
{
37252+
"class": "craft\\services\\Addresses",
37253+
"name": "EVENT_DEFINE_ADDRESS_COUNTRIES",
37254+
"type": "craft\\events\\DefineAddressCountriesEvent",
37255+
"desc": "The event that is triggered when defining country options for an address."
37256+
},
3719137257
{
3719237258
"class": "craft\\services\\Assets",
3719337259
"name": "EVENT_BEFORE_REPLACE_ASSET",
@@ -37872,6 +37938,12 @@
3787237938
"type": "craft\\events\\FieldEvent",
3787337939
"desc": "The event that is triggered before a field is saved."
3787437940
},
37941+
{
37942+
"class": "craft\\services\\Fields",
37943+
"name": "EVENT_BEFORE_APPLY_FIELD_SAVE",
37944+
"type": "craft\\events\\ApplyFieldSaveEvent",
37945+
"desc": "The event that is triggered before a field save is applied to the database."
37946+
},
3787537947
{
3787637948
"class": "craft\\services\\Fields",
3787737949
"name": "EVENT_AFTER_SAVE_FIELD",

0 commit comments

Comments
 (0)