Skip to content

Commit bc02589

Browse files
committed
Raise requirements to PHP 8.3
1 parent 92826f3 commit bc02589

12 files changed

Lines changed: 51 additions & 53 deletions

‎.github/workflows/php.yml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
php:
16-
- '8.1'
17-
- '8.2'
1816
- '8.3'
1917
- '8.4'
2018
- '8.5'

‎composer.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@
3838
"docs": "https://github.com/DataValues/Geo/#usage"
3939
},
4040
"require": {
41-
"php": ">=8.1",
41+
"php": ">=8.3",
4242
"data-values/data-values": "^3.0|^2.0|^1.0|~0.1",
4343
"data-values/interfaces": "^1.1.0"
4444
},
4545
"require-dev": {
46-
"phpunit/phpunit": "^9.4.1",
47-
"mediawiki/mediawiki-codesniffer": "^48",
46+
"phpunit/phpunit": "^12.5",
47+
"mediawiki/mediawiki-codesniffer": "^52",
4848
"ockcyp/covers-validator": "^1.3.3",
4949
"phpstan/phpstan": "^0.12.68 || ^1.0.0",
5050
"phpmd/phpmd": "^2.9.1",

‎src/Formatters/LatLongFormatter.php‎

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,64 +35,64 @@ class LatLongFormatter implements ValueFormatter {
3535
/**
3636
* Output formats for use with the self::OPT_FORMAT option.
3737
*/
38-
public const TYPE_FLOAT = 'float';
39-
public const TYPE_DMS = 'dms';
40-
public const TYPE_DM = 'dm';
41-
public const TYPE_DD = 'dd';
38+
public const string TYPE_FLOAT = 'float';
39+
public const string TYPE_DMS = 'dms';
40+
public const string TYPE_DM = 'dm';
41+
public const string TYPE_DD = 'dd';
4242

4343
/**
4444
* The symbols representing the different directions for usage in directional notation.
4545
* @since 0.1
4646
*/
47-
public const OPT_NORTH_SYMBOL = 'north';
48-
public const OPT_EAST_SYMBOL = 'east';
49-
public const OPT_SOUTH_SYMBOL = 'south';
50-
public const OPT_WEST_SYMBOL = 'west';
47+
public const string OPT_NORTH_SYMBOL = 'north';
48+
public const string OPT_EAST_SYMBOL = 'east';
49+
public const string OPT_SOUTH_SYMBOL = 'south';
50+
public const string OPT_WEST_SYMBOL = 'west';
5151

5252
/**
5353
* The symbols representing degrees, minutes and seconds.
5454
* @since 0.1
5555
*/
56-
public const OPT_DEGREE_SYMBOL = 'degree';
57-
public const OPT_MINUTE_SYMBOL = 'minute';
58-
public const OPT_SECOND_SYMBOL = 'second';
56+
public const string OPT_DEGREE_SYMBOL = 'degree';
57+
public const string OPT_MINUTE_SYMBOL = 'minute';
58+
public const string OPT_SECOND_SYMBOL = 'second';
5959

6060
/**
6161
* Flags for use with the self::OPT_SPACING_LEVEL option.
6262
*/
63-
public const OPT_SPACE_LATLONG = 'latlong';
64-
public const OPT_SPACE_DIRECTION = 'direction';
65-
public const OPT_SPACE_COORDPARTS = 'coordparts';
63+
public const string OPT_SPACE_LATLONG = 'latlong';
64+
public const string OPT_SPACE_DIRECTION = 'direction';
65+
public const string OPT_SPACE_COORDPARTS = 'coordparts';
6666

6767
/**
6868
* Option specifying the output format (also referred to as output type). Must be one of the
6969
* self::TYPE_… constants.
7070
*/
71-
public const OPT_FORMAT = 'geoformat';
71+
public const string OPT_FORMAT = 'geoformat';
7272

7373
/**
7474
* Boolean option specifying if negative coordinates should have minus signs, e.g. "-1°, -2°"
7575
* (false) or cardinal directions, e.g. "1° S, 2° W" (true). Default is false.
7676
*/
77-
public const OPT_DIRECTIONAL = 'directional';
77+
public const string OPT_DIRECTIONAL = 'directional';
7878

7979
/**
8080
* Option for the separator character between latitude and longitude. Defaults to a comma.
8181
*/
82-
public const OPT_SEPARATOR_SYMBOL = 'separator';
82+
public const string OPT_SEPARATOR_SYMBOL = 'separator';
8383

8484
/**
8585
* Option specifying the amount and position of space characters in the output. Must be an array
8686
* containing zero or more of the self::OPT_SPACE_… flags.
8787
*/
88-
public const OPT_SPACING_LEVEL = 'spacing';
88+
public const string OPT_SPACING_LEVEL = 'spacing';
8989

9090
/**
9191
* Option specifying the precision in fractional degrees. Must be a number or numeric string.
9292
*/
93-
public const OPT_PRECISION = 'precision';
93+
public const string OPT_PRECISION = 'precision';
9494

95-
private const DEFAULT_PRECISION = 1 / 3600;
95+
private const float DEFAULT_PRECISION = 1 / 3600;
9696

9797
private FormatterOptions $options;
9898

‎src/GlobeMath.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class GlobeMath {
2222
/**
2323
* @todo Move this constant next to GlobeCoordinateValue::GLOBE_EARTH?
2424
*/
25-
public const GLOBE_MOON = 'http://www.wikidata.org/entity/Q405';
25+
public const string GLOBE_MOON = 'http://www.wikidata.org/entity/Q405';
2626

2727
/**
2828
* @param string|null $globe IRI of a globe.

‎src/Parsers/DdCoordinateParser.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class DdCoordinateParser extends LatLongParserBase {
2424
* The symbol representing degrees.
2525
* @since 0.1
2626
*/
27-
public const OPT_DEGREE_SYMBOL = 'degree';
27+
public const string OPT_DEGREE_SYMBOL = 'degree';
2828

2929
/**
3030
* Delimiters used to split a coordinate string when unable to split by using the separator.

‎src/Parsers/DmCoordinateParser.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
*/
2020
class DmCoordinateParser extends DdCoordinateParser {
2121

22-
public const FORMAT_NAME = 'dm-coordinate';
22+
public const string FORMAT_NAME = 'dm-coordinate';
2323

2424
/**
2525
* The symbols representing minutes.
2626
* @since 0.1
2727
*/
28-
public const OPT_MINUTE_SYMBOL = 'minute';
28+
public const string OPT_MINUTE_SYMBOL = 'minute';
2929

3030
/**
3131
* @param ParserOptions|null $options

‎src/Parsers/DmsCoordinateParser.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
*/
2020
class DmsCoordinateParser extends DmCoordinateParser {
2121

22-
public const FORMAT_NAME = 'dms-coordinate';
22+
public const string FORMAT_NAME = 'dms-coordinate';
2323

2424
/**
2525
* The symbol representing seconds.
2626
* @since 0.1
2727
*/
28-
public const OPT_SECOND_SYMBOL = 'second';
28+
public const string OPT_SECOND_SYMBOL = 'second';
2929

3030
/**
3131
* @param ?ParserOptions $options

‎src/Parsers/FloatCoordinateParser.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
class FloatCoordinateParser extends LatLongParserBase {
1818

19-
public const FORMAT_NAME = 'float-coordinate';
19+
public const string FORMAT_NAME = 'float-coordinate';
2020

2121
/**
2222
* @see LatLongParserBase::getParsedCoordinate

‎src/Parsers/GlobeCoordinateParser.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
*/
2828
class GlobeCoordinateParser implements ValueParser {
2929

30-
public const FORMAT_NAME = 'globe-coordinate';
30+
public const string FORMAT_NAME = 'globe-coordinate';
3131

3232
/**
3333
* Option specifying the globe. Should be a string containing a Wikidata concept URI.
3434
* Defaults to Earth.
3535
*/
36-
public const OPT_GLOBE = 'globe';
36+
public const string OPT_GLOBE = 'globe';
3737

3838
private ParserOptions $options;
3939
private ?LatLongPrecisionParser $latLongPrecisionParser = null;

‎src/Parsers/LatLongParser.php‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,30 +37,30 @@
3737
*/
3838
class LatLongParser implements ValueParser {
3939

40-
public const TYPE_FLOAT = 'float';
41-
public const TYPE_DMS = 'dms';
42-
public const TYPE_DM = 'dm';
43-
public const TYPE_DD = 'dd';
40+
public const string TYPE_FLOAT = 'float';
41+
public const string TYPE_DMS = 'dms';
42+
public const string TYPE_DM = 'dm';
43+
public const string TYPE_DD = 'dd';
4444

4545
/**
4646
* The symbols representing the different directions for usage in directional notation.
4747
*/
48-
public const OPT_NORTH_SYMBOL = 'north';
49-
public const OPT_EAST_SYMBOL = 'east';
50-
public const OPT_SOUTH_SYMBOL = 'south';
51-
public const OPT_WEST_SYMBOL = 'west';
48+
public const string OPT_NORTH_SYMBOL = 'north';
49+
public const string OPT_EAST_SYMBOL = 'east';
50+
public const string OPT_SOUTH_SYMBOL = 'south';
51+
public const string OPT_WEST_SYMBOL = 'west';
5252

5353
/**
5454
* The symbols representing degrees, minutes and seconds.
5555
*/
56-
public const OPT_DEGREE_SYMBOL = 'degree';
57-
public const OPT_MINUTE_SYMBOL = 'minute';
58-
public const OPT_SECOND_SYMBOL = 'second';
56+
public const string OPT_DEGREE_SYMBOL = 'degree';
57+
public const string OPT_MINUTE_SYMBOL = 'minute';
58+
public const string OPT_SECOND_SYMBOL = 'second';
5959

6060
/**
6161
* The symbol to use as a separator between latitude and longitude.
6262
*/
63-
public const OPT_SEPARATOR_SYMBOL = 'separator';
63+
public const string OPT_SEPARATOR_SYMBOL = 'separator';
6464

6565
private ParserOptions $options;
6666

0 commit comments

Comments
 (0)