Create and update progress bars in different environments

Overview

laminas-progressbar

🇷🇺 Русским гражданам

Мы, участники Laminas, родились и живем в разных странах. У многих из нас есть друзья, родственники и коллеги как в России, так и в Украине. Некоторые из нас родились в России. Некоторые из нас живут в России. У некоторых бабушки и дедушки сражались с фашистами во Второй мировой войне. Здесь никто не поддерживает фашизм.

У одного из нас есть украинская родственница, которая спаслась из дома вместе с сыном. Поезд задержался из-за бомбежки на дороге впереди. У нас есть друзья, которые прячутся в бомбоубежищах. Мы с тревогой ждем весточки от них после воздушных налетов, которые беспорядочно наносят удары и попадают по больницам, школам, детским садам и домам. Мы не берем это из каких-либо СМИ. Мы наблюдаем это напрямую.

Вы доверяете нам достаточно, чтоб использовать наши программы, и мы просим вас довериться нам вновь. Мы нуждаемся в помощи. Выходите и протестуйте против этой бесполезной войны. Остановите кровопролитие. Скажите "Нет войне!"

🇺🇸 To Citizens of Russia

We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism.

One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences.

You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!"

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

Build Status

laminas-progressbar is a component to create and update progress bars in different environments. It consists of a single backend, which outputs the progress through one of the multiple adapters. On every update, it takes an absolute value and optionally a status message, and then calls the adapter with some precalculated values like percentage and estimated time left.

Installation

Run the following to install this library:

$ composer require laminas/laminas-progressbar

Documentation

Browse the documentation online at https://docs.laminas.dev/laminas-progressbar/

Support

