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

488 Commits

Author SHA1 Message Date
Derick Rethans
7e2d16d545 Revert "Create UserNoteService class"
This reverts commit b31ec1c7f1.
2026-01-21 15:02:14 +00:00
Kamil Tekiela
b31ec1c7f1 Create UserNoteService class 2026-01-13 14:00:36 +01:00
Sergey Panteleev
f331693b01 PHP 8.5 released (#1623)
* PHP 8.5 released

* Add PHP 8.5 migration guide
2025-11-20 10:37:06 -08:00
Theodore Brown
a32bc943fb Support rendering release pages with PHP 8.3+ (#1613)
See https://github.com/php/php-src/pull/11913
2025-11-19 23:44:24 +03:00
Theodore Brown
84ce0c6804 Add syntax highlighting for variables on PHP 8.5 release page (#1626) 2025-11-19 21:02:05 +03:00
Luffy
5cd5778ab7 Sync news item layout and style (#1451) 2025-10-01 13:52:31 +08:00
Derick Rethans
e78ea355df Update title and descriptions for manual pages (#1372)
Co-authored-by: Luffy <lufei@php.net>
2025-09-03 15:27:36 +08:00
Maurício Meneghini Fauth
35d6a900ac Create phpweb\News\NewsHandler class to handle pregen-news.inc (#1288) 2025-07-21 10:06:28 +08:00
Sergey Panteleev
6c604f1335 PHP 8.4 announcement page (#1124) 2024-11-21 12:19:09 +03:00
Maurício Meneghini Fauth
cdf59074d3 Replace languages.inc globals with I18n\Languages consts (#1121)
The include/languages.inc file was not removed as it's used in other
repositories. It should be removed after migration.

Tests were added to ensure that the global variables and the constants
are in sync with each other.

Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2024-11-14 11:37:00 +03:00
Maurício Meneghini Fauth
817a3e7fd9 Move myphpnet_* functions to the UserPreferences class (#1075) 2024-11-11 11:50:15 +03:00
Lucas Azevedo
b62f99f6de Update navbar design and improve search UI (#1084)
Co-authored-by: Gina Peter Banyard <girgias@php.net>
Co-authored-by: Sergey Panteleev <sergey@php.net>
2024-11-02 17:39:04 +03:00
Sergey Panteleev
4cf1d83d32 OG meta tags by default (#1027)
Fix #981
2024-07-06 16:04:44 +03:00
Sergey Panteleev
555ac83c14 Set $addsize to false by default
In favor of css
2024-02-01 10:05:52 +03:00
Andreas Möller
9482f9bd43 Fix: Remove unused functions (#585) 2023-12-07 18:14:43 +01:00
Andreas Möller
ec908ce246 Enhancement: Enable no_superfluous_elseif fixer (#884) 2023-12-07 15:21:04 +01:00
Andreas Möller
00342c402f Fix: Remove vim instruction (#880) 2023-12-07 15:01:52 +01:00
Andreas Möller
5542743d86 Fix: Run 'make coding-standards' 2023-12-07 11:45:18 +00:00
Andreas Möller
57b259ea59 Fix: Run 'make coding-standards' 2023-12-07 11:45:04 +00:00
Andreas Möller
c093fb5382 Enhancement: Enable trailing_comma_in_multiline fixer (#647)
* Enhancement: Enable and configure trailing_comma_in_multiline fixer

* Fix: Run 'make coding-standards'
2023-12-06 23:16:28 +00:00
Andreas Möller
2a43614176 Fix: Add parameter type declarations (#866) 2023-12-06 16:07:40 +01:00
Andreas Möller
08a7beea92 Enhancement: Enable function_declaration fixer (#862) 2023-12-06 15:10:28 +01:00
Andreas Möller
1d7287778c Fix: Add parameter type declaration (#857) 2023-12-06 14:49:29 +01:00
Andreas Möller
269cfd55c0 Enhancement: Enable elseif fixer (#859) 2023-12-06 14:45:36 +01:00
Andreas Möller
a8c736a079 Enhancement: Enable void_return fixer (#661)
* Enhancement: Enable void_return fixer

* Fix: Run 'make coding-standards'
2023-12-05 14:06:29 +01:00
Tim Düsterhus
2a5e5a44ab Use white-space: pre-wrap for code formatting (#810)
* Use `white-space: pre-wrap` for code formatting

Apparently code formatting is used for the entire user comments. Use
`white-space: pre-wrap` to avoid horizontal scrolling of the plaintext
description.


see 7d4038829e

* Unify `highlight_php()` with PhD

see php/phd@01d6beb366

* Fix markup for notes in add-note.php
2023-08-30 18:40:00 +01:00
Kamil Tekiela
8b776fbd72 Remove unnecessary code (#708) 2022-09-29 10:28:51 +01:00
Kamil Tekiela
d4fa469d81 Simplify links (#580) 2022-09-28 15:17:09 +01:00
Andreas Möller
2ae10ff262 Enhancement: Enable and configure increment_style fixer
Co-authored-by: Mathias Reker <mathias@reker.dk>

Closes GH-698.
2022-09-12 15:27:05 +02:00
Andreas Möller
1ebc2c4996 Enhancement: Enable binary_operator_spaces fixer
Closes GH-667.
2022-08-22 19:17:38 +02:00
Andreas Möller
57f505ed58 Enhancement: Enable and configure concat_space fixer
Closes GH-657.
2022-08-22 19:04:47 +02:00
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
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
Andreas Möller
3a2761d9a4 Fix: Heredoc syntax
Closes GH-564.
2022-07-08 23:29:25 +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
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
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
Mike Schinkel
01337ed193 Remove use of get_magic_quotes_gpc()
As get_magic_quotes_gpc() has been removed in PHP 8.0, this PR removes it from the clean() function in layout.inc.

Closes GH-419.
2021-07-24 00:39:15 +02:00
Mike Schinkel
0cea658a5e Add returns to end of functions (#422)
PhpStorm flags functions that don't have returns at the end so this PR rearranges code so that the returns are always at the end, or in one case adds one that was missing.
2021-07-21 21:20:10 +02:00
Sara Golemon
ae006c3288 Migrate away from strftime 2021-07-05 14:55:45 +00:00
Sara Golemon
ca283e8c03 Remove defunct usergroup pages 2021-04-18 23:23:55 +00:00
Sara Golemon
8249f7f58f Revert "Temporary hacky fix for cache issue and old 8.0.2 tarballs"
This reverts commit 2e0a93ef3f.

The caching issue has expired and we now resume our regularly scheduled programming.
2021-02-05 15:36:57 +00:00
Sara Golemon
2e0a93ef3f Temporary hacky fix for cache issue and old 8.0.2 tarballs 2021-02-04 16:50:18 +00:00
Sara Golemon
f8d7a46022 Refactor php8 announcement helpers into common include file 2020-11-27 14:59:12 +00:00