DependencyParserTestData.json 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. [
  2. {
  3. "expected": [
  4. {
  5. "type" : "required",
  6. "constraint" : "*",
  7. "channel" : "pear.php.net",
  8. "name" : "Foo"
  9. }
  10. ],
  11. "1.0": [
  12. { "type": "pkg", "rel": "has", "name": "Foo" }
  13. ],
  14. "2.0": {
  15. "required": {
  16. "package": {
  17. "name": "Foo",
  18. "channel": "pear.php.net"
  19. }
  20. }
  21. }
  22. },
  23. {
  24. "expected": [
  25. {
  26. "type" : "required",
  27. "constraint" : ">1.0.0.0",
  28. "channel" : "pear.php.net",
  29. "name" : "Foo"
  30. }
  31. ],
  32. "1.0": [
  33. { "type": "pkg", "rel": "gt", "version": "1.0.0", "name": "Foo" }
  34. ],
  35. "2.0": {
  36. "required": {
  37. "package": {
  38. "name": "Foo",
  39. "channel": "pear.php.net",
  40. "min": "1.0.0",
  41. "exclude": "1.0.0"
  42. }
  43. }
  44. }
  45. },
  46. {
  47. "expected": [
  48. {
  49. "type" : "conflicts",
  50. "constraint" : "*",
  51. "channel" : "pear.php.net",
  52. "name" : "Foo"
  53. }
  54. ],
  55. "1.0": [
  56. { "type": "pkg", "rel": "not", "name": "Foo" }
  57. ],
  58. "2.0": {
  59. "required": {
  60. "package": {
  61. "name": "Foo",
  62. "channel": "pear.php.net",
  63. "conflicts": true
  64. }
  65. }
  66. }
  67. },
  68. {
  69. "expected": [
  70. {
  71. "type" : "required",
  72. "constraint" : ">=1.0.0.0",
  73. "channel" : "pear.php.net",
  74. "name" : "Foo"
  75. },
  76. {
  77. "type" : "required",
  78. "constraint" : "<2.0.0.0",
  79. "channel" : "pear.php.net",
  80. "name" : "Foo"
  81. }
  82. ],
  83. "1.0": [
  84. { "type": "pkg", "rel": "ge", "version": "1.0.0", "name": "Foo" },
  85. { "type": "pkg", "rel": "lt", "version": "2.0.0", "name": "Foo" }
  86. ],
  87. "2.0": {
  88. "required": {
  89. "package": [
  90. {
  91. "name": "Foo",
  92. "channel": "pear.php.net",
  93. "min": "1.0.0"
  94. },
  95. {
  96. "name": "Foo",
  97. "channel": "pear.php.net",
  98. "max": "2.0.0",
  99. "exclude": "2.0.0"
  100. }
  101. ]
  102. }
  103. }
  104. },
  105. {
  106. "expected": [
  107. {
  108. "type" : "required",
  109. "constraint" : ">=5.3.0.0",
  110. "channel" : "php",
  111. "name" : ""
  112. }
  113. ],
  114. "1.0": [
  115. { "type": "php", "rel": "ge", "version": "5.3"}
  116. ],
  117. "2.0": {
  118. "required": {
  119. "php": {
  120. "min": "5.3"
  121. }
  122. }
  123. }
  124. },
  125. {
  126. "expected": [
  127. {
  128. "type" : "required",
  129. "constraint" : "*",
  130. "channel" : "ext",
  131. "name" : "xmllib"
  132. }
  133. ],
  134. "1.0": [
  135. { "type": "ext", "rel": "has", "name": "xmllib"}
  136. ],
  137. "2.0": {
  138. "required": {
  139. "extension": [
  140. {
  141. "name": "xmllib"
  142. }
  143. ]
  144. }
  145. }
  146. },
  147. {
  148. "expected": [
  149. {
  150. "type" : "optional",
  151. "constraint" : "*",
  152. "channel" : "ext",
  153. "name" : "xmllib"
  154. }
  155. ],
  156. "1.0": false,
  157. "2.0": {
  158. "optional": {
  159. "extension": [
  160. {
  161. "name": "xmllib"
  162. }
  163. ]
  164. }
  165. }
  166. }
  167. ]