1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00
Commit Graph

2664 Commits

Author SHA1 Message Date
Andreas Möller
d9bcfed482 Enhancement: Enable array_syntax fixer
Co-authored-by: MathiasReker <mathias@reker.dk>

Closes GH-659.
2022-08-22 18:59:14 +02:00
Andreas Möller
cdb83249d3 Enhancement: Enable switch_case_space fixer
Closes GH-669.
2022-08-22 16:59:10 +02:00
Peter Cowburn
9ea4de3056 fix number of ? in IN clause
Bug was introduced in a3dcbf63da.
2022-08-11 11:26:27 +01:00
Patrick Allaert
cefb40f5df Announce PHP 8.1.9 2022-08-04 14:41:09 +02:00
Gabriel Caruso
86ea3fc524 Announce PHP 8.0.22 2022-08-04 10:11:55 +02:00
Andreas Möller
f127de5db9 Enhancement: Enable strict_param fixer
We set strict param to false to ensure current behavior,
except for two cases where it is safe to go with true.

Closes GH-658.
2022-07-15 14:48:44 +02:00
Christoph M. Becker
5c9eab2f38 Fix CS violations (case of null, false and true) 2022-07-15 14:05:50 +02:00
Andreas Möller
b575ebd409 Enhancement: Include *.inc files (with exceptions)
Closes GH-662.
2022-07-15 13:57:08 +02:00
Kamil Tekiela
68e9bffca2 Upgrade hogan.js 2022-07-13 17:31:07 +01:00
Kamil Tekiela
6dcd848697 Move jquery.scrollTo.min.js to a new file
Update footer.inc
2022-07-13 17:31:07 +01:00
Kamil Tekiela
25784fa653 Drop IE support including IE 7 & 9 shims 2022-07-13 17:31:07 +01:00
Kamil Tekiela
7e6aa5da11 Update jQuery from 1.10 to 3.6 2022-07-13 17:31:07 +01:00
Kamil Tekiela
33a94e54bb Drop Modernizr (#653)
We only used it to check for data: URI support, but that's universally supported now https://caniuse.com/datauri
2022-07-13 15:38:53 +01:00
Andreas Möller
f24a9f3906 Fix: Remove unused parameters
Closes GH-577.
2022-07-11 18:39:48 +02:00
Andreas Möller
d31e187324 Fix: Replace script with tests
Closes GH-631.
2022-07-09 17:03:23 +02:00
Andreas Möller
3a2761d9a4 Fix: Heredoc syntax
Closes GH-564.
2022-07-08 23:29:25 +02:00
Guilliam Xavier
2c3eb8db19 Changelog: do not confuse GH-xxx with #xxx bugs
Closes GH-619.
2022-07-08 14:02:19 +02:00
Ben Ramsey
fcccf51907 Announce PHP 8.1.8 2022-07-07 12:31:09 -05:00
Gabriel Caruso
b112b4360c Announce PHP 8.0.21 2022-07-07 11:33:30 +02:00
Andreas Möller
a83ae2fa32 Enhancement: Use PSR-4 autoloader (#604) 2022-07-05 12:50:41 +01:00
Ayesh Karunaratne
d40890db1b Micro Optimizations - Round #2
* .gitignore: Remove redundant entry

* Minor optimizations with ternary operators

* Use `const` instead of `define()` where appropriate

`const` is quite faster because of the compile-time optimizations. Because the replaced statements are not declaring constant conditionally, it's safe to use `const` in all of these places.

Closes GH-608.
2022-07-03 20:33:22 +02:00
Ayesh Karunaratne
1b83fd7ab7 Multiple micro-optimizations
* Replace `ob_get_contents();ob_clean()` with `ob_get_clean()`

`ob_get_clean()` is equivalent to `ob_get_contents()` followed by `ob_clean()`.

* Replace `intval()` calls with `(int)` type cast

This is a micro-optimization because `intval()` is a function call, and the type cast is about 6 times fast.

* Replace `preg_replace` call that could be done with an `rtrim()` call

In `./error.php`, there is a `preg_replace('!/+$!', '', $URI);` call that essentially is equivalent to `rtrim()`, that both calls removing trailing slash characters in `$URI`.
The `rtim()` call is more legible and faster.

* Combine consecutive `str_replace` calls to a single `str_replace` call

* Use short ternary operator where possible

Improves code readability.

* Cascade various `else` statements where possible

Cleans up the code by removing unnecessary `else` blocks and moving the code to the parent context if the previous `if` block exits the function by either terminating the script, or with a `return` statement.

* Combine multiple `isset()` calls to a single `isset()`

`isset()` accepts multiple parameters and returns `true` only if all of the parameters are `isset`. It makes sense to combine multiple individual `isset` calls to a single call for better readability.

* Replace `for` loop with a `foreach` loop

* Remove unnecessary character escapes in regular expressions

Regular expression special characters are context-sensitive. For example, special characters such as `.` are not considered special within square braces (`[]`).
This removes several of such instances that certain characters are escaped, but it is not strictly necessary within the context. This improves the readability of the expression.

See more information at [PHP.Watch: Writing better Regular Expressions in PHP](https://php.watch/articles/php-regex-readability#reduce-escape)

* Remove unnecessary break statement

* Remove unnecessary PHP close tags

* Remove redundant JSON_ERROR_NONE check

Remove unnecessary `json_last_error() == JSON_ERROR_NONE` where the decoded object is inspected already.

Closes GH-603.
2022-07-03 12:24:14 +02:00
Ayesh Karunaratne
38d4e0721c phpversion() replacements and code branch collapsing for older PHP versions
Closes GH-600.
2022-07-02 12:37:14 +02:00
Andreas Möller
c3f9653226 Remove useless function manual_header()
Closes GH-584.
2022-07-02 11:53:37 +02:00
Kamil Tekiela
1a7521e738 Refactor manual_notes() (#592) 2022-06-29 22:36:16 +01:00
Kamil Tekiela
0b217c0271 Move ManualNotesSorter to src/ (#593) 2022-06-29 22:24:09 +01:00
Andreas Möller
d6f23ea19b Fix: Move class into src/ (#581) 2022-06-29 19:03:25 +01:00
Andreas Möller
98430dbeb5 Avoid variable function invocation
Closes GH-586.
2022-06-29 18:36:38 +02:00
Andreas Möller
c6fecd8529 Fix: Add type and return type declaration (#587) 2022-06-28 22:13:58 +01:00
Andreas Möller
c73856319c Remove arguments identical to default values of parameters
Closes GH-583.
2022-06-28 18:51:03 +02:00
Andreas Möller
879d410643 Inline unnecessary local variables
Closes GH-582.
2022-06-28 18:47:39 +02:00
Andreas Möller
1e7a49e268 Fix: Remove unused local variables
Closes GH-578.
2022-06-28 15:25:35 +02:00
Andreas Möller
9fc38ed6e4 Fix: Remove unused local variable
Closes GH-576.
2022-06-28 14:56:29 +02:00
Andreas Möller
5e659e0dc4 Fix: Remove parameter where argument is never specified
Closes GH-573.
2022-06-28 14:40:31 +02:00
Andreas Möller
30796f6f06 Fix: Remove unused parameter
Closes GH-571.
2022-06-28 14:32:24 +02:00
Andreas Möller
1c2bd8ad42 Fix: Remove unused parameter
Closes GH-572.
2022-06-28 14:27:56 +02:00
Andreas Möller
22fffaad7a Fix: Remove unused references to a global variable (#563) 2022-06-28 13:20:52 +01:00
Kamil Tekiela
996c06e1bc Remove old countries lists (#569) 2022-06-28 12:46:27 +01:00
Kamil Tekiela
fa3391b9dc Refactor compare_version function (#568) 2022-06-28 11:30:39 +01:00
Kamil Tekiela
a6c79eca2e Remove fetch_contents and fetch_header (#566) 2022-06-27 22:49:22 +01:00
Andreas Möller
8fbbe3bb89 Fix: Remove unused private property (#561) 2022-06-27 19:24:21 +01:00
Lucas Azevedo
41e736f108 Update favicon
Use the alternative logo created by Levi Morrison.
See https://github.com/lhsazevedo/web-php-favicon.

Closes GH-522.
2022-06-10 12:45:10 +02:00
Sara Golemon
d9e64b1b1b Announce 8.0.20 2022-06-09 20:53:54 +00:00
Ben Ramsey
da39285250 Announce PHP 8.1.7 2022-06-09 08:27:02 -05:00
Derick Rethans
a681dbd7fb Announce 7.4.30 2022-06-09 09:30:36 +01:00
Ben Ramsey
11ca1e37b8 Update expiration date on ramsey@php.net key (#516) 2022-05-19 10:58:22 -05:00
Pierrick Charron
05dffd1797 Add PHP 8.2 key signature for pierrick & sergey
Co-authored-by: Sergey Panteleev <sergey@php.net>

Closes GH-515.
2022-05-19 15:12:52 +02:00
Ben Ramsey
9f796a96c6 Announce PHP 8.1.6 2022-05-12 16:56:58 -05:00
Gabriel Caruso
cc82bc6731 Announce PHP 8.0.19 2022-05-12 09:45:58 +02:00
Sara Golemon
57dd39fcb2 Announce 8.0.18 2022-04-15 01:52:56 +00:00