Skip to content

Commit 6b9cede

Browse files
authored
Merge branch '4.x-dev' into revert-and-add-baseline
2 parents 023ec97 + 61916c9 commit 6b9cede

File tree

17 files changed

+42
-307
lines changed

17 files changed

+42
-307
lines changed

.drone.jsonnet

Lines changed: 0 additions & 108 deletions
This file was deleted.

.drone.yml

Lines changed: 0 additions & 156 deletions
This file was deleted.

.gitattributes

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
.github/ export-ignore
2-
.phan/ export-ignore
32
docs/ export-ignore
43
tests/ export-ignore
5-
.drone.jsonnet export-ignore
6-
.drone.yml export-ignore
74
.editorconfig export-ignore
85
.gitattributes export-ignore
96
.gitignore export-ignore
107
phpstan.neon export-ignore
8+
phpstan-baseline.neon export-ignore
119
phpunit.xml.dist export-ignore
1210
ruleset.xml export-ignore

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,18 +194,18 @@ Array
194194

195195
## Installation via Composer
196196

197-
Add `"joomla/registry": "~3.0"` to the 'require' block in your composer.json and then run `composer install`.
197+
Add `"joomla/registry": "~4.0"` to the 'require' block in your composer.json and then run `composer install`.
198198

199199
```json
200200
{
201201
"require": {
202-
"joomla/registry": "~3.0"
202+
"joomla/registry": "~4.0"
203203
}
204204
}
205205
```
206206

207207
Alternatively, you can simply run the following from the command line:
208208

209209
```sh
210-
composer require joomla/registry "~3.0"
210+
composer require joomla/registry "~4.0"
211211
```

SECURITY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
These versions are currently being supported with security updates:
66

77
| Version | Supported |
8-
| ------- | ------------------ |
8+
|---------| ------------------ |
9+
| 4.x.x | :white_check_mark: |
910
| 3.x.x | :white_check_mark: |
1011
| 2.0.x | :white_check_mark: |
1112
| 1.6.x | :x: |

composer.json

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
"homepage": "https://github.com/joomla-framework/registry",
77
"license": "GPL-2.0-or-later",
88
"require": {
9-
"php": "^8.1.0",
9+
"php": "^8.3.0",
1010
"joomla/utilities": "dev-4.x-dev"
1111
},
1212
"require-dev": {
13-
"symfony/yaml": "^5.0",
14-
"phpunit/phpunit": "^9.5.28",
13+
"symfony/yaml": "^7.3",
14+
"phpunit/phpunit": "^12.2.6",
1515
"squizlabs/php_codesniffer": "^3.7.2",
16-
"phpstan/phpstan": "1.12.27",
17-
"phpstan/phpstan-deprecation-rules": "1.2.1"
16+
"phpstan/phpstan": "^2.1.17",
17+
"phpstan/phpstan-deprecation-rules": "^2.0.3"
1818
},
1919
"suggest": {
2020
"ext-json": "ext-json is needed for JSON support",
@@ -43,10 +43,6 @@
4343
"test": "vendor/bin/phpunit",
4444
"testdox": "vendor/bin/phpunit --testdox",
4545
"coverage": "vendor/bin/phpunit --coverage-html build/coverage",
46-
"sign": [
47-
"drone jsonnet --stream",
48-
"drone sign joomla-framework/registry --save"
49-
],
5046
"style": "vendor/bin/phpcs -p --report=full --extensions=php --standard=PSR12 src/"
5147
}
5248
}

docs/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
* [Overview](overview.md)
22
* [Updating from v1 to v2](v1-to-v2-update.md)
3+
* [Updating from v2 to v3](v2-to-v3-update.md)
4+
* [Updating from v3 to v4](v3-to-v4-update.md)

docs/v3-to-v4-update.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Updating from Version 3 to Version 4
2+
3+
The following changes were made to the Registry package between version 3 and version 4.
4+
5+
### Minimum supported PHP version raised
6+
7+
All Framework packages now require PHP 8.3 or newer.
8+
9+
### Enforce strings as input for `stringToObject()`
10+
11+
The input to `FormatInterface::stringToObject()` has always been string in the docblock, but starting now it is also enforced by a typehint in the method header. Make sure to really hand in strings.
12+
13+
### Separator has been removed from `Registry::set()` and `Registry::loadArray()`
14+
15+
`Registry::set()` allowed to hand in an on-the-fly separator, which could lead to conflicts with the set separator in the object. In version 4 this has been removed and since `Registry::loadArray()` also uses `Registry::set()` internally, its been removed from this method as well.

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
includes:
33
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
4+
- phpstan-baseline.neon
45

56
parameters:
67
level: 5

src/Format/Ini.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function objectToString($object, array $options = [])
124124
*
125125
* @since 1.0.0
126126
*/
127-
public function stringToObject($data, array $options = [])
127+
public function stringToObject(string $data, array $options = [])
128128
{
129129
$options = \array_merge(static::$options, $options);
130130

0 commit comments

Comments
 (0)