PTLayout 5.67.1 migration checklist
Before changing a file
- Record
.snp,NSLayoutConstraint.activate, manual constraint constructors, and anchor constraints inreport/layout/Full_Layout_Inventory.csv. - Confirm the file is a PTools-owned Auto Layout consumer, not a CollectionView layout algorithm, drawing path, frame animation, or third-party compatibility boundary.
- Add the appropriate consumer dependency (
PToolsConstraintLayout) without making the standalone target depend on the umbrella target.
Translation table
| Legacy | PTLayout |
|---|---|
view.snp.makeConstraints |
view.ptLayout.makeConstraints |
view.snp.updateConstraints |
view.ptLayout.updateConstraints |
view.snp.remakeConstraints |
view.ptLayout.remakeConstraints |
view.snp.prepareConstraints |
view.ptLayout.prepareConstraints |
view.snp.removeConstraints |
view.ptLayout.removeConstraints |
Constraint |
PTLayoutConstraint |
ConstraintGroup |
PTLayoutConstraintGroup |
updateConstraints intentionally does not upsert an unknown signature. Use upsertConstraints only when the caller explicitly wants that behavior.
Required checks per migrated file
- The view is added to its intended hierarchy before positional constraints are made.
- Width/height-only constants remain legal for standalone views.
- Safe-area, keyboard, layout-margin, readable-content, scroll-view, and RTL guides use the actual UIKit guide.
remakefailure leaves the old PTLayout group active.- Foreign SnapKit/storyboard constraints are not removed by PTLayout.
- New comments use English, Spanish, and Chinese.
- Run the file’s Swift parse/type-check and the iOS Simulator Debug/Release Xcode build.
- Run the dedicated runtime XCTest and attach its
.xcresult; a type-check or fixture count is not runtime parity. - Attach visual screenshots, unsatisfiable-constraint output, and the current simulator/OS/commit metadata.
Explicit exemptions
The following remain outside PTLayout ownership and need a row in the inventory with a reason and regression path:
PooToolsLayout/ CollectionViewPagingLayout and collection layout algorithms.layoutSubviewsgeometry, drawing, shadow paths, transforms, camera/player frame calculations.- UIStackView’s arranged-subview internals.
- Third-party and legacy
.snpcompatibility code.
Release evidence
Run:
python3 Scripts/CI/audit_layout_567.py
python3 Scripts/CI/validate_layout_negative_fixtures_567.py
bash Scripts/CI/run_ptlayout_differential_tests.sh
bash Scripts/CI/validate_ptlayout_5_67_release.sh
The static scripts do not replace Xcode Simulator, CocoaPods consumer, accessibility, visual, or physical-device validation.
5.67.1 incident recovery rules
- Keep existing
.snpconsumers unchanged unless the file is listed in the opt-in manifest and its runtime fixture passes. ptLayout.updateConstraintsfollows SnapKit’s first-update make behavior;updateIfExistsremains strict.- A failed prepare/remake must leave the old view state and autoresizing-mask ownership unchanged.
- Use the opt-in migration manifest as the source of truth for every future migration.
中文:5.67.1 只修复 PTLayout 引擎与验证链路,不重新执行全仓替换。 Español: 5.67.1 solo corrige el motor PTLayout y sus puertas de validación; no repite una sustitución global.