Skip to content

🐛 fix(bones): migrate:to-v3 reads a form tag with PHP inside it - #130

Merged
gfazioli merged 1 commit into
v3from
fix/v3-forms-with-php
Oct 6, 2026
Merged

gfazioli merged 1 commit into
v3from
fix/v3-forms-with-php

Conversation

@gfazioli

@gfazioli gfazioli commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

Found by running the 3.0 report on the 14 boilerplates: the Options boilerplate writes <form action="#<?php echo $mid ?>" method="post">, and the > that closes the PHP ended the tag, so its five live POST forms were never listed, while the printed example beside them (rightly) was not either.

The tag is now matched over the whole file, PHP blocks inside it included, and kept when it starts in the markup (a view's HTML, a pages/ class's strings). New test: test_a_form_tag_with_php_inside_is_read. composer test: 350 tests and 897 assertions. On a copy of the Options boilerplate the report now lists view.php:137 and the five forms of resource.php (81–96), not the example at 56.

Trap met on the way: a PHP close tag inside a // comment ends the comment and PHP mode; the first version of the explaining comment quoted one, and every console test broke.

The Options boilerplate writes action="#<?php echo $mid ?>": the > that
closes the PHP ended the tag, so its five POST forms were never listed. The
tag is matched over the whole file now, with PHP blocks inside it, and kept
when it starts in the markup (a view's HTML, a pages/ class's strings).
@gfazioli
gfazioli merged commit b692090 into v3 Oct 6, 2026
4 checks passed
@gfazioli
gfazioli deleted the fix/v3-forms-with-php branch October 6, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant