Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Remove compat code for PHP < 5.3 #4113

Closed
halfdan opened this Issue · 10 comments

4 participants

Fabian Becker Anonymous Piwik user Anthon Pang Matthieu Aubry
Fabian Becker
Collaborator

We can clean the code base after raising the requirement to PHP 5.3.

There are some compat functions in core/IP.php because Windows with PHP < 5.3 did not provide inet_ntop/inet_pton.

Anonymous Piwik user

In 3f7a679: Remove compat code for PHP < 5.3. inet_pton/inet_ntop are available in Windows in PHP >= 5.3 so we don't need the compat code anymore.

refs #3741, #4113

Anonymous Piwik user

In d507de9: Remove more pre 5.3 compat code

refs #4113

Anonymous Piwik user

In d2e842fbc3c70a7e2264ad978d1e36798f24a8a6: Remove upgradephp library

refs #4113

Fabian Becker
Collaborator

Reverted the last commit. upgradephp should be merged with core somehow. We don't need to upgrade some of the functions anymore.

Any reason for #1900? What's the point of not unserializing objects - as long as we don't execute anything we should be safe, right?

Anonymous Piwik user

In f229dbc: Replace create_function calls with lambda functions.
This allows the IDE to pick up all code!

refs #4113

Fabian Becker
Collaborator

@vipsoft: Thanks for the info!

Matthieu Aubry
Owner

Good to get it done for 2.0.

What is left on this ticket?

Fabian Becker
Collaborator

We need to check what we need from libs/upgradephp - there are some patches that Anthon mentioned above, but also some code that could be removed. So maybe we could merge the remainders into core.

There are also some functions in core (e.g. IP::N2P etc.) that could be removed.

Matthieu Aubry
Owner

Could you simply list all functions you think should be deleted, in the ticket description, and I'll investigate for sure.

Fabian Becker halfdan added this to the 2.0 - Piwik 2.0 milestone
Matthieu Aubry mattab was assigned by halfdan
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Fabian Becker halfdan Remove compat code for PHP < 5.3. inet_pton/inet_ntop are available i…
…n Windows in PHP >= 5.3 so we don't need the compat code anymore.

refs #3741, #4113
3f7a679
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Fabian Becker halfdan Remove more pre 5.3 compat code
refs #4113
d507de9
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Fabian Becker halfdan Replace create_function calls with lambda functions.
This allows the IDE to pick up all code!

refs #4113
f229dbc
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.