|
17 | 17 | <property name="phpunit.executable" value="vendor/bin/phpunit"/>
|
18 | 18 | </else>
|
19 | 19 | </if>
|
20 |
| - <php expression="PHP_VERSION_ID >= 70400 ?'true':'false'" returnProperty="isPHP74" level="verbose" /> |
21 |
| - <php expression="PHP_VERSION_ID >= 80000 ?'true':'false'" returnProperty="isPHP80" level="verbose" /> |
22 | 20 | <target name="check" depends="
|
23 | 21 | composer-validate,
|
24 | 22 | composer-install,
|
|
244 | 242 | </target>
|
245 | 243 |
|
246 | 244 | <target name="phpstan">
|
247 |
| - <touch file="${phpstan.config}"/> |
248 |
| - <append |
249 |
| - destFile="${phpstan.config}" |
250 |
| - text="includes: [ build/phpstan.neon" |
251 |
| - append="false" |
252 |
| - ></append> |
253 |
| - <if> |
254 |
| - <equals arg1="${isPHP74}" arg2="true" /> |
255 |
| - <then> |
256 |
| - <append |
257 |
| - destFile="${phpstan.config}" |
258 |
| - text=", build/ignore-gte-php7.4-errors.neon" |
259 |
| - ></append> |
260 |
| - </then> |
261 |
| - </if> |
262 |
| - <if> |
263 |
| - <equals arg1="${isPHP80}" arg2="true" /> |
264 |
| - <then> |
265 |
| - <append |
266 |
| - destFile="${phpstan.config}" |
267 |
| - text=", build/baseline-8.0.neon" |
268 |
| - ></append> |
269 |
| - </then> |
270 |
| - </if> |
271 |
| - <append |
272 |
| - destFile="${phpstan.config}" |
273 |
| - text=" ]" |
274 |
| - ></append> |
| 245 | + <delete file="${phpstan.config}"/> |
275 | 246 | <exec
|
276 | 247 | executable="php"
|
277 | 248 | logoutput="true"
|
|
301 | 272 | text="includes: [ build/phpstan.neon"
|
302 | 273 | append="false"
|
303 | 274 | ></append>
|
304 |
| - <if> |
305 |
| - <equals arg1="${isPHP74}" arg2="true" /> |
306 |
| - <then> |
307 |
| - <append |
308 |
| - destFile="${phpstan.config}" |
309 |
| - text=", build/ignore-gte-php7.4-errors.neon" |
310 |
| - ></append> |
311 |
| - </then> |
312 |
| - </if> |
313 |
| - <if> |
314 |
| - <equals arg1="${isPHP80}" arg2="true" /> |
315 |
| - <then> |
316 |
| - <append |
317 |
| - destFile="${phpstan.config}" |
318 |
| - text=", build/baseline-8.0.neon" |
319 |
| - ></append> |
320 |
| - </then> |
321 |
| - </if> |
322 | 275 | <append
|
323 | 276 | destFile="${phpstan.config}"
|
324 | 277 | text=", conf/staticReflection.neon"
|
|
352 | 305 | </target>
|
353 | 306 |
|
354 | 307 | <target name="phpstan-result-cache">
|
355 |
| - <touch file="${phpstan.config}"/> |
356 |
| - <append |
357 |
| - destFile="${phpstan.config}" |
358 |
| - text="includes: [ build/phpstan.neon" |
359 |
| - append="false" |
360 |
| - ></append> |
361 |
| - <if> |
362 |
| - <equals arg1="${isPHP74}" arg2="true" /> |
363 |
| - <then> |
364 |
| - <append |
365 |
| - destFile="${phpstan.config}" |
366 |
| - text=", build/ignore-gte-php7.4-errors.neon" |
367 |
| - ></append> |
368 |
| - </then> |
369 |
| - </if> |
370 |
| - <if> |
371 |
| - <equals arg1="${isPHP80}" arg2="true" /> |
372 |
| - <then> |
373 |
| - <append |
374 |
| - destFile="${phpstan.config}" |
375 |
| - text=", build/baseline-8.0.neon" |
376 |
| - ></append> |
377 |
| - </then> |
378 |
| - </if> |
379 |
| - <append |
380 |
| - destFile="${phpstan.config}" |
381 |
| - text=" ]" |
382 |
| - ></append> |
| 308 | + <delete file="${phpstan.config}"/> |
383 | 309 | <exec
|
384 | 310 | executable="php"
|
385 | 311 | logoutput="true"
|
|
414 | 340 | </target>
|
415 | 341 |
|
416 | 342 | <target name="phpstan-pro">
|
417 |
| - <touch file="${phpstan.config}"/> |
418 |
| - <append |
419 |
| - destFile="${phpstan.config}" |
420 |
| - text="includes: [ build/phpstan.neon" |
421 |
| - append="false" |
422 |
| - ></append> |
423 |
| - <if> |
424 |
| - <equals arg1="${isPHP74}" arg2="true" /> |
425 |
| - <then> |
426 |
| - <append |
427 |
| - destFile="${phpstan.config}" |
428 |
| - text=", build/ignore-gte-php7.4-errors.neon" |
429 |
| - ></append> |
430 |
| - </then> |
431 |
| - </if> |
432 |
| - <if> |
433 |
| - <equals arg1="${isPHP80}" arg2="true" /> |
434 |
| - <then> |
435 |
| - <append |
436 |
| - destFile="${phpstan.config}" |
437 |
| - text=", build/baseline-8.0.neon" |
438 |
| - ></append> |
439 |
| - </then> |
440 |
| - </if> |
441 |
| - <append |
442 |
| - destFile="${phpstan.config}" |
443 |
| - text=" ]" |
444 |
| - ></append> |
| 343 | + <delete file="${phpstan.config}"/> |
445 | 344 | <exec
|
446 | 345 | executable="php"
|
447 | 346 | logoutput="true"
|
|
456 | 355 | </target>
|
457 | 356 |
|
458 | 357 | <target name="phpstan-generate-baseline">
|
459 |
| - <touch file="${phpstan.config}"/> |
460 |
| - <append |
461 |
| - destFile="${phpstan.config}" |
462 |
| - text="includes: [ build/phpstan.neon" |
463 |
| - append="false" |
464 |
| - ></append> |
465 |
| - <if> |
466 |
| - <equals arg1="${isPHP74}" arg2="true" /> |
467 |
| - <then> |
468 |
| - <append |
469 |
| - destFile="${phpstan.config}" |
470 |
| - text=", build/ignore-gte-php7.4-errors.neon" |
471 |
| - ></append> |
472 |
| - </then> |
473 |
| - </if> |
474 |
| - <if> |
475 |
| - <equals arg1="${isPHP80}" arg2="true" /> |
476 |
| - <then> |
477 |
| - <append |
478 |
| - destFile="${phpstan.config}" |
479 |
| - text=", build/baseline-8.0.neon" |
480 |
| - ></append> |
481 |
| - </then> |
482 |
| - </if> |
483 |
| - |
484 |
| - <append |
485 |
| - destFile="${phpstan.config}" |
486 |
| - text=" ]" |
487 |
| - ></append> |
| 358 | + <delete file="${phpstan.config}"/> |
488 | 359 | <exec
|
489 | 360 | executable="php"
|
490 | 361 | logoutput="true"
|
|
0 commit comments