Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support single array objects in parsePair method #7109

Closed
wants to merge 1 commit into from

Conversation

fraigo
Copy link

@fraigo fraigo commented Jan 12, 2023

Description
Fixes #7096

Allow using a single-element object to support current syntax in documentation examples for Nested Substitutions (https://codeigniter4.github.io/userguide/outgoing/view_parser.html#nested-substitutions) and Cascading Data (https://codeigniter4.github.io/userguide/outgoing/view_parser.html#cascading-data)

This fix will convert the object into an array list with 1 element.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added GPG-Signing needed Pull requests that need GPG-Signing tests needed Pull requests that need tests labels Jan 12, 2023
@kenjis
Copy link
Member

kenjis commented Jan 13, 2023

Thank you for sending a PR.

You must GPG-sign your work, certifying that you either wrote the work or otherwise have the right to pass it on to an open-source project. See Developer's Certificate of Origin.
See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#signing

And please fix the coding style.
See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#php-style

We also need unit testing.
See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#unit-testing

@kenjis kenjis changed the title Fixes #7096 to support single array objects in parsePair method fix: support single array objects in parsePair method Jan 13, 2023
@kenjis
Copy link
Member

kenjis commented Jan 17, 2023

{vars}...{/vars} is for multiple data.
Why do you need to set a single data?

@kenjis kenjis added the waiting for info Issues or pull requests that need further clarification from the author label Jan 17, 2023
@kenjis
Copy link
Member

kenjis commented Apr 20, 2023

No feedback. Closing.

If you still find this change useful, please submit another PR following the guidelines.
https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md

Thank you.

@kenjis kenjis closed this Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GPG-Signing needed Pull requests that need GPG-Signing tests needed Pull requests that need tests waiting for info Issues or pull requests that need further clarification from the author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: [Parser] Cascading Data causes ErrorException
2 participants