Commit 1bcbf87
committed
Deprecate the
`validate_legacy()` was added to help migrating from the legacy
validation functions to the new Puppet data types which where not 100%
backward compatible with the previous validation (e.g. `'42'` was a
valid integer according to `validate_integer()` but indeed a String and
not an Integer when using data types.
The legacy validation functions have been removed from stdlib, so
`validate_legacy()` will now fail if it tries to run them. But as
they produced deprecation warning, they are supposed to have already
been fixed. For the sake of security, instead of removing
`validate_legacy()` now, deprecate it so that it is strictly equivalent
to validating using a data type, but also emits a warning.validate_legacy() function1 parent bdf14f5 commit 1bcbf87
File tree
2 files changed
+21
-47
lines changed- lib/puppet/functions
- spec/functions
2 files changed
+21
-47
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | | - | |
| 54 | + | |
| 55 | + | |
53 | 56 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 57 | + | |
59 | 58 | | |
60 | 59 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 60 | + | |
| 61 | + | |
67 | 62 | | |
68 | 63 | | |
69 | 64 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | 65 | | |
80 | 66 | | |
81 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 19 | + | |
35 | 20 | | |
36 | | - | |
37 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
38 | 24 | | |
39 | 25 | | |
40 | 26 | | |
41 | 27 | | |
42 | 28 | | |
43 | 29 | | |
44 | | - | |
| 30 | + | |
| 31 | + | |
45 | 32 | | |
46 | 33 | | |
47 | 34 | | |
48 | 35 | | |
49 | 36 | | |
50 | 37 | | |
51 | 38 | | |
52 | | - | |
| 39 | + | |
| 40 | + | |
53 | 41 | | |
54 | 42 | | |
55 | 43 | | |
| |||
0 commit comments