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

Example in manual was not working... (issue with script function name) #1

Closed
1 of 2 tasks
weierophinney opened this issue Dec 31, 2019 · 1 comment
Closed
1 of 2 tasks

Comments

@weierophinney
Copy link
Member

  • I was not able to find an open or closed issue matching what I'm seeing.
  • This is not a question. (Questions should be asked on chat (Signup here) or our forums.)

Provide a narrative description of what you are trying to accomplish.
I just wanted to play around with the examples to realize a progressbar with a JsPush-adapter.

Code to reproduce the issue

See the examples in the documentation and my question in stackoverflow, too:
https://stackoverflow.com/questions/50396543/zend-framework-3-how-to-use-and-push-update-progressbar

Expected results

The update-function should have been called and the progressbar should have been updated.....

Actual results

Nothing happened.

After renaming the update function to "ZendProgressBarUpdate" and adding the line

$this->adapter->setUpdateMethodName("ZendProgressBarUpdate");

everything worked as expected.

So I suggest to update the manual.


Originally posted by @kolbius at zendframework/zend-progressbar#26

@weierophinney
Copy link
Member Author

This package is considered feature-complete, and is now in security-only maintenance mode, following a decision by the Technical Steering Committee.
If you have a security issue, please follow our security reporting guidelines.
If you wish to take on the role of maintainer, please nominate yourself

TimWolla referenced this issue in WoltLab/laminas-progressbar Jul 28, 2022
The `$text` parameter is documented to take a `string`, not a `?string` and in
fact the Console adapter unconditionally calls a variant of `substr()` on the
given `$text` to shorten it to the configured display width.

With PHP 8.1 this fails, because native functions no longer accept `null` for a
string parameter:

> TypeError: grapheme_substr(): Argument #1 ($string) must be of type string, null given in […]

Signed-off-by: Tim Düsterhus <[email protected]>
TimWolla referenced this issue in WoltLab/laminas-progressbar Jul 28, 2022
The `$text` parameter is documented to take a `string`, not a `?string` and in
fact the Console adapter unconditionally calls a variant of `substr()` on the
given `$text` to shorten it to the configured display width.

With PHP 8.1 this fails, because native functions no longer accept `null` for a
string parameter:

> TypeError: grapheme_substr(): Argument #1 ($string) must be of type string, null given in […]

Signed-off-by: Tim Düsterhus <[email protected]>
TimWolla referenced this issue in WoltLab/laminas-progressbar Jul 28, 2022
The `$text` parameter is documented to take a `string`, not a `?string` and in
fact the Console adapter unconditionally calls a variant of `substr()` on the
given `$text` to shorten it to the configured display width.

With PHP 8.1 this fails, because native functions no longer accept `null` for a
string parameter:

> TypeError: grapheme_substr(): Argument #1 ($string) must be of type string, null given in […]

Signed-off-by: Tim Düsterhus <[email protected]>
(cherry picked from commit 965a447)
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

No branches or pull requests

1 participant