Skip to content

Commit fb2ca7a

Browse files
authored
Update new-deprecations.md for workflow
joomla/joomla-cms#37628 (#79)
1 parent 08122be commit fb2ca7a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

migrations/43-44/new-deprecations.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,22 @@ All the new deprecations that should be aware of and what you should now be usin
1010
This page is unfinished, please use the **Edit this Page** link at the bottom of this page to help make it more useful.
1111

1212
:::
13+
14+
#### Workflow rquires database and application
15+
16+
File: libraries/src/Workflow/Workflow.php
17+
Replacement: The application and database will be mandatory
18+
Example:
19+
```php
20+
$workflow = new Workflow($extension, $app, $db);
21+
```
22+
23+
File: libraries/src/MVC/Model/WorkflowBehaviorTrait.php
24+
Replacement: The trait requires a getDatabase function which is provided by the Joomla\Database\DatabaseAwareTrait trait so it is recommended to use both traits together. If you are using the workflow trait in a model, then the database trait is already available.
25+
Example:
26+
```php
27+
class Foo {
28+
use MVC/Model/WorkflowBehaviorTrait;
29+
use Joomla\Database\DatabaseAwareTrait;
30+
}
31+
```

0 commit comments

Comments
 (0)