-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[!!!][TASK] Use Priority enum in Incident class
Related: #2
- Loading branch information
1 parent
17f32d7
commit f1f7725
Showing
12 changed files
with
106 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,9 @@ API | |
incident | ||
file | ||
filestorage | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: Enumerations | ||
|
||
priority |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.. include:: /_includes.rst.txt | ||
|
||
.. _api-priority: | ||
|
||
====================== | ||
Enumerations\\Priority | ||
====================== | ||
|
||
.. php:class:: enum Brotkrueml\JobRouterClient\Enumerations\Priority | ||
Priority enumeration to be used in :ref:`Incident class <api-incident>`. | ||
|
||
.. php:const:: case PRIORITY_HIGH = 3 | ||
The value of the high priority. | ||
|
||
.. php:const:: case PRIORITY_LOW = 1 | ||
The value of the low priority. | ||
|
||
.. php:const:: case PRIORITY_NORMAL = 2 | ||
The value of the default priority. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
.. include:: /_includes.rst.txt | ||
|
||
.. _upgrade: | ||
|
||
======= | ||
Upgrade | ||
======= | ||
|
||
From version 1.x to 2.0 | ||
======================= | ||
|
||
With JobRouter Client 2.0 the minimum requirements have changed, supported are | ||
now: | ||
|
||
- PHP ≥ 8.1 | ||
- JobRouter® ≥ 2022.1 | ||
|
||
API changes | ||
----------- | ||
|
||
- :ref:`Incident <api-incident>` class: | ||
|
||
- The :php:`->setPriority()` method accepts only a :ref:`Priority | ||
<api-priority>` enum, previously it was an integer or null. | ||
- The :php:`->getPriority()` method returns a :ref:`Priority | ||
<api-priority>` enum, previously it was an integer or null. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the JobRouter Client. | ||
* https://github.com/brotkrueml/jobrouter-client | ||
* | ||
* Copyright (c) 2019-2022 Chris Müller | ||
* | ||
* For the full copyright and license information, please view the | ||
* LICENSE.txt file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Brotkrueml\JobRouterClient\Enumerations; | ||
|
||
enum Priority: int | ||
{ | ||
case Low = 1; | ||
case Normal = 2; | ||
case High = 3; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters