File tree 5 files changed +39
-17
lines changed
5 files changed +39
-17
lines changed Original file line number Diff line number Diff line change 79
79
- " 8.1"
80
80
- " 8.2"
81
81
- " 8.3"
82
+ include :
83
+ # Keep the locked version by default
84
+ - dependency-versions : " locked"
85
+ # For PHP 8.0, installing with --prefer-highest to use brick/math v0.11
86
+ - php-version : " 8.0"
87
+ dependency-versions : " highest"
82
88
83
89
steps :
84
90
- name : " Checkout repository"
99
105
100
106
- name : " Install dependencies (Composer)"
101
107
uses : " ramsey/composer-install@v3"
108
+ with :
109
+ dependency-versions : " ${{ matrix.dependency-versions }}"
102
110
103
111
- name : " Run PHPBench"
104
112
run : " composer phpbench -- --ansi"
@@ -151,6 +159,12 @@ jobs:
151
159
operating-system :
152
160
- " ubuntu-latest"
153
161
- " windows-latest"
162
+ include :
163
+ # Keep the locked version by default
164
+ - dependency-versions : " locked"
165
+ # For PHP 8.0, installing with --prefer-highest to use brick/math v0.11
166
+ - php-version : " 8.0"
167
+ dependency-versions : " highest"
154
168
155
169
steps :
156
170
- name : " Configure Git (for Windows)"
@@ -179,7 +193,7 @@ jobs:
179
193
- name : " Install dependencies (Composer)"
180
194
uses : " ramsey/composer-install@v3"
181
195
with :
182
- composer-options : " ${{ matrix.composer-options }}"
196
+ dependency-versions : " ${{ matrix.dependency-versions }}"
183
197
184
198
- name : " Run unit tests (PHPUnit)"
185
199
run : " ./vendor/bin/phpunit --verbose --colors=always --no-coverage"
Original file line number Diff line number Diff line change 11
11
"require" : {
12
12
"php" : " ^8.0" ,
13
13
"ext-json" : " *" ,
14
- "brick/math" : " ^0.8.8 || ^0.9 || ^0.10 || ^0.11" ,
14
+ "brick/math" : " ^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12 " ,
15
15
"ramsey/collection" : " ^1.2 || ^2.0"
16
16
},
17
17
"require-dev" : {
Original file line number Diff line number Diff line change 4
4
xsi : schemaLocation =" https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
5
5
errorLevel =" 1"
6
6
cacheDirectory =" ./build/cache/psalm"
7
- errorBaseline =" psalm-baseline.xml" >
7
+ errorBaseline =" psalm-baseline.xml"
8
+ phpVersion =" 8.1" >
8
9
9
10
<projectFiles >
10
11
<directory name =" ./src" />
Original file line number Diff line number Diff line change @@ -136,9 +136,11 @@ public function toInteger(Hexadecimal $value): IntegerObject
136
136
137
137
/**
138
138
* Maps ramsey/uuid rounding modes to those used by brick/math
139
+ *
140
+ * @return BrickMathRounding::*
139
141
*/
140
- private function getBrickRoundingMode (int $ roundingMode ): int
142
+ private function getBrickRoundingMode (int $ roundingMode )
141
143
{
142
- return self ::ROUNDING_MODE_MAP [$ roundingMode ] ?? 0 ;
144
+ return self ::ROUNDING_MODE_MAP [$ roundingMode ] ?? BrickMathRounding:: UNNECESSARY ;
143
145
}
144
146
}
You can’t perform that action at this time.
0 commit comments