zendframework / zend-stdlib

Stdlib component from Zend Framework
BSD 3-Clause "New" or "Revised" License
384 stars 76 forks source link

Replace break usage by continue 2 to remove Warning : alert #98

Closed zeearth closed 5 years ago

zeearth commented 5 years ago

Remove warning alert cause of using break in a switch in a foreach Alert appears by using PHP 7.3

michalbundyra commented 5 years ago

@ZeEarth Hm... There is no any warning caused by break in switch on PHP 7.3. The continue instruction is causing the notice (see: https://3v4l.org/cRcKQ)

http://php.net/manual/en/migration73.incompatible.php#migration73.incompatible.core.continue-targeting-switch

I guess, you are still on zend-stdlib v2 (please check composer show), which is no longer supported and not compatible with PHP 7.3.

zeearth commented 5 years ago

Hi @webimpress

Here you can find my composer show command result : As you can see, I'm no more at v2 : zendframework/zend-stdlib 3.2.0

C:\dev\src\mpec\nextgen\api> composer show
bshaffer/oauth2-server-php             v1.10.0 OAuth2 Server for PHP
cakephp/cache                          3.7.4   Easy to use Caching library with support for multiple caching backends
cakephp/collection                     3.7.4   Work easily with arrays and iterators by having a battery of utility traversal methods
cakephp/core                           3.7.4   CakePHP Framework Core classes
cakephp/database                       3.7.4   Flexible and powerful Database abstraction library with a familiar PDO-like API
cakephp/datasource                     3.7.4   Provides connection managing and traits for Entities and Queries that can be reused for different datastores
cakephp/log                            3.7.4   CakePHP logging library with support for multiple different streams
cakephp/utility                        3.7.4   CakePHP Utility classes such as Inflector, String, Hash, and Security
container-interop/container-interop    1.2.0   Promoting the interoperability of container objects (DIC, SL, etc.)
doctrine/instantiator                  1.0.5   A small, lightweight utility to instantiate objects in PHP without invoking their constructors
herrera-io/json                        1.0.3   A library for simplifying JSON linting and validation.
herrera-io/phar-update                 1.0.3   A library for self-updating Phars.
justinrainbow/json-schema              1.6.1   A library to validate a json schema.
kherge/version                         1.0.1   A parsing and comparison library for semantic versioning.
michelf/php-markdown                   1.8.0   PHP Markdown
myclabs/deep-copy                      1.7.0   Create deep copies (clones) of your objects
paragonie/random_compat                v2.0.17 PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
phpdocumentor/reflection-common        1.0.1   Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock      3.3.2   With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.
phpdocumentor/type-resolver            0.4.0
phpspec/prophecy                       1.8.0   Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage              4.0.8   Library that provides collection, processing, and rendering functionality for PHP code coverage information.
phpunit/php-file-iterator              1.4.5   FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-text-template              1.2.1   Simple template engine.
phpunit/php-timer                      1.0.9   Utility class for timing
phpunit/php-token-stream               1.4.12  Wrapper around PHP's tokenizer extension.
phpunit/phpunit                        5.7.27  The PHP Unit Testing framework.
phpunit/phpunit-mock-objects           3.4.4   Mock Object library for PHPUnit
psr/container                          1.0.0   Common Container Interface (PHP FIG PSR-11)
psr/link                               1.0.0   Common interfaces for HTTP links
psr/log                                1.1.0   Common interface for logging libraries
robmorgan/phinx                        0.10.6  Phinx makes it ridiculously easy to manage the database migrations for your PHP app.
sebastian/code-unit-reverse-lookup     1.0.1   Looks up which function or method a line of code belongs to
sebastian/comparator                   1.2.4   Provides the functionality to compare PHP values for equality
sebastian/diff                         1.4.3   Diff implementation
sebastian/environment                  2.0.0   Provides functionality to handle HHVM/PHP environments
sebastian/exporter                     2.0.0   Provides the functionality to export PHP variables for visualization
sebastian/global-state                 1.1.1   Snapshotting of global state
sebastian/object-enumerator            2.0.1   Traverses array structures and object graphs to enumerate all referenced objects
sebastian/recursion-context            2.0.0   Provides functionality to recursively process PHP variables
sebastian/resource-operations          1.0.0   Provides a list of PHP built-in functions that operate on resources
sebastian/version                      2.0.1   Library that helps with managing the version number of Git-hosted PHP projects
seld/jsonlint                          1.7.1   JSON Linter
symfony/config                         v4.2.4  Symfony Config Component
symfony/console                        v4.2.4  Symfony Console Component
symfony/contracts                      v1.0.2  A set of abstractions extracted out of the Symfony components
symfony/filesystem                     v4.2.4  Symfony Filesystem Component
symfony/polyfill-ctype                 v1.9.0  Symfony polyfill for ctype functions
symfony/polyfill-mbstring              v1.10.0 Symfony polyfill for the Mbstring extension
symfony/yaml                           v3.4.14 Symfony Yaml Component
webmozart/assert                       1.3.0   Assertions to validate method input/output with nice error messages.
zendframework/zend-authentication      2.6.0   provides an API for authentication and includes concrete authentication adapters for common use case scenarios
zendframework/zend-code                2.6.3   provides facilities to generate arbitrary code using an object oriented interface
zendframework/zend-component-installer 1.1.1   Composer plugin for automating component registration in zend-mvc and Expressive applications
zendframework/zend-config              3.2.0   provides a nested object property based user interface for accessing this configuration data within application code
zendframework/zend-console             2.7.0   Build console applications using getopt syntax or routing, complete with prompts
zendframework/zend-crypt               3.3.0   Strong cryptography tools and password hashing
zendframework/zend-db                  2.9.3   Database abstraction layer, SQL abstraction, result set abstraction, and RowDataGateway and TableDataGateway implementations
zendframework/zend-debug               2.6.0   Safely dump debug information to HTML
zendframework/zend-developer-tools     1.2.1   Module for developer and debug tools for use with zend-mvc applications.
zendframework/zend-dom                 2.7.1   provides tools for working with DOM documents and structures
zendframework/zend-escaper             2.6.0   Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs
zendframework/zend-eventmanager        3.2.1   Trigger and listen to events within a PHP application
zendframework/zend-filter              2.8.0   provides a set of commonly needed data filters
zendframework/zend-http                2.8.2   Provides an easy interface for performing Hyper-Text Transfer Protocol (HTTP) requests
zendframework/zend-hydrator            2.4.0   Serialize objects to arrays, and vice versa
zendframework/zend-inputfilter         2.8.2   Normalize and validate input sets from the web, APIs, the CLI, and more, including files
zendframework/zend-json                3.1.0   provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP
zendframework/zend-loader              2.6.0   Autoloading and plugin loading strategies
zendframework/zend-math                3.1.1   Create cryptographically secure pseudo-random numbers, and manage big integers
zendframework/zend-modulemanager       2.8.2   Modular application system for zend-mvc applications
zendframework/zend-mvc                 3.1.1   Zend Framework's event-driven MVC layer, including MVC Applications, Controllers, and Plugins
zendframework/zend-paginator           2.8.1   zend-paginator is a flexible component for paginating collections of data and presenting that data to users.
zendframework/zend-permissions-acl     2.7.0   Provides a lightweight and flexible access control list (ACL) implementation for privileges management
zendframework/zend-permissions-rbac    2.6.0   provides a role-based access control management
zendframework/zend-router              3.2.0   Flexible routing system for HTTP and console applications
zendframework/zend-servicemanager      3.3.2   Factory-Driven Dependency Injection Container
zendframework/zend-stdlib              3.2.0   SPL extensions, array utilities, error handlers, and more
zendframework/zend-test                3.2.0   Tools to facilitate unit testing of zend-mvc applications
zendframework/zend-uri                 2.6.1   A component that aids in manipulating and validating » Uniform Resource Identifiers (URIs)
zendframework/zend-validator           2.10.2  provides a set of commonly needed validators
zendframework/zend-view                2.10.0  provides a system of helpers, output filters, and variable escaping
zfcampus/zf-api-problem                1.3.0   ZF2 Module providing API-Problem assets and rendering
zfcampus/zf-apigility                  1.4.0   Apigility module for Zend Framework
zfcampus/zf-apigility-admin            1.6.0   Apigility Admin module
zfcampus/zf-apigility-admin-ui         1.3.9   Apigility Admin UI module
zfcampus/zf-apigility-documentation    1.3.0   Apigility API documentation module
zfcampus/zf-apigility-provider         1.3.0   Apigility interfaces
zfcampus/zf-asset-manager              1.2.0   Composer plugin for copying module assets into application document roots.
zfcampus/zf-composer-autoloading       2.1.0   Sets up Composer-based autoloading for your Zend Framework modules
zfcampus/zf-configuration              1.3.3   Zend Framework module providing a REST resource for manipulating configuration
zfcampus/zf-console                    1.4.0   Library for creating and dispatching console commands
zfcampus/zf-content-negotiation        1.4.0   ZF Module providing content-negotiation features
zfcampus/zf-content-validation         1.6.1   Zend Framework module providing incoming content validation
zfcampus/zf-deploy                     1.3.0   Deployment tool for Zend Framework applications
zfcampus/zf-development-mode           3.2.0   Zend Framework development mode script
zfcampus/zf-hal                        1.5.0   ZF2 Module providing Hypermedia Application Language assets and rendering
zfcampus/zf-mvc-auth                   1.5.1   ZF2 Module providing Authentication and Authorization events and infrastructure
zfcampus/zf-oauth2                     1.5.0   ZF module for implementing an OAuth2 server
zfcampus/zf-rest                       1.5.0   ZF Module providing structure for RESTful resources
zfcampus/zf-rpc                        1.4.0   ZF2 Module for simplifying the creation of RPC services
zfcampus/zf-versioning                 1.3.0   ZF2 Module providing listeners and route prototypes for implementing API versioning

And the warning message when 7.3 is activate : image

image

Best Regards

michalbundyra commented 5 years ago

@ZeEarth

You are using version 3.2.0 but support of PHP 7.3 has been added in version 3.2.1 - see: https://github.com/zendframework/zend-stdlib/releases/tag/release-3.2.1

Please run composer update to update your dependencies, or just:

composer update zendframework/zend-stdlib

to update only zend-stdlib.

zeearth commented 5 years ago

crap ... Sorry for that, I install apigility by composer command. You can close this PR