You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #21350 [Yaml] Remove internal arguments from the api (GuilhemN)
This PR was squashed before being merged into the 3.3-dev branch (closes#21350).
Discussion
----------
[Yaml] Remove internal arguments from the api
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #21230
| License | MIT
| Doc PR |
Reopening of #21230 because of [@xabbuh's comment](#21194 (comment)).
> This PR removes internal constructor arguments of the `Parser` class.
> This should break nothing as they are only used to build errors message and are clearly meant for internal uses.
>
> This would allow to have a nicer api for #21194 (comment).
Commits
-------
ebae4ff [Yaml] Remove internal arguments from the api
@trigger_error(sprintf('The constructor arguments $offset, $totalNumberOfLines, $skippedLineNumbers of %s are deprecated and will be removed in 4.0', self::class), E_USER_DEPRECATED);
39
+
40
+
$this->offset = func_get_arg(0);
41
+
if (func_num_args() > 1) {
42
+
$this->totalNumberOfLines = func_get_arg(1);
43
+
}
44
+
if (func_num_args() > 2) {
45
+
$this->skippedLineNumbers = func_get_arg(2);
46
+
}
47
+
}
47
48
}
48
49
49
50
/**
@@ -384,7 +385,11 @@ private function parseBlock($offset, $yaml, $flags)
0 commit comments