Comments
  • Add support for PHP 8.2 to composer.json

    Add support for PHP 8.2 to composer.json

    | Q | A |-------------- | ------ | Documentation | no | Bugfix | no | BC Break | no | New Feature | yes | RFC | no | QA | no

    Description

    No code change needed, all tests passed locally. My understanding is that CI will automatically run tests for all versions in composer.json.

    Furthermore my understanding of the last TSC meeting is that “security only” is redefined to “passive maintenance”, this change should qualify for that.

    Enhancement 
    opened by TimWolla 7
  • session gets corrupted when using

    session gets corrupted when using "\Zend\ProgressBar\Upload\SessionProgress"

    Whenever you submit a form using "PHP session-upload-progress", and you are also using the ZF session-container object, the session becomes corrupted. It looks like the upload-progress data is being injected into the ZF session data. I can confirm this happens with all releases of the framework. Output of error below:

    Stack trace:

    #0 /sites/shepherdpups/public_html/vendor/zendframework/library/Zend/Stdlib/ArrayObject.php(412): Zend\Stdlib\ArrayObject->setIteratorClass(NULL)
    #1 [internal function]: Zend\Stdlib\ArrayObject->unserialize('a:4:{s:7:"stora...')
    #2 /sites/shepherdpups/public_html/vendor/zendframework/library/Zend/Session/SessionManager.php(112): session_start()
    #3 /sites/shepherdpups/public_html/module/Application/Module.php(195): Zend\Session\SessionManager->start()
    #4 /sites/shepherdpups/public_html/module/Application/Module.php(53): Application\Module->bootstrapSession(Object(Zend\Mvc\MvcEvent))
    #5 [internal function]: Application\Module->onBootstrap(Object(Zend\Mvc\MvcEvent))
    #6 /sites/shepherdpups/public_html/vendor/zendframework/library/Zend/EventManager/EventManager.php(444): call_user_func(Array, in /sites/shepherdpups/public_html/vendor/zendframework/library/Zend/Stdlib/ArrayObject.php on line 370
    

    Note: just submitting the form corrupts the session container.


    Originally posted by @headbutt at https://github.com/zendframework/zend-progressbar/issues/3

    Bug 
    opened by weierophinney 6
  • Do not pass `null` to the `$text` parameter of adapter's `notify()`

    Do not pass `null` to the `$text` parameter of adapter's `notify()`

    | Q | A |-------------- | ------ | Documentation | no | Bugfix | yes | BC Break | no | New Feature | no | RFC | no | QA | no

    Description

    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 […]

    Bug 
    opened by TimWolla 3
  • Drop PHP 7.x from composer.json

    Drop PHP 7.x from composer.json

    | Q | A |-------------- | ------ | Documentation | no | Bugfix | no | BC Break | no | New Feature | no | RFC | no | QA | yes

    Description

    Spun out of #17 to unbreak the CI in the 2.11.x base branch and to not mix unrelated changes.

    Enhancement 
    opened by TimWolla 2
  • Housekeeping

    Housekeeping

    | Q | A |-------------- | ------ | Documentation | no | Bugfix | no | BC Break | no | New Feature | no | RFC | no | QA | yes

    Description

    Two little housekeeping changes:

    1. The README.md change fixes this: https://github.com/laminas/laminas-progressbar/runs/7557088552?check_suite_focus=true
    2. The .gitattributes change correctly strips phpcs.xml.dist from the distribution.
    Enhancement 
    opened by TimWolla 1
  • Configure Renovate

    Configure Renovate

    Mend Renovate

    Welcome to Renovate! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.

    🚦 To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.


    Detected Package Files

    • composer.json (composer)
    • .github/workflows/auto-close.yml (github-actions)
    • .github/workflows/continuous-integration.yml (github-actions)
    • .github/workflows/docs-build.yml (github-actions)
    • .github/workflows/release-on-milestone-closed.yml (github-actions)

    Configuration Summary

    Based on the default config's presets, Renovate will:

    • Start dependency updates only once this onboarding PR is merged
    • Enable Renovate Dependency Dashboard creation.
    • Ignore node_modules, bower_components, vendor and various test/tests directories.
    • Automerge patch and minor upgrades if they pass tests.
    • If automerging, push the new commit directly to the base branch (no PR).
    • Wait for branch tests to pass or fail before creating the PR.
    • Rebase existing PRs any time the base branch has been updated.
    • Separate major versions of dependencies into individual branches/PRs.
    • Do not separate patch and minor upgrades into separate PRs for the same dependency.
    • Raise PR when vulnerability alerts are detected.
    • Evaluate schedules according to timezone UTC.
    • Append Signed-off-by: to signoff Git commits.
    • Apply label renovate to PRs.
    • Group all minor and patch updates together.
    • Default configuration for repositories in the Laminas organisation

    🔡 Would you like to change the way Renovate is upgrading your dependencies? Simply edit the renovate.json in this branch with your custom config and the list of Pull Requests in the "What to Expect" section below will be updated the next time Renovate runs.


    What to Expect

    With your current configuration, Renovate will create 3 Pull Requests:

    chore(deps): update actions/checkout action to v3
    • Schedule: ["at any time"]
    • Branch name: renovate/actions-checkout-3.x
    • Merge into: 2.11.x
    • Upgrade actions/checkout to v3
    chore(deps): update dependency laminas/laminas-coding-standard to v2
    chore(deps): lock file maintenance
    • Schedule: ["before 2am"]
    • Branch name: renovate/lock-file-maintenance
    • Merge into: 2.11.x
    • Regenerate lock files to use latest dependency versions

    ❓ Got questions? Check out Renovate's Docs, particularly the Getting Started section. If you need any further assistance then you can also request help here.


    Read more information about the use of Renovate Bot within Laminas.

    renovate 
    opened by renovate[bot] 1
  • Prepare for Renovate with reusable workflows

    Prepare for Renovate with reusable workflows

    | Q | A |-------------- | ------ | QA | yes

    Description

    Adding Renovate to Laminas, Mezzio repositories. https://gist.github.com/weierophinney/49ca8ae2b916d898dd3d4162b26ff41b

    • Configure minimum supported PHP version
    • Update composer dependencies
    • Update to reusable Continuous Integration workflow
    • Update to reusable Automatic Releases workflow
    Enhancement Won't Fix 
    opened by ghostwriter 1
  • Added support for PHP 8.1

    Added support for PHP 8.1

    | Q | A |-------------- | ------ | Documentation | no | Bugfix | no | BC Break | no | New Feature | yes | RFC | no | QA | no

    Description

    This PR adds support for PHP 8.1 and laminas-form ^3 (which was necessary for that) This PR is also necessary to add PHP 8.1 support to laminas-file.

    Only some minor code changes were required because of a deprecation warning for fopen.

    Enhancement 
    opened by Koen1999 1
  • Psalm integration

    Psalm integration

    Feature Request

    | Q | A |------------ | ------ | QA | yes

    Summary

    As decided during the Technical-Steering-Committee Meeting on August 3rd, 2020, Laminas wants to implement vimeo/psalm in all packages.

    Implementing psalm is quite easy.

    Required

    • [ ] Create a .psalm.xml.dist in the project root
    • [ ] Copy and paste the contents from this psalm.xml.dist
    • [ ] Run $ composer require vimeo/psalm
    • [ ] Run $ vendor/bin/psalm --set-baseline=psalm-baseline.xml
    • [ ] Add a composer script static-analysis with the command psalm --shepherd --stats
    • [ ] Add a new line to script: in .travis.yml: - if [[ $TEST_COVERAGE == 'true' ]]; then composer static-analysis ; fi
    • [ ] Remove phpstan from the project (phpstan.neon.dist, .travis.yml entry, composer.json require-dev and scripts)
    Optional
    • [ ] Fix as many psalm errors as possible.
    Enhancement Help Wanted hacktoberfest-accepted 
    opened by boesing 1
  • stty: standard input: Inappropriate ioctl for device

    stty: standard input: Inappropriate ioctl for device

    This is not a real issue or bug, just putting it here for further reference (as it does not come up anywhere yet in relation to zend-progressbar when searching for it)

    Running a cli script, which uses zend-progressbar as a cronjob leads to an exit status != 0 displaying the following message:

    stty: standard input: Inappropriate ioctl for device

    Obviously a cli command being run through cron does not need a progress bar ;) Although one might use the same command in different contexts.. I am not sure wether this even can be "fixed" or wether its worth it. Feel free to close this issue!

    I am grateful for this great component/framework and everyone contributing to it. cheers


    Originally posted by @lenada at https://github.com/zendframework/zend-progressbar/issues/23

    opened by weierophinney 1
  • Example in manual was not working... (issue with script function name)

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

    • [x] 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 https://github.com/zendframework/zend-progressbar/issues/26

    opened by weierophinney 1
