Phing User Guide

Andreas Aderhold

Alex Black

Manuel Holtgrewe

Hans Lellelid

Michiel Rook

Johan Persson

Phing 3.x

2018-05-25


Preface
1. About this book
1.1. Authors
1.2. Copyright
1.3. License
1.4. DocBook
2. Introduction
2.1. What Phing Is
2.2. Phing & Binarycloud: History
2.3. How Phing Works
2.4. Cool, so how can I help?
3. Setting-up Phing
3.1. System Requirements
3.2. Obtaining Phing
3.3. Composer Install
3.4. Phar package
3.5. Running Phing
4. Getting started
4.1. XML And Phing
4.2. Writing A Simple Buildfile
4.3. More Complex Buildfile
4.4. Relax NG Grammar
5. Project components
5.1. Projects
5.2. Version
5.3. Project Components in General
5.4. Targets
5.5. Tasks
5.6. Types
5.7. Basic Types
5.8. Conditions
6. Extending Phing
6.1. Extension Possibilities
6.2. Source Layout
6.3. System Initialization
6.4. System Services
6.5. Build Lifecycle
6.6. Writing Tasks
6.7. Writing Types
6.8. Writing Mappers
A. Fact Sheet
A.1. Built-In Properties
A.2. Command Line Arguments
A.3. Distribution File Layout
A.4. Program Exit Codes
A.5. The LGPL License
A.6. The GFDL License
B. Core tasks
B.1. AdhocTaskdefTask
B.2. AdhocTypedefTask
B.3. AppendTask
B.4. ApplyTask
B.5. AttribTask
B.6. AvailableTask
B.7. Basename
B.8. ChmodTask
B.9. ChownTask
B.10. ConditionTask
B.11. CopyTask
B.12. DefaultExcludes
B.13. DeleteTask
B.14. DependSet
B.15. Diagnostics
B.16. Dirname
B.17. EchoTask
B.18. EchoPropertiesTask
B.19. ExecTask
B.20. FailTask
B.21. ForeachTask
B.22. IfTask
B.23. ImportTask
B.24. IncludePathTask
B.25. InputTask
B.26. LoadFileTask
B.27. MkdirTask
B.28. MoveTask
B.29. PathConvert
B.30. PhingTask
B.31. PhingCallTask
B.32. Phingversion
B.33. PhpEvalTask
B.34. PropertyTask
B.35. PropertyPromptTask
B.36. Record
B.37. ReflexiveTask
B.38. ResolvePathTask
B.39. Relentless
B.40. Retry
B.41. RunTargetTask
B.42. SleepTask
B.43. SwitchTask
B.44. TaskdefTask
B.45. Tempfile Task
B.46. TouchTask
B.47. TruncateTask
B.48. TryCatchTask
B.49. TstampTask
B.50. TypedefTask
B.51. UpToDateTask
B.52. WaitForTask
B.53. XsltTask
C. Optional tasks
C.1. ApiGenTask
C.2. AutoloaderTask
C.3. ComposerTask
C.4. CoverageMergerTask
C.5. CoverageReportTask
C.6. CoverageSetupTask
C.7. CoverageThresholdTask
C.8. DbDeployTask
C.9. ExportPropertiesTask
C.10. FileHashTask
C.11. FileSizeTask
C.12. FileSyncTask
C.13. FtpDeployTask
C.14. GitArchiveTask
C.15. GitBranchTask
C.16. GitCheckoutTask
C.17. GitCloneTask
C.18. GitCommitTask
C.19. GitFetchTask
C.20. GitGcTask
C.21. GitInitTask
C.22. GitLogTask
C.23. GitMergeTask
C.24. GitPullTask
C.25. GitPushTask
C.26. GitTagTask
C.27. GitDescribeTask
C.28. GrowlNotifyTask
C.29. HgAddTask
C.30. HgArchiveTask
C.31. HgCloneTask
C.32. HgCommitTask
C.33. HgInitTask
C.34. HgLogTask
C.35. HgPullTask
C.36. HgPushTask
C.37. HgRevertTask
C.38. HgTagTask
C.39. HgUpdateTask
C.40. HipchatTask
C.41. HttpGetTask
C.42. HttpRequestTask
C.43. IniFileTask
C.44. IoncubeEncoderTask
C.45. IoncubeLicenseTask
C.46. JsHintTask
C.47. JslLintTask
C.48. JsMinTask
C.49. JsonValidateTask
C.50. LiquibaseTask
C.51. LiquibaseChangeLogTask
C.52. LiquibaseDbDocTask
C.53. LiquibaseDiffTask
C.54. LiquibaseRollbackTask
C.55. LiquibaseTagTask
C.56. LiquibaseUpdateTask
C.57. MailTask
C.58. ManifestTask
C.59. NotifySendTask
C.60. PackageAsPathTask
C.61. ParallelTask
C.62. PatchTask
C.63. PathToFileSetTask
C.64. PDOSQLExecTask
C.65. PearPackageTask
C.66. PearPackage2Task
C.67. PharDataTask
C.68. PharPackageTask
C.69. PhkPackageTask
C.70. PhpCodeSnifferTask
C.71. PHPCPDTask
C.72. PHPLocTask
C.73. PHPMDTask
C.74. PhpDependTask
C.75. PhpDocumentor2Task
C.76. PhpLintTask
C.77. PHPUnitTask
C.78. PHPUnitReport
C.79. PropertyCopy
C.80. PropertyRegexTask
C.81. ReplaceRegexpTask
C.82. rSTTask
C.83. S3PutTask
C.84. S3GetTask
C.85. SassTask
C.86. ScpTask
C.87. SmartyTask
C.88. SonarTask
C.89. SortList
C.90. SshTask
C.91. SvnCheckoutTask
C.92. SvnCommitTask
C.93. SvnCopyTask
C.94. SvnExportTask
C.95. SvnInfoTask
C.96. SvnLastRevisionTask
C.97. SvnListTask
C.98. SvnLogTask
C.99. SvnUpdateTask
C.100. SvnSwitchTask
C.101. SvnProplistTask
C.102. SvnPropgetTask
C.103. SvnPropsetTask
C.104. StopwatchTask
C.105. SymfonyConsoleTask
C.106. SymlinkTask
C.107. TarTask
C.108. ThrowTask
C.109. UntarTask
C.110. UnzipTask
C.111. Variable
C.112. VersionTask
C.113. WikiPublishTask
C.114. XmlLintTask
C.115. XmlPropertyTask
C.116. ZendCodeAnalyzerTask
C.117. ZendGuardEncodeTask
C.118. ZendGuardLicenseTask
C.119. ZipTask
C.120. ZSDTPackTask
C.121. ZSDTValidateTask
C.122. PHPStanTask
D. Core Types
D.1. Description
D.2. Excludes
D.3. FileList
D.4. FileSet
D.5. DirSet
D.6. PatternSet
D.7. Path / Classpath
D.8. PearPackageFileSet
E. Core filters
E.1. PhingFilterReader
E.2. ExpandProperties
E.3. ConcatFilter
E.4. HeadFilter
E.5. IconvFilter
E.6. Line Contains
E.7. LineContainsRegexp
E.8. PrefixLines
E.9. ReplaceTokens
E.10. ReplaceTokensWithFile
E.11. ReplaceRegexp
E.12. SortFilter
E.13. StripLineBreaks
E.14. StripLineComments
E.15. StripPhpComments
E.16. StripWhitespace
E.17. TabToSpaces
E.18. TailFilter
E.19. TidyFilter
E.20. XincludeFilter
E.21. XsltFilter
F. Core mappers
F.1. Common Attributes
F.2. ChainedMapper
F.3. CompositeMapper
F.4. FirstMatchMapper
F.5. CutDirsMapper
F.6. FlattenMapper
F.7. GlobMapper
F.8. IdentityMapper
F.9. MergeMapper
F.10. RegexpMapper
G. Core selectors
G.1. Contains
G.2. Date
G.3. Depend
G.4. Depth
G.5. Different
G.6. Filename
G.7. Present
G.8. Containsregexp
G.9. Size
G.10. Type
G.11. And
G.12. Majority
G.13. None
G.14. Not
G.15. Or
G.16. Readable
G.17. Writable
G.18. Executable
G.19. Selector
G.20. Symlink Selector
H. Project Components
H.1. Phing Projects
H.2. Targets
I. Loggers and Listeners
I.1. Listeners
I.2. Loggers
I.3. DefaultLogger
I.4. MailLogger
I.5. NoBannerLogger
I.6. ProfileLogger
I.7. StatisticsListener
I.8. TimestampedLogger
J. File Formats
J.1. Build File Format
J.2. Property File Format
Bibliography