Documentation Contradiction: insert methods inside a change() method
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 4.5k
- Forks
- 884
- PR merge metrics
- No merged PRs in 30d
Description
Under the Inserting Data heading, there's a yellow warning: "You cannot use the insert methods inside a change() method. Please use the up() and down() methods."
But just above on the same page, under The Change Method the last code sample invokes an insert() method from within the change() method.
If this code sample is actually valid, is it because the invocation of insert() is conditional based on isMigratingUp()? If so, that should be explained in the yellow warning under Inserting Data.
Perhaps this:
"Please use the up() and down() methods."
Could be changed to this:
"Please use the up() and down() methods, or when inside a change() method only invoke insert() inside a conditional block when isMigratingUp() or isMigratingDown() is true."
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the linked “The Change Method” and “Inserting Data” sections in the Phinx documentation, especially the final change() example and the yellow warning. Verify whether the example’s conditional use of insert() is valid, then reconcile the warning and example so the documented rule is consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100