Git Product home page Git Product logo

Comments (10)

remicollet avatar remicollet commented on May 27, 2024

Same issue with Forms test suite

-- FAILED: Nette\Forms HTTP data. | tests/Forms/Forms.submittedBy.phpt
   Exited with error code 255 (expected 0)
   E_DEPRECATED: The each() function is deprecated. This message will be suppressed on further calls

from http.

dg avatar dg commented on May 27, 2024

Is there file name and line where error is occured?

from http.

remicollet avatar remicollet commented on May 27, 2024

Full output

-- FAILED: /dev/shm/BUILD/security-8a3051f9b16d4d7bfa18b6b0ff6f9f6f418f9801/tests/Security.DI/SecurityExtension.user.phpt
   Exited with error code 255 (expected 0)
   E_DEPRECATED: The each() function is deprecated. This message will be suppressed on further calls
   
   in Nette/Http/RequestFactory.php(114) 
   in Nette/Http/RequestFactory.php(114) each()
   in tests/Security.DI/SecurityExtension.user.phpt(22) : eval()'d code(63) Nette\Http\RequestFactory->createHttpRequest()
   in Nette/DI/Container.php(178) Container->createServiceFoo__request()
   in Nette/DI/Container.php(104) Nette\DI\Container->createService()
   in tests/Security.DI/SecurityExtension.user.phpt(22) : eval()'d code(42) Nette\DI\Container->getService()
   in Nette/DI/Container.php(178) Container->createServiceBar__session()
   in Nette/DI/Container.php(104) Nette\DI\Container->createService()
   in tests/Security.DI/SecurityExtension.user.phpt(22) : eval()'d code(92) Nette\DI\Container->getService()
   in Nette/DI/Container.php(178) Container->createServiceSecurity__userStorage()
   in Nette/DI/Container.php(104) Nette\DI\Container->createService()
   in tests/Security.DI/SecurityExtension.user.phpt(25) Nette\DI\Container->getService()

from http.

remicollet avatar remicollet commented on May 27, 2024

AFAICS, each is only used in Nette/Http/RequestFactory.php (grep in all the framework)

from http.

dg avatar dg commented on May 27, 2024

There should be @ operator to silent notice.

from http.

xificurk avatar xificurk commented on May 27, 2024

@dg There is, but only in 2.4-dev, there is no stable version with this fix yet.

from http.

remicollet avatar remicollet commented on May 27, 2024

silent operator = the rope to hang yourself.

-			while (list($key, $val) = each($list)) {
+			foreach ($list as $key => $val) {

from http.

JanTvrdik avatar JanTvrdik commented on May 27, 2024

@remicollet See commit message of 4667ae0

foreach ($arr as &$el) fails in PHP 5.6 with single-item array

from http.

dg avatar dg commented on May 27, 2024

How it is possible that tests do not pass when there is a silent operator?

If you use your own error handler, you need to modify it as follows https://github.com/nette/code-checker/blob/master/src/bootstrap.php#L24-L26

from http.

dg avatar dg commented on May 27, 2024

fixed 4667ae0

from http.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.