Releases(2.11.0)
Owner
Laminas Project
Laminas components and MVC.
Laminas Project
YCOM Impersonate. Login as selected YCOM user 🧙‍♂️in frontend.

YCOM Impersonate Login as selected YCOM user in frontend. Features: Backend users with admin rights or YCOM[] rights, can be automatically logged in v

Friends Of REDAXO 17 Sep 12, 2022
File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery

File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.

Sebastian Tschan 31.1k Dec 30, 2022
A set of PHP scripts which leverage MySQL INFORMATION_SCHEMA to create log tables and insert / update triggers

mysql-logtable-php mysql-logtable-php is a set of PHP scripts which leverage MySQL INFORMATION_SCHEMA to create log tables and insert / update trigger

null 3 Feb 27, 2022
Envbar allows you to differentiate between environments by adding a custom colored bar above the top navigation.

Envbar Envbar allows you to differentiate between environments by adding a custom colored bar above the top navigation. This should help backend users

Magenizr 6 Oct 7, 2022
Sspak - Tool for managing bundles of db/assets from SilverStripe environments

SSPak SSPak is a SilverStripe tool for managing database and assets content, for back-up, restoration, or transfer between environments. The file form

Silverstripe CMS 45 Dec 14, 2022
Warden is a CLI utility for orchestrating Docker based developer environments

Warden Warden is a CLI utility for orchestrating Docker based developer environments, and enables multiple local environments to run simultaneously wi

David Alger 314 Dec 2, 2022
Import data from and export data to a range of different file formats and media

Ddeboer Data Import library This library has been renamed to PortPHP and will be deprecated. Please use PortPHP instead. Introduction This PHP library

David de Boer 570 Dec 27, 2022
Simple library that abstracts different metrics collectors. I find this necessary to have a consistent and simple metrics (functional) API that doesn't cause vendor lock-in.

Metrics Simple library that abstracts different metrics collectors. I find this necessary to have a consistent and simple metrics API that doesn't cau

Benjamin Eberlei 311 Nov 20, 2022
A wrapper around symplify/config-transformer used to update recipes and using easy coding standard for generating readable config files.

Symfony Recipes Yaml to PHP Converter This is a wrapper around the symplify/config-transformer used to convert Symfony core recipes which uses .yaml c

Alexander Schranz 3 Nov 24, 2022
Login as a different user quickly

Lara Personate Is a user impersonate for the Laravel framework. This package makes it easier for users who have access rights such as super admin to t

Octopy ID 172 Dec 2, 2022
A new plugin like EconomyAPI but with a different mode

A new plugin like EconomyAPI but with a different mode

null 1 Dec 13, 2021
Provides different language SDKs for the Overledger V2 API

overledger-sdks This github repository provides different language SDKs, which can be found in the SDK folder, for the Overledger DLT API Gateway. How

Quant Network 4 Oct 31, 2022
A PocketMine-MP Unregister-Command completely different from the others on Poggit.

This Unregister-Cmd plugin is completely different from the ones you see on Poggit while that much easier and constantly in active development. Featur

Arzxy Modz 1 Sep 12, 2022
The tool converts different error reporting standards for deep compatibility with popular CI systems (TeamCity, IntelliJ IDEA, GitHub Actions, etc).

JBZoo / CI-Report-Converter Why? Installing Using as GitHub Action Example GitHub Action workflow Available Directions Help description in terminal Co

JBZoo Toolbox 17 Jun 16, 2022
salah eddine bendyab 18 Aug 17, 2021
Projeto de um blog com funções de (criar, editar, deletar e dar update) em uma página web. Introdução ao Laravel 8.x.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Isabella 1 Nov 7, 2021
Blessing Skin update server, written in PHP.

Blessing Skin update server, written in PHP.

Akkariin Meiko 2 Sep 27, 2022
Greyhole uses Samba to create a storage pool of all your available hard drives, and allows you to create redundant copies of the files you store.

Greyhole Greyhole is an application that uses Samba to create a storage pool of all your available hard drives (whatever their size, however they're c

Guillaume Boudreau 245 Dec 18, 2022
WPForms coding standards are based on the WordPress Coding Standards and the PHPCompatibility Coding Standards and help create strict and high-quality code.

WPForms coding standards are based on the WordPress Coding Standards and the PHPCompatibility Coding Standards and help create strict and high-quality code.

Awesome Motive, Inc. 7 Nov 29, 2022